From be3e1172ee7565a2fa1409c5f32328125f2b85ed Mon Sep 17 00:00:00 2001 From: Romain Canon Date: Sun, 4 Apr 2021 22:54:21 +0200 Subject: [PATCH] Build: Build with `spatie/ray:1.21.2` --- build/composer.json | 1 + build/vendor/autoload.php | 7 + build/vendor/brick/math/LICENSE | 20 + build/vendor/brick/math/random-tests.php | 159 +++ build/vendor/brick/math/src/BigDecimal.php | 717 +++++++++++++ build/vendor/brick/math/src/BigInteger.php | 971 +++++++++++++++++ build/vendor/brick/math/src/BigNumber.php | 473 +++++++++ build/vendor/brick/math/src/BigRational.php | 423 ++++++++ .../src/Exception/DivisionByZeroException.php | 38 + .../Exception/IntegerOverflowException.php | 24 + .../math/src/Exception/MathException.php | 13 + .../src/Exception/NegativeNumberException.php | 11 + .../src/Exception/NumberFormatException.php | 31 + .../Exception/RoundingNecessaryException.php | 20 + .../brick/math/src/Internal/Calculator.php | 632 ++++++++++++ .../Internal/Calculator/BcMathCalculator.php | 102 ++ .../src/Internal/Calculator/GmpCalculator.php | 133 +++ .../Internal/Calculator/NativeCalculator.php | 498 +++++++++ build/vendor/brick/math/src/RoundingMode.php | 96 ++ build/vendor/composer/ClassLoader.php | 479 +++++++++ build/vendor/composer/InstalledVersions.php | 132 +++ build/vendor/composer/LICENSE | 21 + build/vendor/composer/autoload_classmap.php | 289 ++++++ build/vendor/composer/autoload_files.php | 15 + build/vendor/composer/autoload_namespaces.php | 9 + build/vendor/composer/autoload_psr4.php | 22 + build/vendor/composer/autoload_real.php | 66 ++ build/vendor/composer/autoload_static.php | 384 +++++++ build/vendor/composer/installed.json | 976 ++++++++++++++++++ build/vendor/composer/installed.php | 5 + build/vendor/composer/platform_check.php | 26 + build/vendor/psr/container/LICENSE | 21 + .../src/ContainerExceptionInterface.php | 10 + .../psr/container/src/ContainerInterface.php | 34 + .../src/NotFoundExceptionInterface.php | 10 + build/vendor/ramsey/collection/LICENSE | 19 + .../ramsey/collection/src/AbstractArray.php | 160 +++ .../collection/src/AbstractCollection.php | 250 +++++ .../ramsey/collection/src/AbstractSet.php | 45 + .../ramsey/collection/src/ArrayInterface.php | 40 + .../ramsey/collection/src/Collection.php | 102 ++ .../collection/src/CollectionInterface.php | 188 ++++ .../collection/src/DoubleEndedQueue.php | 153 +++ .../src/DoubleEndedQueueInterface.php | 302 ++++++ .../Exception/CollectionMismatchException.php | 20 + .../Exception/InvalidArgumentException.php | 20 + .../Exception/InvalidSortOrderException.php | 20 + .../src/Exception/NoSuchElementException.php | 20 + .../src/Exception/OutOfBoundsException.php | 20 + .../UnsupportedOperationException.php | 20 + .../Exception/ValueExtractionException.php | 20 + .../ramsey/collection/src/GenericArray.php | 22 + .../ramsey/collection/src/Map/AbstractMap.php | 133 +++ .../collection/src/Map/AbstractTypedMap.php | 53 + .../src/Map/AssociativeArrayMap.php | 23 + .../collection/src/Map/MapInterface.php | 137 +++ .../collection/src/Map/NamedParameterMap.php | 96 ++ .../ramsey/collection/src/Map/TypedMap.php | 128 +++ .../collection/src/Map/TypedMapInterface.php | 32 + build/vendor/ramsey/collection/src/Queue.php | 140 +++ .../ramsey/collection/src/QueueInterface.php | 194 ++++ build/vendor/ramsey/collection/src/Set.php | 65 ++ .../ramsey/collection/src/Tool/TypeTrait.php | 70 ++ .../src/Tool/ValueExtractorTrait.php | 49 + .../src/Tool/ValueToStringTrait.php | 81 ++ build/vendor/ramsey/uuid/LICENSE | 21 + build/vendor/ramsey/uuid/src/BinaryUtils.php | 58 ++ .../uuid/src/Builder/BuilderCollection.php | 57 + .../uuid/src/Builder/DefaultUuidBuilder.php | 23 + .../uuid/src/Builder/DegradedUuidBuilder.php | 63 ++ .../uuid/src/Builder/FallbackBuilder.php | 63 ++ .../uuid/src/Builder/UuidBuilderInterface.php | 36 + .../ramsey/uuid/src/Codec/CodecInterface.php | 65 ++ .../ramsey/uuid/src/Codec/GuidStringCodec.php | 45 + .../uuid/src/Codec/OrderedTimeCodec.php | 82 ++ .../ramsey/uuid/src/Codec/StringCodec.php | 98 ++ .../src/Codec/TimestampFirstCombCodec.php | 93 ++ .../uuid/src/Codec/TimestampLastCombCodec.php | 49 + .../Converter/Number/BigNumberConverter.php | 51 + .../Number/DegradedNumberConverter.php | 23 + .../Number/GenericNumberConverter.php | 56 + .../Converter/NumberConverterInterface.php | 54 + .../Converter/Time/BigNumberTimeConverter.php | 45 + .../Converter/Time/DegradedTimeConverter.php | 23 + .../Converter/Time/GenericTimeConverter.php | 82 ++ .../src/Converter/Time/PhpTimeConverter.php | 138 +++ .../src/Converter/TimeConverterInterface.php | 54 + build/vendor/ramsey/uuid/src/DegradedUuid.php | 23 + .../uuid/src/DeprecatedUuidInterface.php | 129 +++ .../uuid/src/DeprecatedUuidMethodsTrait.php | 319 ++++++ .../Exception/BuilderNotFoundException.php | 21 + .../uuid/src/Exception/DateTimeException.php | 21 + .../src/Exception/DceSecurityException.php | 22 + .../Exception/InvalidArgumentException.php | 21 + .../src/Exception/InvalidBytesException.php | 21 + .../Exception/InvalidUuidStringException.php | 23 + .../uuid/src/Exception/NameException.php | 22 + .../uuid/src/Exception/NodeException.php | 21 + .../src/Exception/RandomSourceException.php | 24 + .../src/Exception/TimeSourceException.php | 21 + .../Exception/UnableToBuildUuidException.php | 21 + .../UnsupportedOperationException.php | 21 + build/vendor/ramsey/uuid/src/FeatureSet.php | 372 +++++++ .../uuid/src/Fields/FieldsInterface.php | 29 + .../src/Fields/SerializableFieldsTrait.php | 54 + .../uuid/src/Generator/CombGenerator.php | 97 ++ .../src/Generator/DceSecurityGenerator.php | 114 ++ .../DceSecurityGeneratorInterface.php | 45 + .../src/Generator/DefaultNameGenerator.php | 34 + .../src/Generator/DefaultTimeGenerator.php | 109 ++ .../src/Generator/NameGeneratorFactory.php | 28 + .../src/Generator/NameGeneratorInterface.php | 35 + .../src/Generator/PeclUuidNameGenerator.php | 44 + .../src/Generator/PeclUuidRandomGenerator.php | 28 + .../src/Generator/PeclUuidTimeGenerator.php | 32 + .../src/Generator/RandomBytesGenerator.php | 37 + .../src/Generator/RandomGeneratorFactory.php | 28 + .../Generator/RandomGeneratorInterface.php | 28 + .../uuid/src/Generator/RandomLibAdapter.php | 49 + .../src/Generator/TimeGeneratorFactory.php | 49 + .../src/Generator/TimeGeneratorInterface.php | 35 + build/vendor/ramsey/uuid/src/Guid/Fields.php | 129 +++ build/vendor/ramsey/uuid/src/Guid/Guid.php | 55 + .../ramsey/uuid/src/Guid/GuidBuilder.php | 75 ++ .../uuid/src/Lazy/LazyUuidFromString.php | 413 ++++++++ .../uuid/src/Math/BrickMathCalculator.php | 99 ++ .../uuid/src/Math/CalculatorInterface.php | 91 ++ .../ramsey/uuid/src/Math/RoundingMode.php | 134 +++ .../ramsey/uuid/src/Nonstandard/Fields.php | 105 ++ .../ramsey/uuid/src/Nonstandard/Uuid.php | 31 + .../uuid/src/Nonstandard/UuidBuilder.php | 74 ++ .../ramsey/uuid/src/Nonstandard/UuidV6.php | 99 ++ .../Dce/SystemDceSecurityProvider.php | 188 ++++ .../Provider/DceSecurityProviderInterface.php | 37 + .../Provider/Node/FallbackNodeProvider.php | 49 + .../Provider/Node/NodeProviderCollection.php | 42 + .../src/Provider/Node/RandomNodeProvider.php | 48 + .../src/Provider/Node/StaticNodeProvider.php | 58 ++ .../src/Provider/Node/SystemNodeProvider.php | 136 +++ .../src/Provider/NodeProviderInterface.php | 27 + .../src/Provider/Time/FixedTimeProvider.php | 56 + .../src/Provider/Time/SystemTimeProvider.php | 28 + .../src/Provider/TimeProviderInterface.php | 25 + .../vendor/ramsey/uuid/src/Rfc4122/Fields.php | 143 +++ .../uuid/src/Rfc4122/FieldsInterface.php | 113 ++ .../ramsey/uuid/src/Rfc4122/NilTrait.php | 38 + .../ramsey/uuid/src/Rfc4122/NilUuid.php | 24 + .../ramsey/uuid/src/Rfc4122/UuidBuilder.php | 96 ++ .../ramsey/uuid/src/Rfc4122/UuidInterface.php | 33 + .../vendor/ramsey/uuid/src/Rfc4122/UuidV1.php | 72 ++ .../vendor/ramsey/uuid/src/Rfc4122/UuidV2.php | 116 +++ .../vendor/ramsey/uuid/src/Rfc4122/UuidV3.php | 47 + .../vendor/ramsey/uuid/src/Rfc4122/UuidV4.php | 47 + .../vendor/ramsey/uuid/src/Rfc4122/UuidV5.php | 47 + .../ramsey/uuid/src/Rfc4122/Validator.php | 41 + .../ramsey/uuid/src/Rfc4122/VariantTrait.php | 73 ++ .../ramsey/uuid/src/Rfc4122/VersionTrait.php | 51 + build/vendor/ramsey/uuid/src/Type/Decimal.php | 92 ++ .../ramsey/uuid/src/Type/Hexadecimal.php | 76 ++ build/vendor/ramsey/uuid/src/Type/Integer.php | 101 ++ .../ramsey/uuid/src/Type/NumberInterface.php | 26 + build/vendor/ramsey/uuid/src/Type/Time.php | 91 ++ .../ramsey/uuid/src/Type/TypeInterface.php | 26 + build/vendor/ramsey/uuid/src/Uuid.php | 544 ++++++++++ build/vendor/ramsey/uuid/src/UuidFactory.php | 396 +++++++ .../ramsey/uuid/src/UuidFactoryInterface.php | 160 +++ .../vendor/ramsey/uuid/src/UuidInterface.php | 86 ++ .../uuid/src/Validator/GenericValidator.php | 43 + .../uuid/src/Validator/ValidatorInterface.php | 38 + build/vendor/ramsey/uuid/src/functions.php | 105 ++ build/vendor/scoper-autoload.php | 20 + .../vendor/spatie/backtrace/src/Backtrace.php | 141 +++ .../spatie/backtrace/src/CodeSnippet.php | 53 + build/vendor/spatie/backtrace/src/File.php | 32 + build/vendor/spatie/backtrace/src/Frame.php | 39 + .../vendor/spatie/macroable/src/Macroable.php | 61 ++ build/vendor/spatie/ray/rector.php | 19 + .../spatie/ray/src/ArgumentConverter.php | 28 + build/vendor/spatie/ray/src/Client.php | 121 +++ .../spatie/ray/src/Concerns/RayColors.php | 32 + .../spatie/ray/src/Concerns/RaySizes.php | 16 + .../ray/src/Concerns/RemovesRayFrames.php | 28 + .../src/Exceptions/CouldNotConnectToRay.php | 12 + .../src/Exceptions/StopExecutionRequested.php | 12 + .../ray/src/Origin/DefaultOriginFactory.php | 66 ++ .../vendor/spatie/ray/src/Origin/Hostname.php | 16 + build/vendor/spatie/ray/src/Origin/Origin.php | 32 + .../spatie/ray/src/Origin/OriginFactory.php | 8 + .../vendor/spatie/ray/src/PayloadFactory.php | 54 + .../src/Payloads/ApplicationLogPayload.php | 21 + .../spatie/ray/src/Payloads/BoolPayload.php | 21 + .../spatie/ray/src/Payloads/CallerPayload.php | 27 + .../spatie/ray/src/Payloads/CarbonPayload.php | 25 + .../ray/src/Payloads/ClearAllPayload.php | 11 + .../spatie/ray/src/Payloads/ColorPayload.php | 21 + .../ray/src/Payloads/CreateLockPayload.php | 21 + .../spatie/ray/src/Payloads/CustomPayload.php | 24 + .../ray/src/Payloads/DecodedJsonPayload.php | 23 + .../ray/src/Payloads/ExceptionPayload.php | 35 + .../ray/src/Payloads/FileContentsPayload.php | 31 + .../ray/src/Payloads/HideAppPayload.php | 11 + .../spatie/ray/src/Payloads/HidePayload.php | 11 + .../spatie/ray/src/Payloads/HtmlPayload.php | 21 + .../spatie/ray/src/Payloads/ImagePayload.php | 25 + .../ray/src/Payloads/JsonStringPayload.php | 21 + .../spatie/ray/src/Payloads/LogPayload.php | 32 + .../ray/src/Payloads/MeasurePayload.php | 48 + .../ray/src/Payloads/NewScreenPayload.php | 21 + .../spatie/ray/src/Payloads/NotifyPayload.php | 21 + .../spatie/ray/src/Payloads/NullPayload.php | 17 + .../spatie/ray/src/Payloads/Payload.php | 44 + .../spatie/ray/src/Payloads/RemovePayload.php | 11 + .../ray/src/Payloads/ShowAppPayload.php | 11 + .../spatie/ray/src/Payloads/SizePayload.php | 21 + .../spatie/ray/src/Payloads/TablePayload.php | 28 + .../spatie/ray/src/Payloads/TracePayload.php | 44 + .../spatie/ray/src/Payloads/XmlPayload.php | 46 + build/vendor/spatie/ray/src/Ray.php | 420 ++++++++ build/vendor/spatie/ray/src/Request.php | 31 + .../spatie/ray/src/Settings/Settings.php | 49 + .../ray/src/Settings/SettingsFactory.php | 55 + .../spatie/ray/src/Support/Counters.php | 35 + build/vendor/spatie/ray/src/helpers.php | 52 + build/vendor/symfony/polyfill-ctype/Ctype.php | 201 ++++ build/vendor/symfony/polyfill-ctype/LICENSE | 19 + .../symfony/polyfill-ctype/bootstrap.php | 82 ++ .../symfony/polyfill-ctype/bootstrap80.php | 79 ++ .../vendor/symfony/polyfill-mbstring/LICENSE | 19 + .../symfony/polyfill-mbstring/Mbstring.php | 695 +++++++++++++ .../Resources/unidata/lowerCase.php | 5 + .../Resources/unidata/titleCaseRegexp.php | 6 + .../Resources/unidata/upperCase.php | 5 + .../symfony/polyfill-mbstring/bootstrap.php | 257 +++++ .../symfony/polyfill-mbstring/bootstrap80.php | 254 +++++ build/vendor/symfony/polyfill-php80/LICENSE | 19 + build/vendor/symfony/polyfill-php80/Php80.php | 100 ++ .../Resources/stubs/Attribute.php | 22 + .../Resources/stubs/Stringable.php | 13 + .../Resources/stubs/UnhandledMatchError.php | 7 + .../Resources/stubs/ValueError.php | 7 + .../symfony/polyfill-php80/bootstrap.php | 61 ++ .../service-contracts/Attribute/Required.php | 25 + .../vendor/symfony/service-contracts/LICENSE | 19 + .../service-contracts/ResetInterface.php | 29 + .../service-contracts/ServiceLocatorTrait.php | 111 ++ .../ServiceProviderInterface.php | 34 + .../ServiceSubscriberInterface.php | 52 + .../ServiceSubscriberTrait.php | 52 + .../Test/ServiceLocatorTest.php | 83 ++ build/vendor/symfony/stopwatch/LICENSE | 19 + build/vendor/symfony/stopwatch/Section.php | 163 +++ build/vendor/symfony/stopwatch/Stopwatch.php | 146 +++ .../symfony/stopwatch/StopwatchEvent.php | 225 ++++ .../symfony/stopwatch/StopwatchPeriod.php | 74 ++ .../symfony/var-dumper/Caster/AmqpCaster.php | 105 ++ .../symfony/var-dumper/Caster/ArgsStub.php | 71 ++ .../symfony/var-dumper/Caster/Caster.php | 155 +++ .../symfony/var-dumper/Caster/ClassStub.php | 95 ++ .../symfony/var-dumper/Caster/ConstStub.php | 33 + .../var-dumper/Caster/CutArrayStub.php | 27 + .../symfony/var-dumper/Caster/CutStub.php | 56 + .../symfony/var-dumper/Caster/DOMCaster.php | 124 +++ .../symfony/var-dumper/Caster/DateCaster.php | 88 ++ .../var-dumper/Caster/DoctrineCaster.php | 55 + .../symfony/var-dumper/Caster/DsCaster.php | 59 ++ .../symfony/var-dumper/Caster/DsPairStub.php | 23 + .../symfony/var-dumper/Caster/EnumStub.php | 27 + .../var-dumper/Caster/ExceptionCaster.php | 304 ++++++ .../symfony/var-dumper/Caster/FrameStub.php | 28 + .../symfony/var-dumper/Caster/GmpCaster.php | 29 + .../var-dumper/Caster/ImagineCaster.php | 30 + .../symfony/var-dumper/Caster/ImgStub.php | 25 + .../symfony/var-dumper/Caster/IntlCaster.php | 62 ++ .../symfony/var-dumper/Caster/LinkStub.php | 96 ++ .../var-dumper/Caster/MemcachedCaster.php | 62 ++ .../symfony/var-dumper/Caster/PdoCaster.php | 70 ++ .../symfony/var-dumper/Caster/PgSqlCaster.php | 91 ++ .../var-dumper/Caster/ProxyManagerCaster.php | 30 + .../var-dumper/Caster/RdKafkaCaster.php | 118 +++ .../symfony/var-dumper/Caster/RedisCaster.php | 88 ++ .../var-dumper/Caster/ReflectionCaster.php | 305 ++++++ .../var-dumper/Caster/ResourceCaster.php | 79 ++ .../symfony/var-dumper/Caster/SplCaster.php | 159 +++ .../symfony/var-dumper/Caster/StubCaster.php | 71 ++ .../var-dumper/Caster/SymfonyCaster.php | 52 + .../symfony/var-dumper/Caster/TraceStub.php | 33 + .../symfony/var-dumper/Caster/UuidCaster.php | 25 + .../var-dumper/Caster/XmlReaderCaster.php | 37 + .../var-dumper/Caster/XmlResourceCaster.php | 35 + .../var-dumper/Cloner/AbstractCloner.php | 193 ++++ .../var-dumper/Cloner/ClonerInterface.php | 26 + .../symfony/var-dumper/Cloner/Cursor.php | 41 + .../vendor/symfony/var-dumper/Cloner/Data.php | 396 +++++++ .../var-dumper/Cloner/DumperInterface.php | 52 + .../vendor/symfony/var-dumper/Cloner/Stub.php | 57 + .../symfony/var-dumper/Cloner/VarCloner.php | 288 ++++++ .../Command/Descriptor/CliDescriptor.php | 77 ++ .../Descriptor/DumpDescriptorInterface.php | 21 + .../Command/Descriptor/HtmlDescriptor.php | 104 ++ .../var-dumper/Command/ServerDumpCommand.php | 78 ++ .../var-dumper/Dumper/AbstractDumper.php | 178 ++++ .../symfony/var-dumper/Dumper/CliDumper.php | 540 ++++++++++ .../ContextProvider/CliContextProvider.php | 27 + .../ContextProviderInterface.php | 24 + .../RequestContextProvider.php | 40 + .../ContextProvider/SourceContextProvider.php | 105 ++ .../Dumper/ContextualizedDumper.php | 38 + .../var-dumper/Dumper/DataDumperInterface.php | 22 + .../symfony/var-dumper/Dumper/HtmlDumper.php | 905 ++++++++++++++++ .../var-dumper/Dumper/ServerDumper.php | 48 + .../Exception/ThrowingCasterException.php | 25 + build/vendor/symfony/var-dumper/LICENSE | 19 + .../var-dumper/Resources/bin/var-dump-server | 45 + .../Resources/css/htmlDescriptor.css | 130 +++ .../var-dumper/Resources/functions/dump.php | 38 + .../var-dumper/Resources/js/htmlDescriptor.js | 10 + .../symfony/var-dumper/Server/Connection.php | 84 ++ .../symfony/var-dumper/Server/DumpServer.php | 93 ++ .../var-dumper/Test/VarDumperTestTrait.php | 70 ++ build/vendor/symfony/var-dumper/VarDumper.php | 89 ++ 320 files changed, 29088 insertions(+) create mode 100644 build/composer.json create mode 100644 build/vendor/autoload.php create mode 100644 build/vendor/brick/math/LICENSE create mode 100644 build/vendor/brick/math/random-tests.php create mode 100644 build/vendor/brick/math/src/BigDecimal.php create mode 100644 build/vendor/brick/math/src/BigInteger.php create mode 100644 build/vendor/brick/math/src/BigNumber.php create mode 100644 build/vendor/brick/math/src/BigRational.php create mode 100644 build/vendor/brick/math/src/Exception/DivisionByZeroException.php create mode 100644 build/vendor/brick/math/src/Exception/IntegerOverflowException.php create mode 100644 build/vendor/brick/math/src/Exception/MathException.php create mode 100644 build/vendor/brick/math/src/Exception/NegativeNumberException.php create mode 100644 build/vendor/brick/math/src/Exception/NumberFormatException.php create mode 100644 build/vendor/brick/math/src/Exception/RoundingNecessaryException.php create mode 100644 build/vendor/brick/math/src/Internal/Calculator.php create mode 100644 build/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php create mode 100644 build/vendor/brick/math/src/Internal/Calculator/GmpCalculator.php create mode 100644 build/vendor/brick/math/src/Internal/Calculator/NativeCalculator.php create mode 100644 build/vendor/brick/math/src/RoundingMode.php create mode 100644 build/vendor/composer/ClassLoader.php create mode 100644 build/vendor/composer/InstalledVersions.php create mode 100644 build/vendor/composer/LICENSE create mode 100644 build/vendor/composer/autoload_classmap.php create mode 100644 build/vendor/composer/autoload_files.php create mode 100644 build/vendor/composer/autoload_namespaces.php create mode 100644 build/vendor/composer/autoload_psr4.php create mode 100644 build/vendor/composer/autoload_real.php create mode 100644 build/vendor/composer/autoload_static.php create mode 100644 build/vendor/composer/installed.json create mode 100644 build/vendor/composer/installed.php create mode 100644 build/vendor/composer/platform_check.php create mode 100644 build/vendor/psr/container/LICENSE create mode 100644 build/vendor/psr/container/src/ContainerExceptionInterface.php create mode 100644 build/vendor/psr/container/src/ContainerInterface.php create mode 100644 build/vendor/psr/container/src/NotFoundExceptionInterface.php create mode 100644 build/vendor/ramsey/collection/LICENSE create mode 100644 build/vendor/ramsey/collection/src/AbstractArray.php create mode 100644 build/vendor/ramsey/collection/src/AbstractCollection.php create mode 100644 build/vendor/ramsey/collection/src/AbstractSet.php create mode 100644 build/vendor/ramsey/collection/src/ArrayInterface.php create mode 100644 build/vendor/ramsey/collection/src/Collection.php create mode 100644 build/vendor/ramsey/collection/src/CollectionInterface.php create mode 100644 build/vendor/ramsey/collection/src/DoubleEndedQueue.php create mode 100644 build/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php create mode 100644 build/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php create mode 100644 build/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php create mode 100644 build/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php create mode 100644 build/vendor/ramsey/collection/src/Exception/NoSuchElementException.php create mode 100644 build/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php create mode 100644 build/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php create mode 100644 build/vendor/ramsey/collection/src/Exception/ValueExtractionException.php create mode 100644 build/vendor/ramsey/collection/src/GenericArray.php create mode 100644 build/vendor/ramsey/collection/src/Map/AbstractMap.php create mode 100644 build/vendor/ramsey/collection/src/Map/AbstractTypedMap.php create mode 100644 build/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php create mode 100644 build/vendor/ramsey/collection/src/Map/MapInterface.php create mode 100644 build/vendor/ramsey/collection/src/Map/NamedParameterMap.php create mode 100644 build/vendor/ramsey/collection/src/Map/TypedMap.php create mode 100644 build/vendor/ramsey/collection/src/Map/TypedMapInterface.php create mode 100644 build/vendor/ramsey/collection/src/Queue.php create mode 100644 build/vendor/ramsey/collection/src/QueueInterface.php create mode 100644 build/vendor/ramsey/collection/src/Set.php create mode 100644 build/vendor/ramsey/collection/src/Tool/TypeTrait.php create mode 100644 build/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php create mode 100644 build/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php create mode 100644 build/vendor/ramsey/uuid/LICENSE create mode 100644 build/vendor/ramsey/uuid/src/BinaryUtils.php create mode 100644 build/vendor/ramsey/uuid/src/Builder/BuilderCollection.php create mode 100644 build/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php create mode 100644 build/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php create mode 100644 build/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php create mode 100644 build/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Codec/CodecInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php create mode 100644 build/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php create mode 100644 build/vendor/ramsey/uuid/src/Codec/StringCodec.php create mode 100644 build/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php create mode 100644 build/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php create mode 100644 build/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php create mode 100644 build/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php create mode 100644 build/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php create mode 100644 build/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php create mode 100644 build/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php create mode 100644 build/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php create mode 100644 build/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php create mode 100644 build/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php create mode 100644 build/vendor/ramsey/uuid/src/DegradedUuid.php create mode 100644 build/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php create mode 100644 build/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/DateTimeException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/DceSecurityException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/NameException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/NodeException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/RandomSourceException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/TimeSourceException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php create mode 100644 build/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php create mode 100644 build/vendor/ramsey/uuid/src/FeatureSet.php create mode 100644 build/vendor/ramsey/uuid/src/Fields/FieldsInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/CombGenerator.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php create mode 100644 build/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Guid/Fields.php create mode 100644 build/vendor/ramsey/uuid/src/Guid/Guid.php create mode 100644 build/vendor/ramsey/uuid/src/Guid/GuidBuilder.php create mode 100644 build/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php create mode 100644 build/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php create mode 100644 build/vendor/ramsey/uuid/src/Math/CalculatorInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Math/RoundingMode.php create mode 100644 build/vendor/ramsey/uuid/src/Nonstandard/Fields.php create mode 100644 build/vendor/ramsey/uuid/src/Nonstandard/Uuid.php create mode 100644 build/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php create mode 100644 build/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php create mode 100644 build/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/Fields.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/Validator.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php create mode 100644 build/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php create mode 100644 build/vendor/ramsey/uuid/src/Type/Decimal.php create mode 100644 build/vendor/ramsey/uuid/src/Type/Hexadecimal.php create mode 100644 build/vendor/ramsey/uuid/src/Type/Integer.php create mode 100644 build/vendor/ramsey/uuid/src/Type/NumberInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Type/Time.php create mode 100644 build/vendor/ramsey/uuid/src/Type/TypeInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Uuid.php create mode 100644 build/vendor/ramsey/uuid/src/UuidFactory.php create mode 100644 build/vendor/ramsey/uuid/src/UuidFactoryInterface.php create mode 100644 build/vendor/ramsey/uuid/src/UuidInterface.php create mode 100644 build/vendor/ramsey/uuid/src/Validator/GenericValidator.php create mode 100644 build/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php create mode 100644 build/vendor/ramsey/uuid/src/functions.php create mode 100644 build/vendor/scoper-autoload.php create mode 100644 build/vendor/spatie/backtrace/src/Backtrace.php create mode 100644 build/vendor/spatie/backtrace/src/CodeSnippet.php create mode 100644 build/vendor/spatie/backtrace/src/File.php create mode 100644 build/vendor/spatie/backtrace/src/Frame.php create mode 100644 build/vendor/spatie/macroable/src/Macroable.php create mode 100644 build/vendor/spatie/ray/rector.php create mode 100644 build/vendor/spatie/ray/src/ArgumentConverter.php create mode 100644 build/vendor/spatie/ray/src/Client.php create mode 100644 build/vendor/spatie/ray/src/Concerns/RayColors.php create mode 100644 build/vendor/spatie/ray/src/Concerns/RaySizes.php create mode 100644 build/vendor/spatie/ray/src/Concerns/RemovesRayFrames.php create mode 100644 build/vendor/spatie/ray/src/Exceptions/CouldNotConnectToRay.php create mode 100644 build/vendor/spatie/ray/src/Exceptions/StopExecutionRequested.php create mode 100644 build/vendor/spatie/ray/src/Origin/DefaultOriginFactory.php create mode 100644 build/vendor/spatie/ray/src/Origin/Hostname.php create mode 100644 build/vendor/spatie/ray/src/Origin/Origin.php create mode 100644 build/vendor/spatie/ray/src/Origin/OriginFactory.php create mode 100644 build/vendor/spatie/ray/src/PayloadFactory.php create mode 100644 build/vendor/spatie/ray/src/Payloads/ApplicationLogPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/BoolPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/CallerPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/CarbonPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/ClearAllPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/ColorPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/CreateLockPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/CustomPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/DecodedJsonPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/ExceptionPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/FileContentsPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/HideAppPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/HidePayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/HtmlPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/ImagePayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/JsonStringPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/LogPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/MeasurePayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/NewScreenPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/NotifyPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/NullPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/Payload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/RemovePayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/ShowAppPayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/SizePayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/TablePayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/TracePayload.php create mode 100644 build/vendor/spatie/ray/src/Payloads/XmlPayload.php create mode 100644 build/vendor/spatie/ray/src/Ray.php create mode 100644 build/vendor/spatie/ray/src/Request.php create mode 100644 build/vendor/spatie/ray/src/Settings/Settings.php create mode 100644 build/vendor/spatie/ray/src/Settings/SettingsFactory.php create mode 100644 build/vendor/spatie/ray/src/Support/Counters.php create mode 100644 build/vendor/spatie/ray/src/helpers.php create mode 100644 build/vendor/symfony/polyfill-ctype/Ctype.php create mode 100644 build/vendor/symfony/polyfill-ctype/LICENSE create mode 100644 build/vendor/symfony/polyfill-ctype/bootstrap.php create mode 100644 build/vendor/symfony/polyfill-ctype/bootstrap80.php create mode 100644 build/vendor/symfony/polyfill-mbstring/LICENSE create mode 100644 build/vendor/symfony/polyfill-mbstring/Mbstring.php create mode 100644 build/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php create mode 100644 build/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php create mode 100644 build/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php create mode 100644 build/vendor/symfony/polyfill-mbstring/bootstrap.php create mode 100644 build/vendor/symfony/polyfill-mbstring/bootstrap80.php create mode 100644 build/vendor/symfony/polyfill-php80/LICENSE create mode 100644 build/vendor/symfony/polyfill-php80/Php80.php create mode 100644 build/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php create mode 100644 build/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php create mode 100644 build/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php create mode 100644 build/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php create mode 100644 build/vendor/symfony/polyfill-php80/bootstrap.php create mode 100644 build/vendor/symfony/service-contracts/Attribute/Required.php create mode 100644 build/vendor/symfony/service-contracts/LICENSE create mode 100644 build/vendor/symfony/service-contracts/ResetInterface.php create mode 100644 build/vendor/symfony/service-contracts/ServiceLocatorTrait.php create mode 100644 build/vendor/symfony/service-contracts/ServiceProviderInterface.php create mode 100644 build/vendor/symfony/service-contracts/ServiceSubscriberInterface.php create mode 100644 build/vendor/symfony/service-contracts/ServiceSubscriberTrait.php create mode 100644 build/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php create mode 100644 build/vendor/symfony/stopwatch/LICENSE create mode 100644 build/vendor/symfony/stopwatch/Section.php create mode 100644 build/vendor/symfony/stopwatch/Stopwatch.php create mode 100644 build/vendor/symfony/stopwatch/StopwatchEvent.php create mode 100644 build/vendor/symfony/stopwatch/StopwatchPeriod.php create mode 100644 build/vendor/symfony/var-dumper/Caster/AmqpCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/ArgsStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/Caster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/ClassStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/ConstStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/CutArrayStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/CutStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/DOMCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/DateCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/DoctrineCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/DsCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/DsPairStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/EnumStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/ExceptionCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/FrameStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/GmpCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/ImagineCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/ImgStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/IntlCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/LinkStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/MemcachedCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/PdoCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/PgSqlCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/RedisCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/ReflectionCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/ResourceCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/SplCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/StubCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/SymfonyCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/TraceStub.php create mode 100644 build/vendor/symfony/var-dumper/Caster/UuidCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php create mode 100644 build/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php create mode 100644 build/vendor/symfony/var-dumper/Cloner/AbstractCloner.php create mode 100644 build/vendor/symfony/var-dumper/Cloner/ClonerInterface.php create mode 100644 build/vendor/symfony/var-dumper/Cloner/Cursor.php create mode 100644 build/vendor/symfony/var-dumper/Cloner/Data.php create mode 100644 build/vendor/symfony/var-dumper/Cloner/DumperInterface.php create mode 100644 build/vendor/symfony/var-dumper/Cloner/Stub.php create mode 100644 build/vendor/symfony/var-dumper/Cloner/VarCloner.php create mode 100644 build/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php create mode 100644 build/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php create mode 100644 build/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php create mode 100644 build/vendor/symfony/var-dumper/Command/ServerDumpCommand.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/AbstractDumper.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/CliDumper.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/HtmlDumper.php create mode 100644 build/vendor/symfony/var-dumper/Dumper/ServerDumper.php create mode 100644 build/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php create mode 100644 build/vendor/symfony/var-dumper/LICENSE create mode 100644 build/vendor/symfony/var-dumper/Resources/bin/var-dump-server create mode 100644 build/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css create mode 100644 build/vendor/symfony/var-dumper/Resources/functions/dump.php create mode 100644 build/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js create mode 100644 build/vendor/symfony/var-dumper/Server/Connection.php create mode 100644 build/vendor/symfony/var-dumper/Server/DumpServer.php create mode 100644 build/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php create mode 100644 build/vendor/symfony/var-dumper/VarDumper.php diff --git a/build/composer.json b/build/composer.json new file mode 100644 index 0000000..8df2801 --- /dev/null +++ b/build/composer.json @@ -0,0 +1 @@ +{"name":"cuyz\/global-ray","description":"Use Ray in any PHP script without requiring it in your projects.","authors":[{"name":"Romain Canon","email":"romain.hydrocanon@gmail.com"}],"require":{"spatie\/ray":"^1.0"},"scripts":{"refresh":["rm -rf build","bin\/php-scoper.phar add-prefix --force --output-dir=build_tmp","composer dump-autoload --optimize --no-scripts --classmap-authoritative --working-dir=build_tmp","php tests\/test.php","mv build_tmp build"]},"config":{"autoloader-suffix":"RayGlobalScoped"}} \ No newline at end of file diff --git a/build/vendor/autoload.php b/build/vendor/autoload.php new file mode 100644 index 0000000..d119984 --- /dev/null +++ b/build/vendor/autoload.php @@ -0,0 +1,7 @@ +gmp = new \RayGlobalScoped\Brick\Math\Internal\Calculator\GmpCalculator(); + $this->bcmath = new \RayGlobalScoped\Brick\Math\Internal\Calculator\BcMathCalculator(); + $this->native = new \RayGlobalScoped\Brick\Math\Internal\Calculator\NativeCalculator(); + $this->maxDigits = $maxDigits; + } + public function __invoke() : void + { + for (;;) { + $a = $this->generateRandomNumber(); + $b = $this->generateRandomNumber(); + $c = $this->generateRandomNumber(); + $this->runTests($a, $b); + $this->runTests($b, $a); + if ($a !== '0') { + $this->runTests("-{$a}", $b); + $this->runTests($b, "-{$a}"); + } + if ($b !== '0') { + $this->runTests($a, "-{$b}"); + $this->runTests("-{$b}", $a); + } + if ($a !== '0' && $b !== '0') { + $this->runTests("-{$a}", "-{$b}"); + $this->runTests("-{$b}", "-{$a}"); + } + if ($c !== '0') { + $this->test("{$a} POW {$b} MOD {$c}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $calc) use($a, $b, $c) { + return $calc->modPow($a, $b, $c); + }); + } + } + } + /** + * @param string $a The left operand. + * @param string $b The right operand. + */ + private function runTests(string $a, string $b) : void + { + $this->test("{$a} + {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->add($a, $b); + }); + $this->test("{$a} - {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->sub($a, $b); + }); + $this->test("{$a} * {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->mul($a, $b); + }); + if ($b !== '0') { + $this->test("{$a} / {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->divQR($a, $b); + }); + $this->test("{$a} MOD {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->mod($a, $b); + }); + } + if ($b !== '0' && $b[0] !== '-') { + $this->test("INV {$a} MOD {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->modInverse($a, $b); + }); + } + $this->test("GCD {$a}, {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->gcd($a, $b); + }); + if ($a[0] !== '-') { + $this->test("SQRT {$a}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->sqrt($a); + }); + } + $this->test("{$a} AND {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->and($a, $b); + }); + $this->test("{$a} OR {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->or($a, $b); + }); + $this->test("{$a} XOR {$b}", function (\RayGlobalScoped\Brick\Math\Internal\Calculator $c) use($a, $b) { + return $c->xor($a, $b); + }); + } + /** + * @param string $test A string representing the test being executed. + * @param Closure $callback A callback function accepting a Calculator instance and returning a calculation result. + */ + private function test(string $test, \Closure $callback) : void + { + static $testCounter = 0; + static $lastOutputTime = 0.0; + static $currentSecond = 0; + static $currentSecondTestCounter = 0; + static $testsPerSecond = 0; + $gmpResult = $callback($this->gmp); + $bcmathResult = $callback($this->bcmath); + $nativeResult = $callback($this->native); + if ($gmpResult !== $bcmathResult) { + self::failure('GMP', 'BCMath', $test); + } + if ($gmpResult !== $nativeResult) { + self::failure('GMP', 'Native', $test); + } + $testCounter++; + $currentSecondTestCounter++; + $time = \microtime(\true); + $second = (int) $time; + if ($second !== $currentSecond) { + $currentSecond = $second; + $testsPerSecond = $currentSecondTestCounter; + $currentSecondTestCounter = 0; + } + if ($time - $lastOutputTime >= 0.1) { + echo "\r", \number_format($testCounter), ' (', \number_format($testsPerSecond) . ' / s)'; + $lastOutputTime = $time; + } + } + /** + * @param string $c1 The name of the first calculator. + * @param string $c2 The name of the second calculator. + * @param string $test A string representing the test being executed. + */ + private static function failure(string $c1, string $c2, string $test) : void + { + echo \PHP_EOL; + echo 'FAILURE!', \PHP_EOL; + echo $c1, ' vs ', $c2, \PHP_EOL; + echo $test, \PHP_EOL; + die; + } + private function generateRandomNumber() : string + { + $length = \random_int(1, $this->maxDigits); + $number = ''; + for ($i = 0; $i < $length; $i++) { + $number .= \random_int(0, 9); + } + $number = \ltrim($number, '0'); + if ($number === '') { + return '0'; + } + return $number; + } +})(); diff --git a/build/vendor/brick/math/src/BigDecimal.php b/build/vendor/brick/math/src/BigDecimal.php new file mode 100644 index 0000000..e3f093b --- /dev/null +++ b/build/vendor/brick/math/src/BigDecimal.php @@ -0,0 +1,717 @@ +value = $value; + $this->scale = $scale; + } + /** + * Creates a BigDecimal of the given value. + * + * @param BigNumber|int|float|string $value + * + * @return BigDecimal + * + * @throws MathException If the value cannot be converted to a BigDecimal. + * + * @psalm-pure + */ + public static function of($value) : \RayGlobalScoped\Brick\Math\BigNumber + { + return parent::of($value)->toBigDecimal(); + } + /** + * Creates a BigDecimal from an unscaled value and a scale. + * + * Example: `(12345, 3)` will result in the BigDecimal `12.345`. + * + * @param BigNumber|int|float|string $value The unscaled value. Must be convertible to a BigInteger. + * @param int $scale The scale of the number, positive or zero. + * + * @return BigDecimal + * + * @throws \InvalidArgumentException If the scale is negative. + * + * @psalm-pure + */ + public static function ofUnscaledValue($value, int $scale = 0) : \RayGlobalScoped\Brick\Math\BigDecimal + { + if ($scale < 0) { + throw new \InvalidArgumentException('The scale cannot be negative.'); + } + return new \RayGlobalScoped\Brick\Math\BigDecimal((string) \RayGlobalScoped\Brick\Math\BigInteger::of($value), $scale); + } + /** + * Returns a BigDecimal representing zero, with a scale of zero. + * + * @return BigDecimal + * + * @psalm-pure + */ + public static function zero() : \RayGlobalScoped\Brick\Math\BigDecimal + { + /** + * @psalm-suppress ImpureStaticVariable + * @var BigDecimal|null $zero + */ + static $zero; + if ($zero === null) { + $zero = new \RayGlobalScoped\Brick\Math\BigDecimal('0'); + } + return $zero; + } + /** + * Returns a BigDecimal representing one, with a scale of zero. + * + * @return BigDecimal + * + * @psalm-pure + */ + public static function one() : \RayGlobalScoped\Brick\Math\BigDecimal + { + /** + * @psalm-suppress ImpureStaticVariable + * @var BigDecimal|null $one + */ + static $one; + if ($one === null) { + $one = new \RayGlobalScoped\Brick\Math\BigDecimal('1'); + } + return $one; + } + /** + * Returns a BigDecimal representing ten, with a scale of zero. + * + * @return BigDecimal + * + * @psalm-pure + */ + public static function ten() : \RayGlobalScoped\Brick\Math\BigDecimal + { + /** + * @psalm-suppress ImpureStaticVariable + * @var BigDecimal|null $ten + */ + static $ten; + if ($ten === null) { + $ten = new \RayGlobalScoped\Brick\Math\BigDecimal('10'); + } + return $ten; + } + /** + * Returns the sum of this number and the given one. + * + * The result has a scale of `max($this->scale, $that->scale)`. + * + * @param BigNumber|int|float|string $that The number to add. Must be convertible to a BigDecimal. + * + * @return BigDecimal The result. + * + * @throws MathException If the number is not valid, or is not convertible to a BigDecimal. + */ + public function plus($that) : \RayGlobalScoped\Brick\Math\BigDecimal + { + $that = \RayGlobalScoped\Brick\Math\BigDecimal::of($that); + if ($that->value === '0' && $that->scale <= $this->scale) { + return $this; + } + if ($this->value === '0' && $this->scale <= $that->scale) { + return $that; + } + [$a, $b] = $this->scaleValues($this, $that); + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->add($a, $b); + $scale = $this->scale > $that->scale ? $this->scale : $that->scale; + return new \RayGlobalScoped\Brick\Math\BigDecimal($value, $scale); + } + /** + * Returns the difference of this number and the given one. + * + * The result has a scale of `max($this->scale, $that->scale)`. + * + * @param BigNumber|int|float|string $that The number to subtract. Must be convertible to a BigDecimal. + * + * @return BigDecimal The result. + * + * @throws MathException If the number is not valid, or is not convertible to a BigDecimal. + */ + public function minus($that) : \RayGlobalScoped\Brick\Math\BigDecimal + { + $that = \RayGlobalScoped\Brick\Math\BigDecimal::of($that); + if ($that->value === '0' && $that->scale <= $this->scale) { + return $this; + } + [$a, $b] = $this->scaleValues($this, $that); + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->sub($a, $b); + $scale = $this->scale > $that->scale ? $this->scale : $that->scale; + return new \RayGlobalScoped\Brick\Math\BigDecimal($value, $scale); + } + /** + * Returns the product of this number and the given one. + * + * The result has a scale of `$this->scale + $that->scale`. + * + * @param BigNumber|int|float|string $that The multiplier. Must be convertible to a BigDecimal. + * + * @return BigDecimal The result. + * + * @throws MathException If the multiplier is not a valid number, or is not convertible to a BigDecimal. + */ + public function multipliedBy($that) : \RayGlobalScoped\Brick\Math\BigDecimal + { + $that = \RayGlobalScoped\Brick\Math\BigDecimal::of($that); + if ($that->value === '1' && $that->scale === 0) { + return $this; + } + if ($this->value === '1' && $this->scale === 0) { + return $that; + } + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->mul($this->value, $that->value); + $scale = $this->scale + $that->scale; + return new \RayGlobalScoped\Brick\Math\BigDecimal($value, $scale); + } + /** + * Returns the result of the division of this number by the given one, at the given scale. + * + * @param BigNumber|int|float|string $that The divisor. + * @param int|null $scale The desired scale, or null to use the scale of this number. + * @param int $roundingMode An optional rounding mode. + * + * @return BigDecimal + * + * @throws \InvalidArgumentException If the scale or rounding mode is invalid. + * @throws MathException If the number is invalid, is zero, or rounding was necessary. + */ + public function dividedBy($that, ?int $scale = null, int $roundingMode = \RayGlobalScoped\Brick\Math\RoundingMode::UNNECESSARY) : \RayGlobalScoped\Brick\Math\BigDecimal + { + $that = \RayGlobalScoped\Brick\Math\BigDecimal::of($that); + if ($that->isZero()) { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::divisionByZero(); + } + if ($scale === null) { + $scale = $this->scale; + } elseif ($scale < 0) { + throw new \InvalidArgumentException('Scale cannot be negative.'); + } + if ($that->value === '1' && $that->scale === 0 && $scale === $this->scale) { + return $this; + } + $p = $this->valueWithMinScale($that->scale + $scale); + $q = $that->valueWithMinScale($this->scale - $scale); + $result = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->divRound($p, $q, $roundingMode); + return new \RayGlobalScoped\Brick\Math\BigDecimal($result, $scale); + } + /** + * Returns the exact result of the division of this number by the given one. + * + * The scale of the result is automatically calculated to fit all the fraction digits. + * + * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. + * + * @return BigDecimal The result. + * + * @throws MathException If the divisor is not a valid number, is not convertible to a BigDecimal, is zero, + * or the result yields an infinite number of digits. + */ + public function exactlyDividedBy($that) : \RayGlobalScoped\Brick\Math\BigDecimal + { + $that = \RayGlobalScoped\Brick\Math\BigDecimal::of($that); + if ($that->value === '0') { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::divisionByZero(); + } + [, $b] = $this->scaleValues($this, $that); + $d = \rtrim($b, '0'); + $scale = \strlen($b) - \strlen($d); + $calculator = \RayGlobalScoped\Brick\Math\Internal\Calculator::get(); + foreach ([5, 2] as $prime) { + for (;;) { + $lastDigit = (int) $d[-1]; + if ($lastDigit % $prime !== 0) { + break; + } + $d = $calculator->divQ($d, (string) $prime); + $scale++; + } + } + return $this->dividedBy($that, $scale)->stripTrailingZeros(); + } + /** + * Returns this number exponentiated to the given value. + * + * The result has a scale of `$this->scale * $exponent`. + * + * @param int $exponent The exponent. + * + * @return BigDecimal The result. + * + * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000. + */ + public function power(int $exponent) : \RayGlobalScoped\Brick\Math\BigDecimal + { + if ($exponent === 0) { + return \RayGlobalScoped\Brick\Math\BigDecimal::one(); + } + if ($exponent === 1) { + return $this; + } + if ($exponent < 0 || $exponent > \RayGlobalScoped\Brick\Math\Internal\Calculator::MAX_POWER) { + throw new \InvalidArgumentException(\sprintf('The exponent %d is not in the range 0 to %d.', $exponent, \RayGlobalScoped\Brick\Math\Internal\Calculator::MAX_POWER)); + } + return new \RayGlobalScoped\Brick\Math\BigDecimal(\RayGlobalScoped\Brick\Math\Internal\Calculator::get()->pow($this->value, $exponent), $this->scale * $exponent); + } + /** + * Returns the quotient of the division of this number by this given one. + * + * The quotient has a scale of `0`. + * + * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. + * + * @return BigDecimal The quotient. + * + * @throws MathException If the divisor is not a valid decimal number, or is zero. + */ + public function quotient($that) : \RayGlobalScoped\Brick\Math\BigDecimal + { + $that = \RayGlobalScoped\Brick\Math\BigDecimal::of($that); + if ($that->isZero()) { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::divisionByZero(); + } + $p = $this->valueWithMinScale($that->scale); + $q = $that->valueWithMinScale($this->scale); + $quotient = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->divQ($p, $q); + return new \RayGlobalScoped\Brick\Math\BigDecimal($quotient, 0); + } + /** + * Returns the remainder of the division of this number by this given one. + * + * The remainder has a scale of `max($this->scale, $that->scale)`. + * + * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. + * + * @return BigDecimal The remainder. + * + * @throws MathException If the divisor is not a valid decimal number, or is zero. + */ + public function remainder($that) : \RayGlobalScoped\Brick\Math\BigDecimal + { + $that = \RayGlobalScoped\Brick\Math\BigDecimal::of($that); + if ($that->isZero()) { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::divisionByZero(); + } + $p = $this->valueWithMinScale($that->scale); + $q = $that->valueWithMinScale($this->scale); + $remainder = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->divR($p, $q); + $scale = $this->scale > $that->scale ? $this->scale : $that->scale; + return new \RayGlobalScoped\Brick\Math\BigDecimal($remainder, $scale); + } + /** + * Returns the quotient and remainder of the division of this number by the given one. + * + * The quotient has a scale of `0`, and the remainder has a scale of `max($this->scale, $that->scale)`. + * + * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. + * + * @return BigDecimal[] An array containing the quotient and the remainder. + * + * @throws MathException If the divisor is not a valid decimal number, or is zero. + */ + public function quotientAndRemainder($that) : array + { + $that = \RayGlobalScoped\Brick\Math\BigDecimal::of($that); + if ($that->isZero()) { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::divisionByZero(); + } + $p = $this->valueWithMinScale($that->scale); + $q = $that->valueWithMinScale($this->scale); + [$quotient, $remainder] = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->divQR($p, $q); + $scale = $this->scale > $that->scale ? $this->scale : $that->scale; + $quotient = new \RayGlobalScoped\Brick\Math\BigDecimal($quotient, 0); + $remainder = new \RayGlobalScoped\Brick\Math\BigDecimal($remainder, $scale); + return [$quotient, $remainder]; + } + /** + * Returns the square root of this number, rounded down to the given number of decimals. + * + * @param int $scale + * + * @return BigDecimal + * + * @throws \InvalidArgumentException If the scale is negative. + * @throws NegativeNumberException If this number is negative. + */ + public function sqrt(int $scale) : \RayGlobalScoped\Brick\Math\BigDecimal + { + if ($scale < 0) { + throw new \InvalidArgumentException('Scale cannot be negative.'); + } + if ($this->value === '0') { + return new \RayGlobalScoped\Brick\Math\BigDecimal('0', $scale); + } + if ($this->value[0] === '-') { + throw new \RayGlobalScoped\Brick\Math\Exception\NegativeNumberException('Cannot calculate the square root of a negative number.'); + } + $value = $this->value; + $addDigits = 2 * $scale - $this->scale; + if ($addDigits > 0) { + // add zeros + $value .= \str_repeat('0', $addDigits); + } elseif ($addDigits < 0) { + // trim digits + if (-$addDigits >= \strlen($this->value)) { + // requesting a scale too low, will always yield a zero result + return new \RayGlobalScoped\Brick\Math\BigDecimal('0', $scale); + } + $value = \substr($value, 0, $addDigits); + } + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->sqrt($value); + return new \RayGlobalScoped\Brick\Math\BigDecimal($value, $scale); + } + /** + * Returns a copy of this BigDecimal with the decimal point moved $n places to the left. + * + * @param int $n + * + * @return BigDecimal + */ + public function withPointMovedLeft(int $n) : \RayGlobalScoped\Brick\Math\BigDecimal + { + if ($n === 0) { + return $this; + } + if ($n < 0) { + return $this->withPointMovedRight(-$n); + } + return new \RayGlobalScoped\Brick\Math\BigDecimal($this->value, $this->scale + $n); + } + /** + * Returns a copy of this BigDecimal with the decimal point moved $n places to the right. + * + * @param int $n + * + * @return BigDecimal + */ + public function withPointMovedRight(int $n) : \RayGlobalScoped\Brick\Math\BigDecimal + { + if ($n === 0) { + return $this; + } + if ($n < 0) { + return $this->withPointMovedLeft(-$n); + } + $value = $this->value; + $scale = $this->scale - $n; + if ($scale < 0) { + if ($value !== '0') { + $value .= \str_repeat('0', -$scale); + } + $scale = 0; + } + return new \RayGlobalScoped\Brick\Math\BigDecimal($value, $scale); + } + /** + * Returns a copy of this BigDecimal with any trailing zeros removed from the fractional part. + * + * @return BigDecimal + */ + public function stripTrailingZeros() : \RayGlobalScoped\Brick\Math\BigDecimal + { + if ($this->scale === 0) { + return $this; + } + $trimmedValue = \rtrim($this->value, '0'); + if ($trimmedValue === '') { + return \RayGlobalScoped\Brick\Math\BigDecimal::zero(); + } + $trimmableZeros = \strlen($this->value) - \strlen($trimmedValue); + if ($trimmableZeros === 0) { + return $this; + } + if ($trimmableZeros > $this->scale) { + $trimmableZeros = $this->scale; + } + $value = \substr($this->value, 0, -$trimmableZeros); + $scale = $this->scale - $trimmableZeros; + return new \RayGlobalScoped\Brick\Math\BigDecimal($value, $scale); + } + /** + * Returns the absolute value of this number. + * + * @return BigDecimal + */ + public function abs() : \RayGlobalScoped\Brick\Math\BigDecimal + { + return $this->isNegative() ? $this->negated() : $this; + } + /** + * Returns the negated value of this number. + * + * @return BigDecimal + */ + public function negated() : \RayGlobalScoped\Brick\Math\BigDecimal + { + return new \RayGlobalScoped\Brick\Math\BigDecimal(\RayGlobalScoped\Brick\Math\Internal\Calculator::get()->neg($this->value), $this->scale); + } + /** + * {@inheritdoc} + */ + public function compareTo($that) : int + { + $that = \RayGlobalScoped\Brick\Math\BigNumber::of($that); + if ($that instanceof \RayGlobalScoped\Brick\Math\BigInteger) { + $that = $that->toBigDecimal(); + } + if ($that instanceof \RayGlobalScoped\Brick\Math\BigDecimal) { + [$a, $b] = $this->scaleValues($this, $that); + return \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->cmp($a, $b); + } + return -$that->compareTo($this); + } + /** + * {@inheritdoc} + */ + public function getSign() : int + { + return $this->value === '0' ? 0 : ($this->value[0] === '-' ? -1 : 1); + } + /** + * @return BigInteger + */ + public function getUnscaledValue() : \RayGlobalScoped\Brick\Math\BigInteger + { + return \RayGlobalScoped\Brick\Math\BigInteger::create($this->value); + } + /** + * @return int + */ + public function getScale() : int + { + return $this->scale; + } + /** + * Returns a string representing the integral part of this decimal number. + * + * Example: `-123.456` => `-123`. + * + * @return string + */ + public function getIntegralPart() : string + { + if ($this->scale === 0) { + return $this->value; + } + $value = $this->getUnscaledValueWithLeadingZeros(); + return \substr($value, 0, -$this->scale); + } + /** + * Returns a string representing the fractional part of this decimal number. + * + * If the scale is zero, an empty string is returned. + * + * Examples: `-123.456` => '456', `123` => ''. + * + * @return string + */ + public function getFractionalPart() : string + { + if ($this->scale === 0) { + return ''; + } + $value = $this->getUnscaledValueWithLeadingZeros(); + return \substr($value, -$this->scale); + } + /** + * Returns whether this decimal number has a non-zero fractional part. + * + * @return bool + */ + public function hasNonZeroFractionalPart() : bool + { + return $this->getFractionalPart() !== \str_repeat('0', $this->scale); + } + /** + * {@inheritdoc} + */ + public function toBigInteger() : \RayGlobalScoped\Brick\Math\BigInteger + { + $zeroScaleDecimal = $this->scale === 0 ? $this : $this->dividedBy(1, 0); + return \RayGlobalScoped\Brick\Math\BigInteger::create($zeroScaleDecimal->value); + } + /** + * {@inheritdoc} + */ + public function toBigDecimal() : \RayGlobalScoped\Brick\Math\BigDecimal + { + return $this; + } + /** + * {@inheritdoc} + */ + public function toBigRational() : \RayGlobalScoped\Brick\Math\BigRational + { + $numerator = \RayGlobalScoped\Brick\Math\BigInteger::create($this->value); + $denominator = \RayGlobalScoped\Brick\Math\BigInteger::create('1' . \str_repeat('0', $this->scale)); + return \RayGlobalScoped\Brick\Math\BigRational::create($numerator, $denominator, \false); + } + /** + * {@inheritdoc} + */ + public function toScale(int $scale, int $roundingMode = \RayGlobalScoped\Brick\Math\RoundingMode::UNNECESSARY) : \RayGlobalScoped\Brick\Math\BigDecimal + { + if ($scale === $this->scale) { + return $this; + } + return $this->dividedBy(\RayGlobalScoped\Brick\Math\BigDecimal::one(), $scale, $roundingMode); + } + /** + * {@inheritdoc} + */ + public function toInt() : int + { + return $this->toBigInteger()->toInt(); + } + /** + * {@inheritdoc} + */ + public function toFloat() : float + { + return (float) (string) $this; + } + /** + * {@inheritdoc} + */ + public function __toString() : string + { + if ($this->scale === 0) { + return $this->value; + } + $value = $this->getUnscaledValueWithLeadingZeros(); + return \substr($value, 0, -$this->scale) . '.' . \substr($value, -$this->scale); + } + /** + * This method is required by interface Serializable and SHOULD NOT be accessed directly. + * + * @internal + * + * @return string + */ + public function serialize() : string + { + return $this->value . ':' . $this->scale; + } + /** + * This method is only here to implement interface Serializable and cannot be accessed directly. + * + * @internal + * @psalm-suppress RedundantPropertyInitializationCheck + * + * @param string $value + * + * @return void + * + * @throws \LogicException + */ + public function unserialize($value) : void + { + if (isset($this->value)) { + throw new \LogicException('unserialize() is an internal function, it must not be called directly.'); + } + [$value, $scale] = \explode(':', $value); + $this->value = $value; + $this->scale = (int) $scale; + } + /** + * Puts the internal values of the given decimal numbers on the same scale. + * + * @param BigDecimal $x The first decimal number. + * @param BigDecimal $y The second decimal number. + * + * @return array{0: string, 1: string} The scaled integer values of $x and $y. + */ + private function scaleValues(\RayGlobalScoped\Brick\Math\BigDecimal $x, \RayGlobalScoped\Brick\Math\BigDecimal $y) : array + { + $a = $x->value; + $b = $y->value; + if ($b !== '0' && $x->scale > $y->scale) { + $b .= \str_repeat('0', $x->scale - $y->scale); + } elseif ($a !== '0' && $x->scale < $y->scale) { + $a .= \str_repeat('0', $y->scale - $x->scale); + } + return [$a, $b]; + } + /** + * @param int $scale + * + * @return string + */ + private function valueWithMinScale(int $scale) : string + { + $value = $this->value; + if ($this->value !== '0' && $scale > $this->scale) { + $value .= \str_repeat('0', $scale - $this->scale); + } + return $value; + } + /** + * Adds leading zeros if necessary to the unscaled value to represent the full decimal number. + * + * @return string + */ + private function getUnscaledValueWithLeadingZeros() : string + { + $value = $this->value; + $targetLength = $this->scale + 1; + $negative = $value[0] === '-'; + $length = \strlen($value); + if ($negative) { + $length--; + } + if ($length >= $targetLength) { + return $this->value; + } + if ($negative) { + $value = \substr($value, 1); + } + $value = \str_pad($value, $targetLength, '0', \STR_PAD_LEFT); + if ($negative) { + $value = '-' . $value; + } + return $value; + } +} diff --git a/build/vendor/brick/math/src/BigInteger.php b/build/vendor/brick/math/src/BigInteger.php new file mode 100644 index 0000000..131f62d --- /dev/null +++ b/build/vendor/brick/math/src/BigInteger.php @@ -0,0 +1,971 @@ +value = $value; + } + /** + * Creates a BigInteger of the given value. + * + * @param BigNumber|int|float|string $value + * + * @return BigInteger + * + * @throws MathException If the value cannot be converted to a BigInteger. + * + * @psalm-pure + */ + public static function of($value) : \RayGlobalScoped\Brick\Math\BigNumber + { + return parent::of($value)->toBigInteger(); + } + /** + * Creates a number from a string in a given base. + * + * The string can optionally be prefixed with the `+` or `-` sign. + * + * Bases greater than 36 are not supported by this method, as there is no clear consensus on which of the lowercase + * or uppercase characters should come first. Instead, this method accepts any base up to 36, and does not + * differentiate lowercase and uppercase characters, which are considered equal. + * + * For bases greater than 36, and/or custom alphabets, use the fromArbitraryBase() method. + * + * @param string $number The number to convert, in the given base. + * @param int $base The base of the number, between 2 and 36. + * + * @return BigInteger + * + * @throws NumberFormatException If the number is empty, or contains invalid chars for the given base. + * @throws \InvalidArgumentException If the base is out of range. + * + * @psalm-pure + */ + public static function fromBase(string $number, int $base) : \RayGlobalScoped\Brick\Math\BigInteger + { + if ($number === '') { + throw new \RayGlobalScoped\Brick\Math\Exception\NumberFormatException('The number cannot be empty.'); + } + if ($base < 2 || $base > 36) { + throw new \InvalidArgumentException(\sprintf('Base %d is not in range 2 to 36.', $base)); + } + if ($number[0] === '-') { + $sign = '-'; + $number = \substr($number, 1); + } elseif ($number[0] === '+') { + $sign = ''; + $number = \substr($number, 1); + } else { + $sign = ''; + } + if ($number === '') { + throw new \RayGlobalScoped\Brick\Math\Exception\NumberFormatException('The number cannot be empty.'); + } + $number = \ltrim($number, '0'); + if ($number === '') { + // The result will be the same in any base, avoid further calculation. + return \RayGlobalScoped\Brick\Math\BigInteger::zero(); + } + if ($number === '1') { + // The result will be the same in any base, avoid further calculation. + return new \RayGlobalScoped\Brick\Math\BigInteger($sign . '1'); + } + $pattern = '/[^' . \substr(\RayGlobalScoped\Brick\Math\Internal\Calculator::ALPHABET, 0, $base) . ']/'; + if (\preg_match($pattern, \strtolower($number), $matches) === 1) { + throw new \RayGlobalScoped\Brick\Math\Exception\NumberFormatException(\sprintf('"%s" is not a valid character in base %d.', $matches[0], $base)); + } + if ($base === 10) { + // The number is usable as is, avoid further calculation. + return new \RayGlobalScoped\Brick\Math\BigInteger($sign . $number); + } + $result = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->fromBase($number, $base); + return new \RayGlobalScoped\Brick\Math\BigInteger($sign . $result); + } + /** + * Parses a string containing an integer in an arbitrary base, using a custom alphabet. + * + * Because this method accepts an alphabet with any character, including dash, it does not handle negative numbers. + * + * @param string $number The number to parse. + * @param string $alphabet The alphabet, for example '01' for base 2, or '01234567' for base 8. + * + * @return BigInteger + * + * @throws NumberFormatException If the given number is empty or contains invalid chars for the given alphabet. + * @throws \InvalidArgumentException If the alphabet does not contain at least 2 chars. + * + * @psalm-pure + */ + public static function fromArbitraryBase(string $number, string $alphabet) : \RayGlobalScoped\Brick\Math\BigInteger + { + if ($number === '') { + throw new \RayGlobalScoped\Brick\Math\Exception\NumberFormatException('The number cannot be empty.'); + } + $base = \strlen($alphabet); + if ($base < 2) { + throw new \InvalidArgumentException('The alphabet must contain at least 2 chars.'); + } + $pattern = '/[^' . \preg_quote($alphabet, '/') . ']/'; + if (\preg_match($pattern, $number, $matches) === 1) { + throw \RayGlobalScoped\Brick\Math\Exception\NumberFormatException::charNotInAlphabet($matches[0]); + } + $number = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->fromArbitraryBase($number, $alphabet, $base); + return new \RayGlobalScoped\Brick\Math\BigInteger($number); + } + /** + * Translates a string of bytes containing the binary representation of a BigInteger into a BigInteger. + * + * The input string is assumed to be in big-endian byte-order: the most significant byte is in the zeroth element. + * + * If `$signed` is true, the input is assumed to be in two's-complement representation, and the leading bit is + * interpreted as a sign bit. If `$signed` is false, the input is interpreted as an unsigned number, and the + * resulting BigInteger will always be positive or zero. + * + * This method can be used to retrieve a number exported by `toBytes()`, as long as the `$signed` flags match. + * + * @param string $value The byte string. + * @param bool $signed Whether to interpret as a signed number in two's-complement representation with a leading + * sign bit. + * + * @return BigInteger + * + * @throws NumberFormatException If the string is empty. + */ + public static function fromBytes(string $value, bool $signed = \true) : \RayGlobalScoped\Brick\Math\BigInteger + { + if ($value === '') { + throw new \RayGlobalScoped\Brick\Math\Exception\NumberFormatException('The byte string must not be empty.'); + } + $twosComplement = \false; + if ($signed) { + $x = \ord($value[0]); + if ($twosComplement = $x >= 0x80) { + $value = ~$value; + } + } + $number = self::fromBase(\bin2hex($value), 16); + if ($twosComplement) { + return $number->plus(1)->negated(); + } + return $number; + } + /** + * Generates a pseudo-random number in the range 0 to 2^numBits - 1. + * + * Using the default random bytes generator, this method is suitable for cryptographic use. + * + * @psalm-param callable(int): string $randomBytesGenerator + * + * @param int $numBits The number of bits. + * @param callable|null $randomBytesGenerator A function that accepts a number of bytes as an integer, and returns a + * string of random bytes of the given length. Defaults to the + * `random_bytes()` function. + * + * @return BigInteger + * + * @throws \InvalidArgumentException If $numBits is negative. + */ + public static function randomBits(int $numBits, ?callable $randomBytesGenerator = null) : \RayGlobalScoped\Brick\Math\BigInteger + { + if ($numBits < 0) { + throw new \InvalidArgumentException('The number of bits cannot be negative.'); + } + if ($numBits === 0) { + return \RayGlobalScoped\Brick\Math\BigInteger::zero(); + } + if ($randomBytesGenerator === null) { + $randomBytesGenerator = 'random_bytes'; + } + $byteLength = \intdiv($numBits - 1, 8) + 1; + $extraBits = $byteLength * 8 - $numBits; + $bitmask = \chr(0xff >> $extraBits); + $randomBytes = $randomBytesGenerator($byteLength); + $randomBytes[0] = $randomBytes[0] & $bitmask; + return self::fromBytes($randomBytes, \false); + } + /** + * Generates a pseudo-random number between `$min` and `$max`. + * + * Using the default random bytes generator, this method is suitable for cryptographic use. + * + * @psalm-param (callable(int): string)|null $randomBytesGenerator + * + * @param BigNumber|int|float|string $min The lower bound. Must be convertible to a BigInteger. + * @param BigNumber|int|float|string $max The upper bound. Must be convertible to a BigInteger. + * @param callable|null $randomBytesGenerator A function that accepts a number of bytes as an integer, + * and returns a string of random bytes of the given length. + * Defaults to the `random_bytes()` function. + * + * @return BigInteger + * + * @throws MathException If one of the parameters cannot be converted to a BigInteger, + * or `$min` is greater than `$max`. + */ + public static function randomRange($min, $max, ?callable $randomBytesGenerator = null) : \RayGlobalScoped\Brick\Math\BigInteger + { + $min = \RayGlobalScoped\Brick\Math\BigInteger::of($min); + $max = \RayGlobalScoped\Brick\Math\BigInteger::of($max); + if ($min->isGreaterThan($max)) { + throw new \RayGlobalScoped\Brick\Math\Exception\MathException('$min cannot be greater than $max.'); + } + if ($min->isEqualTo($max)) { + return $min; + } + $diff = $max->minus($min); + $bitLength = $diff->getBitLength(); + // try until the number is in range (50% to 100% chance of success) + do { + $randomNumber = self::randomBits($bitLength, $randomBytesGenerator); + } while ($randomNumber->isGreaterThan($diff)); + return $randomNumber->plus($min); + } + /** + * Returns a BigInteger representing zero. + * + * @return BigInteger + * + * @psalm-pure + */ + public static function zero() : \RayGlobalScoped\Brick\Math\BigInteger + { + /** + * @psalm-suppress ImpureStaticVariable + * @var BigInteger|null $zero + */ + static $zero; + if ($zero === null) { + $zero = new \RayGlobalScoped\Brick\Math\BigInteger('0'); + } + return $zero; + } + /** + * Returns a BigInteger representing one. + * + * @return BigInteger + * + * @psalm-pure + */ + public static function one() : \RayGlobalScoped\Brick\Math\BigInteger + { + /** + * @psalm-suppress ImpureStaticVariable + * @var BigInteger|null $one + */ + static $one; + if ($one === null) { + $one = new \RayGlobalScoped\Brick\Math\BigInteger('1'); + } + return $one; + } + /** + * Returns a BigInteger representing ten. + * + * @return BigInteger + * + * @psalm-pure + */ + public static function ten() : \RayGlobalScoped\Brick\Math\BigInteger + { + /** + * @psalm-suppress ImpureStaticVariable + * @var BigInteger|null $ten + */ + static $ten; + if ($ten === null) { + $ten = new \RayGlobalScoped\Brick\Math\BigInteger('10'); + } + return $ten; + } + /** + * Returns the sum of this number and the given one. + * + * @param BigNumber|int|float|string $that The number to add. Must be convertible to a BigInteger. + * + * @return BigInteger The result. + * + * @throws MathException If the number is not valid, or is not convertible to a BigInteger. + */ + public function plus($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + if ($that->value === '0') { + return $this; + } + if ($this->value === '0') { + return $that; + } + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->add($this->value, $that->value); + return new \RayGlobalScoped\Brick\Math\BigInteger($value); + } + /** + * Returns the difference of this number and the given one. + * + * @param BigNumber|int|float|string $that The number to subtract. Must be convertible to a BigInteger. + * + * @return BigInteger The result. + * + * @throws MathException If the number is not valid, or is not convertible to a BigInteger. + */ + public function minus($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + if ($that->value === '0') { + return $this; + } + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->sub($this->value, $that->value); + return new \RayGlobalScoped\Brick\Math\BigInteger($value); + } + /** + * Returns the product of this number and the given one. + * + * @param BigNumber|int|float|string $that The multiplier. Must be convertible to a BigInteger. + * + * @return BigInteger The result. + * + * @throws MathException If the multiplier is not a valid number, or is not convertible to a BigInteger. + */ + public function multipliedBy($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + if ($that->value === '1') { + return $this; + } + if ($this->value === '1') { + return $that; + } + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->mul($this->value, $that->value); + return new \RayGlobalScoped\Brick\Math\BigInteger($value); + } + /** + * Returns the result of the division of this number by the given one. + * + * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. + * @param int $roundingMode An optional rounding mode. + * + * @return BigInteger The result. + * + * @throws MathException If the divisor is not a valid number, is not convertible to a BigInteger, is zero, + * or RoundingMode::UNNECESSARY is used and the remainder is not zero. + */ + public function dividedBy($that, int $roundingMode = \RayGlobalScoped\Brick\Math\RoundingMode::UNNECESSARY) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + if ($that->value === '1') { + return $this; + } + if ($that->value === '0') { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::divisionByZero(); + } + $result = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->divRound($this->value, $that->value, $roundingMode); + return new \RayGlobalScoped\Brick\Math\BigInteger($result); + } + /** + * Returns this number exponentiated to the given value. + * + * @param int $exponent The exponent. + * + * @return BigInteger The result. + * + * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000. + */ + public function power(int $exponent) : \RayGlobalScoped\Brick\Math\BigInteger + { + if ($exponent === 0) { + return \RayGlobalScoped\Brick\Math\BigInteger::one(); + } + if ($exponent === 1) { + return $this; + } + if ($exponent < 0 || $exponent > \RayGlobalScoped\Brick\Math\Internal\Calculator::MAX_POWER) { + throw new \InvalidArgumentException(\sprintf('The exponent %d is not in the range 0 to %d.', $exponent, \RayGlobalScoped\Brick\Math\Internal\Calculator::MAX_POWER)); + } + return new \RayGlobalScoped\Brick\Math\BigInteger(\RayGlobalScoped\Brick\Math\Internal\Calculator::get()->pow($this->value, $exponent)); + } + /** + * Returns the quotient of the division of this number by the given one. + * + * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. + * + * @return BigInteger + * + * @throws DivisionByZeroException If the divisor is zero. + */ + public function quotient($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + if ($that->value === '1') { + return $this; + } + if ($that->value === '0') { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::divisionByZero(); + } + $quotient = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->divQ($this->value, $that->value); + return new \RayGlobalScoped\Brick\Math\BigInteger($quotient); + } + /** + * Returns the remainder of the division of this number by the given one. + * + * The remainder, when non-zero, has the same sign as the dividend. + * + * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. + * + * @return BigInteger + * + * @throws DivisionByZeroException If the divisor is zero. + */ + public function remainder($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + if ($that->value === '1') { + return \RayGlobalScoped\Brick\Math\BigInteger::zero(); + } + if ($that->value === '0') { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::divisionByZero(); + } + $remainder = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->divR($this->value, $that->value); + return new \RayGlobalScoped\Brick\Math\BigInteger($remainder); + } + /** + * Returns the quotient and remainder of the division of this number by the given one. + * + * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. + * + * @return BigInteger[] An array containing the quotient and the remainder. + * + * @throws DivisionByZeroException If the divisor is zero. + */ + public function quotientAndRemainder($that) : array + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + if ($that->value === '0') { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::divisionByZero(); + } + [$quotient, $remainder] = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->divQR($this->value, $that->value); + return [new \RayGlobalScoped\Brick\Math\BigInteger($quotient), new \RayGlobalScoped\Brick\Math\BigInteger($remainder)]; + } + /** + * Returns the modulo of this number and the given one. + * + * The modulo operation yields the same result as the remainder operation when both operands are of the same sign, + * and may differ when signs are different. + * + * The result of the modulo operation, when non-zero, has the same sign as the divisor. + * + * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. + * + * @return BigInteger + * + * @throws DivisionByZeroException If the divisor is zero. + */ + public function mod($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + if ($that->value === '0') { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::modulusMustNotBeZero(); + } + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->mod($this->value, $that->value); + return new \RayGlobalScoped\Brick\Math\BigInteger($value); + } + /** + * Returns the modular multiplicative inverse of this BigInteger modulo $m. + * + * @param BigInteger $m + * + * @return BigInteger + * + * @throws DivisionByZeroException If $m is zero. + * @throws NegativeNumberException If $m is negative. + * @throws MathException If this BigInteger has no multiplicative inverse mod m (that is, this BigInteger + * is not relatively prime to m). + */ + public function modInverse(\RayGlobalScoped\Brick\Math\BigInteger $m) : \RayGlobalScoped\Brick\Math\BigInteger + { + if ($m->value === '0') { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::modulusMustNotBeZero(); + } + if ($m->isNegative()) { + throw new \RayGlobalScoped\Brick\Math\Exception\NegativeNumberException('Modulus must not be negative.'); + } + if ($m->value === '1') { + return \RayGlobalScoped\Brick\Math\BigInteger::zero(); + } + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->modInverse($this->value, $m->value); + if ($value === null) { + throw new \RayGlobalScoped\Brick\Math\Exception\MathException('Unable to compute the modInverse for the given modulus.'); + } + return new \RayGlobalScoped\Brick\Math\BigInteger($value); + } + /** + * Returns this number raised into power with modulo. + * + * This operation only works on positive numbers. + * + * @param BigNumber|int|float|string $exp The exponent. Must be positive or zero. + * @param BigNumber|int|float|string $mod The modulus. Must be strictly positive. + * + * @return BigInteger + * + * @throws NegativeNumberException If any of the operands is negative. + * @throws DivisionByZeroException If the modulus is zero. + */ + public function modPow($exp, $mod) : \RayGlobalScoped\Brick\Math\BigInteger + { + $exp = \RayGlobalScoped\Brick\Math\BigInteger::of($exp); + $mod = \RayGlobalScoped\Brick\Math\BigInteger::of($mod); + if ($this->isNegative() || $exp->isNegative() || $mod->isNegative()) { + throw new \RayGlobalScoped\Brick\Math\Exception\NegativeNumberException('The operands cannot be negative.'); + } + if ($mod->isZero()) { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::modulusMustNotBeZero(); + } + $result = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->modPow($this->value, $exp->value, $mod->value); + return new \RayGlobalScoped\Brick\Math\BigInteger($result); + } + /** + * Returns the greatest common divisor of this number and the given one. + * + * The GCD is always positive, unless both operands are zero, in which case it is zero. + * + * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. + * + * @return BigInteger + */ + public function gcd($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + if ($that->value === '0' && $this->value[0] !== '-') { + return $this; + } + if ($this->value === '0' && $that->value[0] !== '-') { + return $that; + } + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->gcd($this->value, $that->value); + return new \RayGlobalScoped\Brick\Math\BigInteger($value); + } + /** + * Returns the integer square root number of this number, rounded down. + * + * The result is the largest x such that x² ≤ n. + * + * @return BigInteger + * + * @throws NegativeNumberException If this number is negative. + */ + public function sqrt() : \RayGlobalScoped\Brick\Math\BigInteger + { + if ($this->value[0] === '-') { + throw new \RayGlobalScoped\Brick\Math\Exception\NegativeNumberException('Cannot calculate the square root of a negative number.'); + } + $value = \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->sqrt($this->value); + return new \RayGlobalScoped\Brick\Math\BigInteger($value); + } + /** + * Returns the absolute value of this number. + * + * @return BigInteger + */ + public function abs() : \RayGlobalScoped\Brick\Math\BigInteger + { + return $this->isNegative() ? $this->negated() : $this; + } + /** + * Returns the inverse of this number. + * + * @return BigInteger + */ + public function negated() : \RayGlobalScoped\Brick\Math\BigInteger + { + return new \RayGlobalScoped\Brick\Math\BigInteger(\RayGlobalScoped\Brick\Math\Internal\Calculator::get()->neg($this->value)); + } + /** + * Returns the integer bitwise-and combined with another integer. + * + * This method returns a negative BigInteger if and only if both operands are negative. + * + * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. + * + * @return BigInteger + */ + public function and($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + return new \RayGlobalScoped\Brick\Math\BigInteger(\RayGlobalScoped\Brick\Math\Internal\Calculator::get()->and($this->value, $that->value)); + } + /** + * Returns the integer bitwise-or combined with another integer. + * + * This method returns a negative BigInteger if and only if either of the operands is negative. + * + * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. + * + * @return BigInteger + */ + public function or($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + return new \RayGlobalScoped\Brick\Math\BigInteger(\RayGlobalScoped\Brick\Math\Internal\Calculator::get()->or($this->value, $that->value)); + } + /** + * Returns the integer bitwise-xor combined with another integer. + * + * This method returns a negative BigInteger if and only if exactly one of the operands is negative. + * + * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. + * + * @return BigInteger + */ + public function xor($that) : \RayGlobalScoped\Brick\Math\BigInteger + { + $that = \RayGlobalScoped\Brick\Math\BigInteger::of($that); + return new \RayGlobalScoped\Brick\Math\BigInteger(\RayGlobalScoped\Brick\Math\Internal\Calculator::get()->xor($this->value, $that->value)); + } + /** + * Returns the bitwise-not of this BigInteger. + * + * @return BigInteger + */ + public function not() : \RayGlobalScoped\Brick\Math\BigInteger + { + return $this->negated()->minus(1); + } + /** + * Returns the integer left shifted by a given number of bits. + * + * @param int $distance The distance to shift. + * + * @return BigInteger + */ + public function shiftedLeft(int $distance) : \RayGlobalScoped\Brick\Math\BigInteger + { + if ($distance === 0) { + return $this; + } + if ($distance < 0) { + return $this->shiftedRight(-$distance); + } + return $this->multipliedBy(\RayGlobalScoped\Brick\Math\BigInteger::of(2)->power($distance)); + } + /** + * Returns the integer right shifted by a given number of bits. + * + * @param int $distance The distance to shift. + * + * @return BigInteger + */ + public function shiftedRight(int $distance) : \RayGlobalScoped\Brick\Math\BigInteger + { + if ($distance === 0) { + return $this; + } + if ($distance < 0) { + return $this->shiftedLeft(-$distance); + } + $operand = \RayGlobalScoped\Brick\Math\BigInteger::of(2)->power($distance); + if ($this->isPositiveOrZero()) { + return $this->quotient($operand); + } + return $this->dividedBy($operand, \RayGlobalScoped\Brick\Math\RoundingMode::UP); + } + /** + * Returns the number of bits in the minimal two's-complement representation of this BigInteger, excluding a sign bit. + * + * For positive BigIntegers, this is equivalent to the number of bits in the ordinary binary representation. + * Computes (ceil(log2(this < 0 ? -this : this+1))). + * + * @return int + */ + public function getBitLength() : int + { + if ($this->value === '0') { + return 0; + } + if ($this->isNegative()) { + return $this->abs()->minus(1)->getBitLength(); + } + return \strlen($this->toBase(2)); + } + /** + * Returns the index of the rightmost (lowest-order) one bit in this BigInteger. + * + * Returns -1 if this BigInteger contains no one bits. + * + * @return int + */ + public function getLowestSetBit() : int + { + $n = $this; + $bitLength = $this->getBitLength(); + for ($i = 0; $i <= $bitLength; $i++) { + if ($n->isOdd()) { + return $i; + } + $n = $n->shiftedRight(1); + } + return -1; + } + /** + * Returns whether this number is even. + * + * @return bool + */ + public function isEven() : bool + { + return \in_array($this->value[-1], ['0', '2', '4', '6', '8'], \true); + } + /** + * Returns whether this number is odd. + * + * @return bool + */ + public function isOdd() : bool + { + return \in_array($this->value[-1], ['1', '3', '5', '7', '9'], \true); + } + /** + * Returns true if and only if the designated bit is set. + * + * Computes ((this & (1<shiftedRight($n)->isOdd(); + } + /** + * {@inheritdoc} + */ + public function compareTo($that) : int + { + $that = \RayGlobalScoped\Brick\Math\BigNumber::of($that); + if ($that instanceof \RayGlobalScoped\Brick\Math\BigInteger) { + return \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->cmp($this->value, $that->value); + } + return -$that->compareTo($this); + } + /** + * {@inheritdoc} + */ + public function getSign() : int + { + return $this->value === '0' ? 0 : ($this->value[0] === '-' ? -1 : 1); + } + /** + * {@inheritdoc} + */ + public function toBigInteger() : \RayGlobalScoped\Brick\Math\BigInteger + { + return $this; + } + /** + * {@inheritdoc} + */ + public function toBigDecimal() : \RayGlobalScoped\Brick\Math\BigDecimal + { + return \RayGlobalScoped\Brick\Math\BigDecimal::create($this->value); + } + /** + * {@inheritdoc} + */ + public function toBigRational() : \RayGlobalScoped\Brick\Math\BigRational + { + return \RayGlobalScoped\Brick\Math\BigRational::create($this, \RayGlobalScoped\Brick\Math\BigInteger::one(), \false); + } + /** + * {@inheritdoc} + */ + public function toScale(int $scale, int $roundingMode = \RayGlobalScoped\Brick\Math\RoundingMode::UNNECESSARY) : \RayGlobalScoped\Brick\Math\BigDecimal + { + return $this->toBigDecimal()->toScale($scale, $roundingMode); + } + /** + * {@inheritdoc} + */ + public function toInt() : int + { + $intValue = (int) $this->value; + if ($this->value !== (string) $intValue) { + throw \RayGlobalScoped\Brick\Math\Exception\IntegerOverflowException::toIntOverflow($this); + } + return $intValue; + } + /** + * {@inheritdoc} + */ + public function toFloat() : float + { + return (float) $this->value; + } + /** + * Returns a string representation of this number in the given base. + * + * The output will always be lowercase for bases greater than 10. + * + * @param int $base + * + * @return string + * + * @throws \InvalidArgumentException If the base is out of range. + */ + public function toBase(int $base) : string + { + if ($base === 10) { + return $this->value; + } + if ($base < 2 || $base > 36) { + throw new \InvalidArgumentException(\sprintf('Base %d is out of range [2, 36]', $base)); + } + return \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->toBase($this->value, $base); + } + /** + * Returns a string representation of this number in an arbitrary base with a custom alphabet. + * + * Because this method accepts an alphabet with any character, including dash, it does not handle negative numbers; + * a NegativeNumberException will be thrown when attempting to call this method on a negative number. + * + * @param string $alphabet The alphabet, for example '01' for base 2, or '01234567' for base 8. + * + * @return string + * + * @throws NegativeNumberException If this number is negative. + * @throws \InvalidArgumentException If the given alphabet does not contain at least 2 chars. + */ + public function toArbitraryBase(string $alphabet) : string + { + $base = \strlen($alphabet); + if ($base < 2) { + throw new \InvalidArgumentException('The alphabet must contain at least 2 chars.'); + } + if ($this->value[0] === '-') { + throw new \RayGlobalScoped\Brick\Math\Exception\NegativeNumberException(__FUNCTION__ . '() does not support negative numbers.'); + } + return \RayGlobalScoped\Brick\Math\Internal\Calculator::get()->toArbitraryBase($this->value, $alphabet, $base); + } + /** + * Returns a string of bytes containing the binary representation of this BigInteger. + * + * The string is in big-endian byte-order: the most significant byte is in the zeroth element. + * + * If `$signed` is true, the output will be in two's-complement representation, and a sign bit will be prepended to + * the output. If `$signed` is false, no sign bit will be prepended, and this method will throw an exception if the + * number is negative. + * + * The string will contain the minimum number of bytes required to represent this BigInteger, including a sign bit + * if `$signed` is true. + * + * This representation is compatible with the `fromBytes()` factory method, as long as the `$signed` flags match. + * + * @param bool $signed Whether to output a signed number in two's-complement representation with a leading sign bit. + * + * @return string + * + * @throws NegativeNumberException If $signed is false, and the number is negative. + */ + public function toBytes(bool $signed = \true) : string + { + if (!$signed && $this->isNegative()) { + throw new \RayGlobalScoped\Brick\Math\Exception\NegativeNumberException('Cannot convert a negative number to a byte string when $signed is false.'); + } + $hex = $this->abs()->toBase(16); + if (\strlen($hex) % 2 !== 0) { + $hex = '0' . $hex; + } + $baseHexLength = \strlen($hex); + if ($signed) { + if ($this->isNegative()) { + $bin = \hex2bin($hex); + \assert($bin !== \false); + $hex = \bin2hex(~$bin); + $hex = self::fromBase($hex, 16)->plus(1)->toBase(16); + $hexLength = \strlen($hex); + if ($hexLength < $baseHexLength) { + $hex = \str_repeat('0', $baseHexLength - $hexLength) . $hex; + } + if ($hex[0] < '8') { + $hex = 'FF' . $hex; + } + } else { + if ($hex[0] >= '8') { + $hex = '00' . $hex; + } + } + } + return \hex2bin($hex); + } + /** + * {@inheritdoc} + */ + public function __toString() : string + { + return $this->value; + } + /** + * This method is required by interface Serializable and SHOULD NOT be accessed directly. + * + * @internal + * + * @return string + */ + public function serialize() : string + { + return $this->value; + } + /** + * This method is only here to implement interface Serializable and cannot be accessed directly. + * + * @internal + * @psalm-suppress RedundantPropertyInitializationCheck + * + * @param string $value + * + * @return void + * + * @throws \LogicException + */ + public function unserialize($value) : void + { + if (isset($this->value)) { + throw new \LogicException('unserialize() is an internal function, it must not be called directly.'); + } + $this->value = $value; + } +} diff --git a/build/vendor/brick/math/src/BigNumber.php b/build/vendor/brick/math/src/BigNumber.php new file mode 100644 index 0000000..6022eda --- /dev/null +++ b/build/vendor/brick/math/src/BigNumber.php @@ -0,0 +1,473 @@ +[\\-\\+])?' . '(?:' . '(?:' . '(?[0-9]+)?' . '(?\\.)?' . '(?[0-9]+)?' . '(?:[eE](?[\\-\\+]?[0-9]+))?' . ')|(?:' . '(?[0-9]+)' . '\\/?' . '(?[0-9]+)' . ')' . ')' . '$/'; + /** + * Creates a BigNumber of the given value. + * + * The concrete return type is dependent on the given value, with the following rules: + * + * - BigNumber instances are returned as is + * - integer numbers are returned as BigInteger + * - floating point numbers are converted to a string then parsed as such + * - strings containing a `/` character are returned as BigRational + * - strings containing a `.` character or using an exponential notation are returned as BigDecimal + * - strings containing only digits with an optional leading `+` or `-` sign are returned as BigInteger + * + * @param BigNumber|int|float|string $value + * + * @return BigNumber + * + * @throws NumberFormatException If the format of the number is not valid. + * @throws DivisionByZeroException If the value represents a rational number with a denominator of zero. + * + * @psalm-pure + */ + public static function of($value) : \RayGlobalScoped\Brick\Math\BigNumber + { + if ($value instanceof \RayGlobalScoped\Brick\Math\BigNumber) { + return $value; + } + if (\is_int($value)) { + return new \RayGlobalScoped\Brick\Math\BigInteger((string) $value); + } + /** @psalm-suppress RedundantCastGivenDocblockType We cannot trust the untyped $value here! */ + $value = \is_float($value) ? self::floatToString($value) : (string) $value; + $throw = static function () use($value) : void { + throw new \RayGlobalScoped\Brick\Math\Exception\NumberFormatException(\sprintf('The given value "%s" does not represent a valid number.', $value)); + }; + if (\preg_match(self::PARSE_REGEXP, $value, $matches) !== 1) { + $throw(); + } + $getMatch = static function (string $value) use($matches) : ?string { + return isset($matches[$value]) && $matches[$value] !== '' ? $matches[$value] : null; + }; + $sign = $getMatch('sign'); + $numerator = $getMatch('numerator'); + $denominator = $getMatch('denominator'); + if ($numerator !== null) { + \assert($denominator !== null); + if ($sign !== null) { + $numerator = $sign . $numerator; + } + $numerator = self::cleanUp($numerator); + $denominator = self::cleanUp($denominator); + if ($denominator === '0') { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::denominatorMustNotBeZero(); + } + return new \RayGlobalScoped\Brick\Math\BigRational(new \RayGlobalScoped\Brick\Math\BigInteger($numerator), new \RayGlobalScoped\Brick\Math\BigInteger($denominator), \false); + } + $point = $getMatch('point'); + $integral = $getMatch('integral'); + $fractional = $getMatch('fractional'); + $exponent = $getMatch('exponent'); + if ($integral === null && $fractional === null) { + $throw(); + } + if ($integral === null) { + $integral = '0'; + } + if ($point !== null || $exponent !== null) { + $fractional = $fractional ?? ''; + $exponent = $exponent !== null ? (int) $exponent : 0; + if ($exponent === \PHP_INT_MIN || $exponent === \PHP_INT_MAX) { + throw new \RayGlobalScoped\Brick\Math\Exception\NumberFormatException('Exponent too large.'); + } + $unscaledValue = self::cleanUp(($sign ?? '') . $integral . $fractional); + $scale = \strlen($fractional) - $exponent; + if ($scale < 0) { + if ($unscaledValue !== '0') { + $unscaledValue .= \str_repeat('0', -$scale); + } + $scale = 0; + } + return new \RayGlobalScoped\Brick\Math\BigDecimal($unscaledValue, $scale); + } + $integral = self::cleanUp(($sign ?? '') . $integral); + return new \RayGlobalScoped\Brick\Math\BigInteger($integral); + } + /** + * Safely converts float to string, avoiding locale-dependent issues. + * + * @see https://github.com/brick/math/pull/20 + * + * @param float $float + * + * @return string + * + * @psalm-pure + * @psalm-suppress ImpureFunctionCall + */ + private static function floatToString(float $float) : string + { + $currentLocale = \setlocale(\LC_NUMERIC, '0'); + \setlocale(\LC_NUMERIC, 'C'); + $result = (string) $float; + \setlocale(\LC_NUMERIC, $currentLocale); + return $result; + } + /** + * Proxy method to access protected constructors from sibling classes. + * + * @internal + * + * @param mixed ...$args The arguments to the constructor. + * + * @return static + * + * @psalm-pure + * @psalm-suppress TooManyArguments + * @psalm-suppress UnsafeInstantiation + */ + protected static function create(...$args) : \RayGlobalScoped\Brick\Math\BigNumber + { + return new static(...$args); + } + /** + * Returns the minimum of the given values. + * + * @param BigNumber|int|float|string ...$values The numbers to compare. All the numbers need to be convertible + * to an instance of the class this method is called on. + * + * @return static The minimum value. + * + * @throws \InvalidArgumentException If no values are given. + * @throws MathException If an argument is not valid. + * + * @psalm-suppress LessSpecificReturnStatement + * @psalm-suppress MoreSpecificReturnType + * @psalm-pure + */ + public static function min(...$values) : \RayGlobalScoped\Brick\Math\BigNumber + { + $min = null; + foreach ($values as $value) { + $value = static::of($value); + if ($min === null || $value->isLessThan($min)) { + $min = $value; + } + } + if ($min === null) { + throw new \InvalidArgumentException(__METHOD__ . '() expects at least one value.'); + } + return $min; + } + /** + * Returns the maximum of the given values. + * + * @param BigNumber|int|float|string ...$values The numbers to compare. All the numbers need to be convertible + * to an instance of the class this method is called on. + * + * @return static The maximum value. + * + * @throws \InvalidArgumentException If no values are given. + * @throws MathException If an argument is not valid. + * + * @psalm-suppress LessSpecificReturnStatement + * @psalm-suppress MoreSpecificReturnType + * @psalm-pure + */ + public static function max(...$values) : \RayGlobalScoped\Brick\Math\BigNumber + { + $max = null; + foreach ($values as $value) { + $value = static::of($value); + if ($max === null || $value->isGreaterThan($max)) { + $max = $value; + } + } + if ($max === null) { + throw new \InvalidArgumentException(__METHOD__ . '() expects at least one value.'); + } + return $max; + } + /** + * Returns the sum of the given values. + * + * @param BigNumber|int|float|string ...$values The numbers to add. All the numbers need to be convertible + * to an instance of the class this method is called on. + * + * @return static The sum. + * + * @throws \InvalidArgumentException If no values are given. + * @throws MathException If an argument is not valid. + * + * @psalm-suppress LessSpecificReturnStatement + * @psalm-suppress MoreSpecificReturnType + * @psalm-pure + */ + public static function sum(...$values) : \RayGlobalScoped\Brick\Math\BigNumber + { + /** @var BigNumber|null $sum */ + $sum = null; + foreach ($values as $value) { + $value = static::of($value); + $sum = $sum === null ? $value : self::add($sum, $value); + } + if ($sum === null) { + throw new \InvalidArgumentException(__METHOD__ . '() expects at least one value.'); + } + return $sum; + } + /** + * Adds two BigNumber instances in the correct order to avoid a RoundingNecessaryException. + * + * @todo This could be better resolved by creating an abstract protected method in BigNumber, and leaving to + * concrete classes the responsibility to perform the addition themselves or delegate it to the given number, + * depending on their ability to perform the operation. This will also require a version bump because we're + * potentially breaking custom BigNumber implementations (if any...) + * + * @param BigNumber $a + * @param BigNumber $b + * + * @return BigNumber + * + * @psalm-pure + */ + private static function add(\RayGlobalScoped\Brick\Math\BigNumber $a, \RayGlobalScoped\Brick\Math\BigNumber $b) : \RayGlobalScoped\Brick\Math\BigNumber + { + if ($a instanceof \RayGlobalScoped\Brick\Math\BigRational) { + return $a->plus($b); + } + if ($b instanceof \RayGlobalScoped\Brick\Math\BigRational) { + return $b->plus($a); + } + if ($a instanceof \RayGlobalScoped\Brick\Math\BigDecimal) { + return $a->plus($b); + } + if ($b instanceof \RayGlobalScoped\Brick\Math\BigDecimal) { + return $b->plus($a); + } + /** @var BigInteger $a */ + return $a->plus($b); + } + /** + * Removes optional leading zeros and + sign from the given number. + * + * @param string $number The number, validated as a non-empty string of digits with optional leading sign. + * + * @return string + * + * @psalm-pure + */ + private static function cleanUp(string $number) : string + { + $firstChar = $number[0]; + if ($firstChar === '+' || $firstChar === '-') { + $number = \substr($number, 1); + } + $number = \ltrim($number, '0'); + if ($number === '') { + return '0'; + } + if ($firstChar === '-') { + return '-' . $number; + } + return $number; + } + /** + * Checks if this number is equal to the given one. + * + * @param BigNumber|int|float|string $that + * + * @return bool + */ + public function isEqualTo($that) : bool + { + return $this->compareTo($that) === 0; + } + /** + * Checks if this number is strictly lower than the given one. + * + * @param BigNumber|int|float|string $that + * + * @return bool + */ + public function isLessThan($that) : bool + { + return $this->compareTo($that) < 0; + } + /** + * Checks if this number is lower than or equal to the given one. + * + * @param BigNumber|int|float|string $that + * + * @return bool + */ + public function isLessThanOrEqualTo($that) : bool + { + return $this->compareTo($that) <= 0; + } + /** + * Checks if this number is strictly greater than the given one. + * + * @param BigNumber|int|float|string $that + * + * @return bool + */ + public function isGreaterThan($that) : bool + { + return $this->compareTo($that) > 0; + } + /** + * Checks if this number is greater than or equal to the given one. + * + * @param BigNumber|int|float|string $that + * + * @return bool + */ + public function isGreaterThanOrEqualTo($that) : bool + { + return $this->compareTo($that) >= 0; + } + /** + * Checks if this number equals zero. + * + * @return bool + */ + public function isZero() : bool + { + return $this->getSign() === 0; + } + /** + * Checks if this number is strictly negative. + * + * @return bool + */ + public function isNegative() : bool + { + return $this->getSign() < 0; + } + /** + * Checks if this number is negative or zero. + * + * @return bool + */ + public function isNegativeOrZero() : bool + { + return $this->getSign() <= 0; + } + /** + * Checks if this number is strictly positive. + * + * @return bool + */ + public function isPositive() : bool + { + return $this->getSign() > 0; + } + /** + * Checks if this number is positive or zero. + * + * @return bool + */ + public function isPositiveOrZero() : bool + { + return $this->getSign() >= 0; + } + /** + * Returns the sign of this number. + * + * @return int -1 if the number is negative, 0 if zero, 1 if positive. + */ + public abstract function getSign() : int; + /** + * Compares this number to the given one. + * + * @param BigNumber|int|float|string $that + * + * @return int [-1,0,1] If `$this` is lower than, equal to, or greater than `$that`. + * + * @throws MathException If the number is not valid. + */ + public abstract function compareTo($that) : int; + /** + * Converts this number to a BigInteger. + * + * @return BigInteger The converted number. + * + * @throws RoundingNecessaryException If this number cannot be converted to a BigInteger without rounding. + */ + public abstract function toBigInteger() : \RayGlobalScoped\Brick\Math\BigInteger; + /** + * Converts this number to a BigDecimal. + * + * @return BigDecimal The converted number. + * + * @throws RoundingNecessaryException If this number cannot be converted to a BigDecimal without rounding. + */ + public abstract function toBigDecimal() : \RayGlobalScoped\Brick\Math\BigDecimal; + /** + * Converts this number to a BigRational. + * + * @return BigRational The converted number. + */ + public abstract function toBigRational() : \RayGlobalScoped\Brick\Math\BigRational; + /** + * Converts this number to a BigDecimal with the given scale, using rounding if necessary. + * + * @param int $scale The scale of the resulting `BigDecimal`. + * @param int $roundingMode A `RoundingMode` constant. + * + * @return BigDecimal + * + * @throws RoundingNecessaryException If this number cannot be converted to the given scale without rounding. + * This only applies when RoundingMode::UNNECESSARY is used. + */ + public abstract function toScale(int $scale, int $roundingMode = \RayGlobalScoped\Brick\Math\RoundingMode::UNNECESSARY) : \RayGlobalScoped\Brick\Math\BigDecimal; + /** + * Returns the exact value of this number as a native integer. + * + * If this number cannot be converted to a native integer without losing precision, an exception is thrown. + * Note that the acceptable range for an integer depends on the platform and differs for 32-bit and 64-bit. + * + * @return int The converted value. + * + * @throws MathException If this number cannot be exactly converted to a native integer. + */ + public abstract function toInt() : int; + /** + * Returns an approximation of this number as a floating-point value. + * + * Note that this method can discard information as the precision of a floating-point value + * is inherently limited. + * + * If the number is greater than the largest representable floating point number, positive infinity is returned. + * If the number is less than the smallest representable floating point number, negative infinity is returned. + * + * @return float The converted value. + */ + public abstract function toFloat() : float; + /** + * Returns a string representation of this number. + * + * The output of this method can be parsed by the `of()` factory method; + * this will yield an object equal to this one, without any information loss. + * + * @return string + */ + public abstract function __toString() : string; + /** + * {@inheritdoc} + */ + public function jsonSerialize() : string + { + return $this->__toString(); + } +} diff --git a/build/vendor/brick/math/src/BigRational.php b/build/vendor/brick/math/src/BigRational.php new file mode 100644 index 0000000..d53c105 --- /dev/null +++ b/build/vendor/brick/math/src/BigRational.php @@ -0,0 +1,423 @@ +isZero()) { + throw \RayGlobalScoped\Brick\Math\Exception\DivisionByZeroException::denominatorMustNotBeZero(); + } + if ($denominator->isNegative()) { + $numerator = $numerator->negated(); + $denominator = $denominator->negated(); + } + } + $this->numerator = $numerator; + $this->denominator = $denominator; + } + /** + * Creates a BigRational of the given value. + * + * @param BigNumber|int|float|string $value + * + * @return BigRational + * + * @throws MathException If the value cannot be converted to a BigRational. + * + * @psalm-pure + */ + public static function of($value) : \RayGlobalScoped\Brick\Math\BigNumber + { + return parent::of($value)->toBigRational(); + } + /** + * Creates a BigRational out of a numerator and a denominator. + * + * If the denominator is negative, the signs of both the numerator and the denominator + * will be inverted to ensure that the denominator is always positive. + * + * @param BigNumber|int|float|string $numerator The numerator. Must be convertible to a BigInteger. + * @param BigNumber|int|float|string $denominator The denominator. Must be convertible to a BigInteger. + * + * @return BigRational + * + * @throws NumberFormatException If an argument does not represent a valid number. + * @throws RoundingNecessaryException If an argument represents a non-integer number. + * @throws DivisionByZeroException If the denominator is zero. + * + * @psalm-pure + */ + public static function nd($numerator, $denominator) : \RayGlobalScoped\Brick\Math\BigRational + { + $numerator = \RayGlobalScoped\Brick\Math\BigInteger::of($numerator); + $denominator = \RayGlobalScoped\Brick\Math\BigInteger::of($denominator); + return new \RayGlobalScoped\Brick\Math\BigRational($numerator, $denominator, \true); + } + /** + * Returns a BigRational representing zero. + * + * @return BigRational + * + * @psalm-pure + */ + public static function zero() : \RayGlobalScoped\Brick\Math\BigRational + { + /** + * @psalm-suppress ImpureStaticVariable + * @var BigRational|null $zero + */ + static $zero; + if ($zero === null) { + $zero = new \RayGlobalScoped\Brick\Math\BigRational(\RayGlobalScoped\Brick\Math\BigInteger::zero(), \RayGlobalScoped\Brick\Math\BigInteger::one(), \false); + } + return $zero; + } + /** + * Returns a BigRational representing one. + * + * @return BigRational + * + * @psalm-pure + */ + public static function one() : \RayGlobalScoped\Brick\Math\BigRational + { + /** + * @psalm-suppress ImpureStaticVariable + * @var BigRational|null $one + */ + static $one; + if ($one === null) { + $one = new \RayGlobalScoped\Brick\Math\BigRational(\RayGlobalScoped\Brick\Math\BigInteger::one(), \RayGlobalScoped\Brick\Math\BigInteger::one(), \false); + } + return $one; + } + /** + * Returns a BigRational representing ten. + * + * @return BigRational + * + * @psalm-pure + */ + public static function ten() : \RayGlobalScoped\Brick\Math\BigRational + { + /** + * @psalm-suppress ImpureStaticVariable + * @var BigRational|null $ten + */ + static $ten; + if ($ten === null) { + $ten = new \RayGlobalScoped\Brick\Math\BigRational(\RayGlobalScoped\Brick\Math\BigInteger::ten(), \RayGlobalScoped\Brick\Math\BigInteger::one(), \false); + } + return $ten; + } + /** + * @return BigInteger + */ + public function getNumerator() : \RayGlobalScoped\Brick\Math\BigInteger + { + return $this->numerator; + } + /** + * @return BigInteger + */ + public function getDenominator() : \RayGlobalScoped\Brick\Math\BigInteger + { + return $this->denominator; + } + /** + * Returns the quotient of the division of the numerator by the denominator. + * + * @return BigInteger + */ + public function quotient() : \RayGlobalScoped\Brick\Math\BigInteger + { + return $this->numerator->quotient($this->denominator); + } + /** + * Returns the remainder of the division of the numerator by the denominator. + * + * @return BigInteger + */ + public function remainder() : \RayGlobalScoped\Brick\Math\BigInteger + { + return $this->numerator->remainder($this->denominator); + } + /** + * Returns the quotient and remainder of the division of the numerator by the denominator. + * + * @return BigInteger[] + */ + public function quotientAndRemainder() : array + { + return $this->numerator->quotientAndRemainder($this->denominator); + } + /** + * Returns the sum of this number and the given one. + * + * @param BigNumber|int|float|string $that The number to add. + * + * @return BigRational The result. + * + * @throws MathException If the number is not valid. + */ + public function plus($that) : \RayGlobalScoped\Brick\Math\BigRational + { + $that = \RayGlobalScoped\Brick\Math\BigRational::of($that); + $numerator = $this->numerator->multipliedBy($that->denominator); + $numerator = $numerator->plus($that->numerator->multipliedBy($this->denominator)); + $denominator = $this->denominator->multipliedBy($that->denominator); + return new \RayGlobalScoped\Brick\Math\BigRational($numerator, $denominator, \false); + } + /** + * Returns the difference of this number and the given one. + * + * @param BigNumber|int|float|string $that The number to subtract. + * + * @return BigRational The result. + * + * @throws MathException If the number is not valid. + */ + public function minus($that) : \RayGlobalScoped\Brick\Math\BigRational + { + $that = \RayGlobalScoped\Brick\Math\BigRational::of($that); + $numerator = $this->numerator->multipliedBy($that->denominator); + $numerator = $numerator->minus($that->numerator->multipliedBy($this->denominator)); + $denominator = $this->denominator->multipliedBy($that->denominator); + return new \RayGlobalScoped\Brick\Math\BigRational($numerator, $denominator, \false); + } + /** + * Returns the product of this number and the given one. + * + * @param BigNumber|int|float|string $that The multiplier. + * + * @return BigRational The result. + * + * @throws MathException If the multiplier is not a valid number. + */ + public function multipliedBy($that) : \RayGlobalScoped\Brick\Math\BigRational + { + $that = \RayGlobalScoped\Brick\Math\BigRational::of($that); + $numerator = $this->numerator->multipliedBy($that->numerator); + $denominator = $this->denominator->multipliedBy($that->denominator); + return new \RayGlobalScoped\Brick\Math\BigRational($numerator, $denominator, \false); + } + /** + * Returns the result of the division of this number by the given one. + * + * @param BigNumber|int|float|string $that The divisor. + * + * @return BigRational The result. + * + * @throws MathException If the divisor is not a valid number, or is zero. + */ + public function dividedBy($that) : \RayGlobalScoped\Brick\Math\BigRational + { + $that = \RayGlobalScoped\Brick\Math\BigRational::of($that); + $numerator = $this->numerator->multipliedBy($that->denominator); + $denominator = $this->denominator->multipliedBy($that->numerator); + return new \RayGlobalScoped\Brick\Math\BigRational($numerator, $denominator, \true); + } + /** + * Returns this number exponentiated to the given value. + * + * @param int $exponent The exponent. + * + * @return BigRational The result. + * + * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000. + */ + public function power(int $exponent) : \RayGlobalScoped\Brick\Math\BigRational + { + if ($exponent === 0) { + $one = \RayGlobalScoped\Brick\Math\BigInteger::one(); + return new \RayGlobalScoped\Brick\Math\BigRational($one, $one, \false); + } + if ($exponent === 1) { + return $this; + } + return new \RayGlobalScoped\Brick\Math\BigRational($this->numerator->power($exponent), $this->denominator->power($exponent), \false); + } + /** + * Returns the reciprocal of this BigRational. + * + * The reciprocal has the numerator and denominator swapped. + * + * @return BigRational + * + * @throws DivisionByZeroException If the numerator is zero. + */ + public function reciprocal() : \RayGlobalScoped\Brick\Math\BigRational + { + return new \RayGlobalScoped\Brick\Math\BigRational($this->denominator, $this->numerator, \true); + } + /** + * Returns the absolute value of this BigRational. + * + * @return BigRational + */ + public function abs() : \RayGlobalScoped\Brick\Math\BigRational + { + return new \RayGlobalScoped\Brick\Math\BigRational($this->numerator->abs(), $this->denominator, \false); + } + /** + * Returns the negated value of this BigRational. + * + * @return BigRational + */ + public function negated() : \RayGlobalScoped\Brick\Math\BigRational + { + return new \RayGlobalScoped\Brick\Math\BigRational($this->numerator->negated(), $this->denominator, \false); + } + /** + * Returns the simplified value of this BigRational. + * + * @return BigRational + */ + public function simplified() : \RayGlobalScoped\Brick\Math\BigRational + { + $gcd = $this->numerator->gcd($this->denominator); + $numerator = $this->numerator->quotient($gcd); + $denominator = $this->denominator->quotient($gcd); + return new \RayGlobalScoped\Brick\Math\BigRational($numerator, $denominator, \false); + } + /** + * {@inheritdoc} + */ + public function compareTo($that) : int + { + return $this->minus($that)->getSign(); + } + /** + * {@inheritdoc} + */ + public function getSign() : int + { + return $this->numerator->getSign(); + } + /** + * {@inheritdoc} + */ + public function toBigInteger() : \RayGlobalScoped\Brick\Math\BigInteger + { + $simplified = $this->simplified(); + if (!$simplified->denominator->isEqualTo(1)) { + throw new \RayGlobalScoped\Brick\Math\Exception\RoundingNecessaryException('This rational number cannot be represented as an integer value without rounding.'); + } + return $simplified->numerator; + } + /** + * {@inheritdoc} + */ + public function toBigDecimal() : \RayGlobalScoped\Brick\Math\BigDecimal + { + return $this->numerator->toBigDecimal()->exactlyDividedBy($this->denominator); + } + /** + * {@inheritdoc} + */ + public function toBigRational() : \RayGlobalScoped\Brick\Math\BigRational + { + return $this; + } + /** + * {@inheritdoc} + */ + public function toScale(int $scale, int $roundingMode = \RayGlobalScoped\Brick\Math\RoundingMode::UNNECESSARY) : \RayGlobalScoped\Brick\Math\BigDecimal + { + return $this->numerator->toBigDecimal()->dividedBy($this->denominator, $scale, $roundingMode); + } + /** + * {@inheritdoc} + */ + public function toInt() : int + { + return $this->toBigInteger()->toInt(); + } + /** + * {@inheritdoc} + */ + public function toFloat() : float + { + return $this->numerator->toFloat() / $this->denominator->toFloat(); + } + /** + * {@inheritdoc} + */ + public function __toString() : string + { + $numerator = (string) $this->numerator; + $denominator = (string) $this->denominator; + if ($denominator === '1') { + return $numerator; + } + return $this->numerator . '/' . $this->denominator; + } + /** + * This method is required by interface Serializable and SHOULD NOT be accessed directly. + * + * @internal + * + * @return string + */ + public function serialize() : string + { + return $this->numerator . '/' . $this->denominator; + } + /** + * This method is only here to implement interface Serializable and cannot be accessed directly. + * + * @internal + * @psalm-suppress RedundantPropertyInitializationCheck + * + * @param string $value + * + * @return void + * + * @throws \LogicException + */ + public function unserialize($value) : void + { + if (isset($this->numerator)) { + throw new \LogicException('unserialize() is an internal function, it must not be called directly.'); + } + [$numerator, $denominator] = \explode('/', $value); + $this->numerator = \RayGlobalScoped\Brick\Math\BigInteger::of($numerator); + $this->denominator = \RayGlobalScoped\Brick\Math\BigInteger::of($denominator); + } +} diff --git a/build/vendor/brick/math/src/Exception/DivisionByZeroException.php b/build/vendor/brick/math/src/Exception/DivisionByZeroException.php new file mode 100644 index 0000000..9209b95 --- /dev/null +++ b/build/vendor/brick/math/src/Exception/DivisionByZeroException.php @@ -0,0 +1,38 @@ + 126) { + $char = \strtoupper(\dechex($ord)); + if ($ord < 10) { + $char = '0' . $char; + } + } else { + $char = '"' . $char . '"'; + } + return new self(\sprintf('Char %s is not a valid character in the given alphabet.', $char)); + } +} diff --git a/build/vendor/brick/math/src/Exception/RoundingNecessaryException.php b/build/vendor/brick/math/src/Exception/RoundingNecessaryException.php new file mode 100644 index 0000000..efb87fa --- /dev/null +++ b/build/vendor/brick/math/src/Exception/RoundingNecessaryException.php @@ -0,0 +1,20 @@ +init($a, $b); + if ($aNeg && !$bNeg) { + return -1; + } + if ($bNeg && !$aNeg) { + return 1; + } + $aLen = \strlen($aDig); + $bLen = \strlen($bDig); + if ($aLen < $bLen) { + $result = -1; + } elseif ($aLen > $bLen) { + $result = 1; + } else { + $result = $aDig <=> $bDig; + } + return $aNeg ? -$result : $result; + } + /** + * Adds two numbers. + * + * @param string $a The augend. + * @param string $b The addend. + * + * @return string The sum. + */ + public abstract function add(string $a, string $b) : string; + /** + * Subtracts two numbers. + * + * @param string $a The minuend. + * @param string $b The subtrahend. + * + * @return string The difference. + */ + public abstract function sub(string $a, string $b) : string; + /** + * Multiplies two numbers. + * + * @param string $a The multiplicand. + * @param string $b The multiplier. + * + * @return string The product. + */ + public abstract function mul(string $a, string $b) : string; + /** + * Returns the quotient of the division of two numbers. + * + * @param string $a The dividend. + * @param string $b The divisor, must not be zero. + * + * @return string The quotient. + */ + public abstract function divQ(string $a, string $b) : string; + /** + * Returns the remainder of the division of two numbers. + * + * @param string $a The dividend. + * @param string $b The divisor, must not be zero. + * + * @return string The remainder. + */ + public abstract function divR(string $a, string $b) : string; + /** + * Returns the quotient and remainder of the division of two numbers. + * + * @param string $a The dividend. + * @param string $b The divisor, must not be zero. + * + * @return string[] An array containing the quotient and remainder. + */ + public abstract function divQR(string $a, string $b) : array; + /** + * Exponentiates a number. + * + * @param string $a The base number. + * @param int $e The exponent, validated as an integer between 0 and MAX_POWER. + * + * @return string The power. + */ + public abstract function pow(string $a, int $e) : string; + /** + * @param string $a + * @param string $b The modulus; must not be zero. + * + * @return string + */ + public function mod(string $a, string $b) : string + { + return $this->divR($this->add($this->divR($a, $b), $b), $b); + } + /** + * Returns the modular multiplicative inverse of $x modulo $m. + * + * If $x has no multiplicative inverse mod m, this method must return null. + * + * This method can be overridden by the concrete implementation if the underlying library has built-in support. + * + * @param string $x + * @param string $m The modulus; must not be negative or zero. + * + * @return string|null + */ + public function modInverse(string $x, string $m) : ?string + { + if ($m === '1') { + return '0'; + } + $modVal = $x; + if ($x[0] === '-' || $this->cmp($this->abs($x), $m) >= 0) { + $modVal = $this->mod($x, $m); + } + $x = '0'; + $y = '0'; + $g = $this->gcdExtended($modVal, $m, $x, $y); + if ($g !== '1') { + return null; + } + return $this->mod($this->add($this->mod($x, $m), $m), $m); + } + /** + * Raises a number into power with modulo. + * + * @param string $base The base number; must be positive or zero. + * @param string $exp The exponent; must be positive or zero. + * @param string $mod The modulus; must be strictly positive. + * + * @return string The power. + */ + public abstract function modPow(string $base, string $exp, string $mod) : string; + /** + * Returns the greatest common divisor of the two numbers. + * + * This method can be overridden by the concrete implementation if the underlying library + * has built-in support for GCD calculations. + * + * @param string $a The first number. + * @param string $b The second number. + * + * @return string The GCD, always positive, or zero if both arguments are zero. + */ + public function gcd(string $a, string $b) : string + { + if ($a === '0') { + return $this->abs($b); + } + if ($b === '0') { + return $this->abs($a); + } + return $this->gcd($b, $this->divR($a, $b)); + } + private function gcdExtended(string $a, string $b, string &$x, string &$y) : string + { + if ($a === '0') { + $x = '0'; + $y = '1'; + return $b; + } + $x1 = '0'; + $y1 = '0'; + $gcd = $this->gcdExtended($this->mod($b, $a), $a, $x1, $y1); + $x = $this->sub($y1, $this->mul($this->divQ($b, $a), $x1)); + $y = $x1; + return $gcd; + } + /** + * Returns the square root of the given number, rounded down. + * + * The result is the largest x such that x² ≤ n. + * The input MUST NOT be negative. + * + * @param string $n The number. + * + * @return string The square root. + */ + public abstract function sqrt(string $n) : string; + /** + * Converts a number from an arbitrary base. + * + * This method can be overridden by the concrete implementation if the underlying library + * has built-in support for base conversion. + * + * @param string $number The number, positive or zero, non-empty, case-insensitively validated for the given base. + * @param int $base The base of the number, validated from 2 to 36. + * + * @return string The converted number, following the Calculator conventions. + */ + public function fromBase(string $number, int $base) : string + { + return $this->fromArbitraryBase(\strtolower($number), self::ALPHABET, $base); + } + /** + * Converts a number to an arbitrary base. + * + * This method can be overridden by the concrete implementation if the underlying library + * has built-in support for base conversion. + * + * @param string $number The number to convert, following the Calculator conventions. + * @param int $base The base to convert to, validated from 2 to 36. + * + * @return string The converted number, lowercase. + */ + public function toBase(string $number, int $base) : string + { + $negative = $number[0] === '-'; + if ($negative) { + $number = \substr($number, 1); + } + $number = $this->toArbitraryBase($number, self::ALPHABET, $base); + if ($negative) { + return '-' . $number; + } + return $number; + } + /** + * Converts a non-negative number in an arbitrary base using a custom alphabet, to base 10. + * + * @param string $number The number to convert, validated as a non-empty string, + * containing only chars in the given alphabet/base. + * @param string $alphabet The alphabet that contains every digit, validated as 2 chars minimum. + * @param int $base The base of the number, validated from 2 to alphabet length. + * + * @return string The number in base 10, following the Calculator conventions. + */ + public final function fromArbitraryBase(string $number, string $alphabet, int $base) : string + { + // remove leading "zeros" + $number = \ltrim($number, $alphabet[0]); + if ($number === '') { + return '0'; + } + // optimize for "one" + if ($number === $alphabet[1]) { + return '1'; + } + $result = '0'; + $power = '1'; + $base = (string) $base; + for ($i = \strlen($number) - 1; $i >= 0; $i--) { + $index = \strpos($alphabet, $number[$i]); + if ($index !== 0) { + $result = $this->add($result, $index === 1 ? $power : $this->mul($power, (string) $index)); + } + if ($i !== 0) { + $power = $this->mul($power, $base); + } + } + return $result; + } + /** + * Converts a non-negative number to an arbitrary base using a custom alphabet. + * + * @param string $number The number to convert, positive or zero, following the Calculator conventions. + * @param string $alphabet The alphabet that contains every digit, validated as 2 chars minimum. + * @param int $base The base to convert to, validated from 2 to alphabet length. + * + * @return string The converted number in the given alphabet. + */ + public final function toArbitraryBase(string $number, string $alphabet, int $base) : string + { + if ($number === '0') { + return $alphabet[0]; + } + $base = (string) $base; + $result = ''; + while ($number !== '0') { + [$number, $remainder] = $this->divQR($number, $base); + $remainder = (int) $remainder; + $result .= $alphabet[$remainder]; + } + return \strrev($result); + } + /** + * Performs a rounded division. + * + * Rounding is performed when the remainder of the division is not zero. + * + * @param string $a The dividend. + * @param string $b The divisor, must not be zero. + * @param int $roundingMode The rounding mode. + * + * @return string + * + * @throws \InvalidArgumentException If the rounding mode is invalid. + * @throws RoundingNecessaryException If RoundingMode::UNNECESSARY is provided but rounding is necessary. + */ + public final function divRound(string $a, string $b, int $roundingMode) : string + { + [$quotient, $remainder] = $this->divQR($a, $b); + $hasDiscardedFraction = $remainder !== '0'; + $isPositiveOrZero = ($a[0] === '-') === ($b[0] === '-'); + $discardedFractionSign = function () use($remainder, $b) : int { + $r = $this->abs($this->mul($remainder, '2')); + $b = $this->abs($b); + return $this->cmp($r, $b); + }; + $increment = \false; + switch ($roundingMode) { + case \RayGlobalScoped\Brick\Math\RoundingMode::UNNECESSARY: + if ($hasDiscardedFraction) { + throw \RayGlobalScoped\Brick\Math\Exception\RoundingNecessaryException::roundingNecessary(); + } + break; + case \RayGlobalScoped\Brick\Math\RoundingMode::UP: + $increment = $hasDiscardedFraction; + break; + case \RayGlobalScoped\Brick\Math\RoundingMode::DOWN: + break; + case \RayGlobalScoped\Brick\Math\RoundingMode::CEILING: + $increment = $hasDiscardedFraction && $isPositiveOrZero; + break; + case \RayGlobalScoped\Brick\Math\RoundingMode::FLOOR: + $increment = $hasDiscardedFraction && !$isPositiveOrZero; + break; + case \RayGlobalScoped\Brick\Math\RoundingMode::HALF_UP: + $increment = $discardedFractionSign() >= 0; + break; + case \RayGlobalScoped\Brick\Math\RoundingMode::HALF_DOWN: + $increment = $discardedFractionSign() > 0; + break; + case \RayGlobalScoped\Brick\Math\RoundingMode::HALF_CEILING: + $increment = $isPositiveOrZero ? $discardedFractionSign() >= 0 : $discardedFractionSign() > 0; + break; + case \RayGlobalScoped\Brick\Math\RoundingMode::HALF_FLOOR: + $increment = $isPositiveOrZero ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0; + break; + case \RayGlobalScoped\Brick\Math\RoundingMode::HALF_EVEN: + $lastDigit = (int) $quotient[-1]; + $lastDigitIsEven = $lastDigit % 2 === 0; + $increment = $lastDigitIsEven ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0; + break; + default: + throw new \InvalidArgumentException('Invalid rounding mode.'); + } + if ($increment) { + return $this->add($quotient, $isPositiveOrZero ? '1' : '-1'); + } + return $quotient; + } + /** + * Calculates bitwise AND of two numbers. + * + * This method can be overridden by the concrete implementation if the underlying library + * has built-in support for bitwise operations. + * + * @param string $a + * @param string $b + * + * @return string + */ + public function and(string $a, string $b) : string + { + return $this->bitwise('and', $a, $b); + } + /** + * Calculates bitwise OR of two numbers. + * + * This method can be overridden by the concrete implementation if the underlying library + * has built-in support for bitwise operations. + * + * @param string $a + * @param string $b + * + * @return string + */ + public function or(string $a, string $b) : string + { + return $this->bitwise('or', $a, $b); + } + /** + * Calculates bitwise XOR of two numbers. + * + * This method can be overridden by the concrete implementation if the underlying library + * has built-in support for bitwise operations. + * + * @param string $a + * @param string $b + * + * @return string + */ + public function xor(string $a, string $b) : string + { + return $this->bitwise('xor', $a, $b); + } + /** + * Performs a bitwise operation on a decimal number. + * + * @param string $operator The operator to use, must be "and", "or" or "xor". + * @param string $a The left operand. + * @param string $b The right operand. + * + * @return string + */ + private function bitwise(string $operator, string $a, string $b) : string + { + [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); + $aBin = $this->toBinary($aDig); + $bBin = $this->toBinary($bDig); + $aLen = \strlen($aBin); + $bLen = \strlen($bBin); + if ($aLen > $bLen) { + $bBin = \str_repeat("\0", $aLen - $bLen) . $bBin; + } elseif ($bLen > $aLen) { + $aBin = \str_repeat("\0", $bLen - $aLen) . $aBin; + } + if ($aNeg) { + $aBin = $this->twosComplement($aBin); + } + if ($bNeg) { + $bBin = $this->twosComplement($bBin); + } + switch ($operator) { + case 'and': + $value = $aBin & $bBin; + $negative = ($aNeg and $bNeg); + break; + case 'or': + $value = $aBin | $bBin; + $negative = ($aNeg or $bNeg); + break; + case 'xor': + $value = $aBin ^ $bBin; + $negative = ($aNeg xor $bNeg); + break; + // @codeCoverageIgnoreStart + default: + throw new \InvalidArgumentException('Invalid bitwise operator.'); + } + if ($negative) { + $value = $this->twosComplement($value); + } + $result = $this->toDecimal($value); + return $negative ? $this->neg($result) : $result; + } + /** + * @psalm-suppress InvalidOperand + * @see https://github.com/vimeo/psalm/issues/4456 + * + * @param string $number A positive, binary number. + * + * @return string + */ + private function twosComplement(string $number) : string + { + $xor = \str_repeat("", \strlen($number)); + $number ^= $xor; + for ($i = \strlen($number) - 1; $i >= 0; $i--) { + $byte = \ord($number[$i]); + if (++$byte !== 256) { + $number[$i] = \chr($byte); + break; + } + $number[$i] = "\0"; + if ($i === 0) { + $number = "\1" . $number; + } + } + return $number; + } + /** + * Converts a decimal number to a binary string. + * + * @param string $number The number to convert, positive or zero, only digits. + * + * @return string + */ + private function toBinary(string $number) : string + { + $result = ''; + while ($number !== '0') { + [$number, $remainder] = $this->divQR($number, '256'); + $result .= \chr((int) $remainder); + } + return \strrev($result); + } + /** + * Returns the positive decimal representation of a binary number. + * + * @param string $bytes The bytes representing the number. + * + * @return string + */ + private function toDecimal(string $bytes) : string + { + $result = '0'; + $power = '1'; + for ($i = \strlen($bytes) - 1; $i >= 0; $i--) { + $index = \ord($bytes[$i]); + if ($index !== 0) { + $result = $this->add($result, $index === 1 ? $power : $this->mul($power, (string) $index)); + } + if ($i !== 0) { + $power = $this->mul($power, '256'); + } + } + return $result; + } +} diff --git a/build/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php b/build/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php new file mode 100644 index 0000000..9f5dfe3 --- /dev/null +++ b/build/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php @@ -0,0 +1,102 @@ += 0) { + return \bcmod($a, $b, 0); + } + return \bcmod($a, $b); + } + /** + * {@inheritdoc} + */ + public function divQR(string $a, string $b) : array + { + $q = \bcdiv($a, $b, 0); + if (\version_compare(\PHP_VERSION, '7.2') >= 0) { + $r = \bcmod($a, $b, 0); + } else { + $r = \bcmod($a, $b); + } + \assert($q !== null); + \assert($r !== null); + return [$q, $r]; + } + /** + * {@inheritdoc} + */ + public function pow(string $a, int $e) : string + { + return \bcpow($a, (string) $e, 0); + } + /** + * {@inheritdoc} + * + * @psalm-suppress InvalidNullableReturnType + * @psalm-suppress NullableReturnStatement + */ + public function modPow(string $base, string $exp, string $mod) : string + { + return \bcpowmod($base, $exp, $mod, 0); + } + /** + * {@inheritDoc} + * + * @psalm-suppress NullableReturnStatement + * @psalm-suppress InvalidNullableReturnType + */ + public function sqrt(string $n) : string + { + return \bcsqrt($n, 0); + } +} diff --git a/build/vendor/brick/math/src/Internal/Calculator/GmpCalculator.php b/build/vendor/brick/math/src/Internal/Calculator/GmpCalculator.php new file mode 100644 index 0000000..6c52869 --- /dev/null +++ b/build/vendor/brick/math/src/Internal/Calculator/GmpCalculator.php @@ -0,0 +1,133 @@ +maxDigits = 9; + break; + case 8: + $this->maxDigits = 18; + break; + default: + throw new \RuntimeException('The platform is not 32-bit or 64-bit as expected.'); + } + } + /** + * {@inheritdoc} + */ + public function add(string $a, string $b) : string + { + /** + * @psalm-var numeric-string $a + * @psalm-var numeric-string $b + */ + $result = $a + $b; + if (\is_int($result)) { + return (string) $result; + } + if ($a === '0') { + return $b; + } + if ($b === '0') { + return $a; + } + [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); + $result = $aNeg === $bNeg ? $this->doAdd($aDig, $bDig) : $this->doSub($aDig, $bDig); + if ($aNeg) { + $result = $this->neg($result); + } + return $result; + } + /** + * {@inheritdoc} + */ + public function sub(string $a, string $b) : string + { + return $this->add($a, $this->neg($b)); + } + /** + * {@inheritdoc} + */ + public function mul(string $a, string $b) : string + { + /** + * @psalm-var numeric-string $a + * @psalm-var numeric-string $b + */ + $result = $a * $b; + if (\is_int($result)) { + return (string) $result; + } + if ($a === '0' || $b === '0') { + return '0'; + } + if ($a === '1') { + return $b; + } + if ($b === '1') { + return $a; + } + if ($a === '-1') { + return $this->neg($b); + } + if ($b === '-1') { + return $this->neg($a); + } + [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); + $result = $this->doMul($aDig, $bDig); + if ($aNeg !== $bNeg) { + $result = $this->neg($result); + } + return $result; + } + /** + * {@inheritdoc} + */ + public function divQ(string $a, string $b) : string + { + return $this->divQR($a, $b)[0]; + } + /** + * {@inheritdoc} + */ + public function divR(string $a, string $b) : string + { + return $this->divQR($a, $b)[1]; + } + /** + * {@inheritdoc} + */ + public function divQR(string $a, string $b) : array + { + if ($a === '0') { + return ['0', '0']; + } + if ($a === $b) { + return ['1', '0']; + } + if ($b === '1') { + return [$a, '0']; + } + if ($b === '-1') { + return [$this->neg($a), '0']; + } + /** @psalm-var numeric-string $a */ + $na = $a * 1; + // cast to number + if (\is_int($na)) { + /** @psalm-var numeric-string $b */ + $nb = $b * 1; + if (\is_int($nb)) { + // the only division that may overflow is PHP_INT_MIN / -1, + // which cannot happen here as we've already handled a divisor of -1 above. + $r = $na % $nb; + $q = ($na - $r) / $nb; + \assert(\is_int($q)); + return [(string) $q, (string) $r]; + } + } + [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); + [$q, $r] = $this->doDiv($aDig, $bDig); + if ($aNeg !== $bNeg) { + $q = $this->neg($q); + } + if ($aNeg) { + $r = $this->neg($r); + } + return [$q, $r]; + } + /** + * {@inheritdoc} + */ + public function pow(string $a, int $e) : string + { + if ($e === 0) { + return '1'; + } + if ($e === 1) { + return $a; + } + $odd = $e % 2; + $e -= $odd; + $aa = $this->mul($a, $a); + /** @psalm-suppress PossiblyInvalidArgument We're sure that $e / 2 is an int now */ + $result = $this->pow($aa, $e / 2); + if ($odd === 1) { + $result = $this->mul($result, $a); + } + return $result; + } + /** + * Algorithm from: https://www.geeksforgeeks.org/modular-exponentiation-power-in-modular-arithmetic/ + * + * {@inheritdoc} + */ + public function modPow(string $base, string $exp, string $mod) : string + { + // special case: the algorithm below fails with 0 power 0 mod 1 (returns 1 instead of 0) + if ($base === '0' && $exp === '0' && $mod === '1') { + return '0'; + } + // special case: the algorithm below fails with power 0 mod 1 (returns 1 instead of 0) + if ($exp === '0' && $mod === '1') { + return '0'; + } + $x = $base; + $res = '1'; + // numbers are positive, so we can use remainder instead of modulo + $x = $this->divR($x, $mod); + while ($exp !== '0') { + if (\in_array($exp[-1], ['1', '3', '5', '7', '9'])) { + // odd + $res = $this->divR($this->mul($res, $x), $mod); + } + $exp = $this->divQ($exp, '2'); + $x = $this->divR($this->mul($x, $x), $mod); + } + return $res; + } + /** + * Adapted from https://cp-algorithms.com/num_methods/roots_newton.html + * + * {@inheritDoc} + */ + public function sqrt(string $n) : string + { + if ($n === '0') { + return '0'; + } + // initial approximation + $x = \str_repeat('9', \intdiv(\strlen($n), 2) ?: 1); + $decreased = \false; + for (;;) { + $nx = $this->divQ($this->add($x, $this->divQ($n, $x)), '2'); + if ($x === $nx || $this->cmp($nx, $x) > 0 && $decreased) { + break; + } + $decreased = $this->cmp($nx, $x) < 0; + $x = $nx; + } + return $x; + } + /** + * Performs the addition of two non-signed large integers. + * + * @param string $a The first operand. + * @param string $b The second operand. + * + * @return string + */ + private function doAdd(string $a, string $b) : string + { + [$a, $b, $length] = $this->pad($a, $b); + $carry = 0; + $result = ''; + for ($i = $length - $this->maxDigits;; $i -= $this->maxDigits) { + $blockLength = $this->maxDigits; + if ($i < 0) { + $blockLength += $i; + /** @psalm-suppress LoopInvalidation */ + $i = 0; + } + /** @psalm-var numeric-string $blockA */ + $blockA = \substr($a, $i, $blockLength); + /** @psalm-var numeric-string $blockB */ + $blockB = \substr($b, $i, $blockLength); + $sum = (string) ($blockA + $blockB + $carry); + $sumLength = \strlen($sum); + if ($sumLength > $blockLength) { + $sum = \substr($sum, 1); + $carry = 1; + } else { + if ($sumLength < $blockLength) { + $sum = \str_repeat('0', $blockLength - $sumLength) . $sum; + } + $carry = 0; + } + $result = $sum . $result; + if ($i === 0) { + break; + } + } + if ($carry === 1) { + $result = '1' . $result; + } + return $result; + } + /** + * Performs the subtraction of two non-signed large integers. + * + * @param string $a The first operand. + * @param string $b The second operand. + * + * @return string + */ + private function doSub(string $a, string $b) : string + { + if ($a === $b) { + return '0'; + } + // Ensure that we always subtract to a positive result: biggest minus smallest. + $cmp = $this->doCmp($a, $b); + $invert = $cmp === -1; + if ($invert) { + $c = $a; + $a = $b; + $b = $c; + } + [$a, $b, $length] = $this->pad($a, $b); + $carry = 0; + $result = ''; + $complement = 10 ** $this->maxDigits; + for ($i = $length - $this->maxDigits;; $i -= $this->maxDigits) { + $blockLength = $this->maxDigits; + if ($i < 0) { + $blockLength += $i; + /** @psalm-suppress LoopInvalidation */ + $i = 0; + } + /** @psalm-var numeric-string $blockA */ + $blockA = \substr($a, $i, $blockLength); + /** @psalm-var numeric-string $blockB */ + $blockB = \substr($b, $i, $blockLength); + $sum = $blockA - $blockB - $carry; + if ($sum < 0) { + $sum += $complement; + $carry = 1; + } else { + $carry = 0; + } + $sum = (string) $sum; + $sumLength = \strlen($sum); + if ($sumLength < $blockLength) { + $sum = \str_repeat('0', $blockLength - $sumLength) . $sum; + } + $result = $sum . $result; + if ($i === 0) { + break; + } + } + // Carry cannot be 1 when the loop ends, as a > b + \assert($carry === 0); + $result = \ltrim($result, '0'); + if ($invert) { + $result = $this->neg($result); + } + return $result; + } + /** + * Performs the multiplication of two non-signed large integers. + * + * @param string $a The first operand. + * @param string $b The second operand. + * + * @return string + */ + private function doMul(string $a, string $b) : string + { + $x = \strlen($a); + $y = \strlen($b); + $maxDigits = \intdiv($this->maxDigits, 2); + $complement = 10 ** $maxDigits; + $result = '0'; + for ($i = $x - $maxDigits;; $i -= $maxDigits) { + $blockALength = $maxDigits; + if ($i < 0) { + $blockALength += $i; + /** @psalm-suppress LoopInvalidation */ + $i = 0; + } + $blockA = (int) \substr($a, $i, $blockALength); + $line = ''; + $carry = 0; + for ($j = $y - $maxDigits;; $j -= $maxDigits) { + $blockBLength = $maxDigits; + if ($j < 0) { + $blockBLength += $j; + /** @psalm-suppress LoopInvalidation */ + $j = 0; + } + $blockB = (int) \substr($b, $j, $blockBLength); + $mul = $blockA * $blockB + $carry; + $value = $mul % $complement; + $carry = ($mul - $value) / $complement; + $value = (string) $value; + $value = \str_pad($value, $maxDigits, '0', \STR_PAD_LEFT); + $line = $value . $line; + if ($j === 0) { + break; + } + } + if ($carry !== 0) { + $line = $carry . $line; + } + $line = \ltrim($line, '0'); + if ($line !== '') { + $line .= \str_repeat('0', $x - $blockALength - $i); + $result = $this->add($result, $line); + } + if ($i === 0) { + break; + } + } + return $result; + } + /** + * Performs the division of two non-signed large integers. + * + * @param string $a The first operand. + * @param string $b The second operand. + * + * @return string[] The quotient and remainder. + */ + private function doDiv(string $a, string $b) : array + { + $cmp = $this->doCmp($a, $b); + if ($cmp === -1) { + return ['0', $a]; + } + $x = \strlen($a); + $y = \strlen($b); + // we now know that a >= b && x >= y + $q = '0'; + // quotient + $r = $a; + // remainder + $z = $y; + // focus length, always $y or $y+1 + for (;;) { + $focus = \substr($a, 0, $z); + $cmp = $this->doCmp($focus, $b); + if ($cmp === -1) { + if ($z === $x) { + // remainder < dividend + break; + } + $z++; + } + $zeros = \str_repeat('0', $x - $z); + $q = $this->add($q, '1' . $zeros); + $a = $this->sub($a, $b . $zeros); + $r = $a; + if ($r === '0') { + // remainder == 0 + break; + } + $x = \strlen($a); + if ($x < $y) { + // remainder < dividend + break; + } + $z = $y; + } + return [$q, $r]; + } + /** + * Compares two non-signed large numbers. + * + * @param string $a The first operand. + * @param string $b The second operand. + * + * @return int [-1, 0, 1] + */ + private function doCmp(string $a, string $b) : int + { + $x = \strlen($a); + $y = \strlen($b); + $cmp = $x <=> $y; + if ($cmp !== 0) { + return $cmp; + } + return \strcmp($a, $b) <=> 0; + // enforce [-1, 0, 1] + } + /** + * Pads the left of one of the given numbers with zeros if necessary to make both numbers the same length. + * + * The numbers must only consist of digits, without leading minus sign. + * + * @param string $a The first operand. + * @param string $b The second operand. + * + * @return array{0: string, 1: string, 2: int} + */ + private function pad(string $a, string $b) : array + { + $x = \strlen($a); + $y = \strlen($b); + if ($x > $y) { + $b = \str_repeat('0', $x - $y) . $b; + return [$a, $b, $x]; + } + if ($x < $y) { + $a = \str_repeat('0', $y - $x) . $a; + return [$a, $b, $y]; + } + return [$a, $b, $x]; + } +} diff --git a/build/vendor/brick/math/src/RoundingMode.php b/build/vendor/brick/math/src/RoundingMode.php new file mode 100644 index 0000000..3e02710 --- /dev/null +++ b/build/vendor/brick/math/src/RoundingMode.php @@ -0,0 +1,96 @@ += 0.5; otherwise, behaves as for DOWN. + * Note that this is the rounding mode commonly taught at school. + */ + public const HALF_UP = 5; + /** + * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round down. + * + * Behaves as for UP if the discarded fraction is > 0.5; otherwise, behaves as for DOWN. + */ + public const HALF_DOWN = 6; + /** + * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round towards positive infinity. + * + * If the result is positive, behaves as for HALF_UP; if negative, behaves as for HALF_DOWN. + */ + public const HALF_CEILING = 7; + /** + * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round towards negative infinity. + * + * If the result is positive, behaves as for HALF_DOWN; if negative, behaves as for HALF_UP. + */ + public const HALF_FLOOR = 8; + /** + * Rounds towards the "nearest neighbor" unless both neighbors are equidistant, in which case rounds towards the even neighbor. + * + * Behaves as for HALF_UP if the digit to the left of the discarded fraction is odd; + * behaves as for HALF_DOWN if it's even. + * + * Note that this is the rounding mode that statistically minimizes + * cumulative error when applied repeatedly over a sequence of calculations. + * It is sometimes known as "Banker's rounding", and is chiefly used in the USA. + */ + public const HALF_EVEN = 9; +} diff --git a/build/vendor/composer/ClassLoader.php b/build/vendor/composer/ClassLoader.php new file mode 100644 index 0000000..247294d --- /dev/null +++ b/build/vendor/composer/ClassLoader.php @@ -0,0 +1,479 @@ + + * Jordi Boggiano + * + * 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 + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + private $vendorDir; + + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + private static $registeredLoaders = array(); + + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + 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 array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + 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 array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + 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 array|string $paths The PSR-0 base directories + */ + 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 array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + 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 + */ + 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 + */ + 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 + */ + 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 + */ + 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. + */ + 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 bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * 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; + } + + 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; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/build/vendor/composer/InstalledVersions.php b/build/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..d57e1c4 --- /dev/null +++ b/build/vendor/composer/InstalledVersions.php @@ -0,0 +1,132 @@ + array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '5e25edcb1b3f8abe876148f59afe519c616edb18', 'name' => 'cuyz/global-ray'), 'versions' => array('brick/math' => array('pretty_version' => '0.9.2', 'version' => '0.9.2.0', 'aliases' => array(), 'reference' => 'dff976c2f3487d42c1db75a3b180e2b9f0e72ce0'), 'cuyz/global-ray' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '5e25edcb1b3f8abe876148f59afe519c616edb18'), 'psr/container' => array('pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'aliases' => array(), 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf'), 'ramsey/collection' => array('pretty_version' => '1.1.3', 'version' => '1.1.3.0', 'aliases' => array(), 'reference' => '28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1'), 'ramsey/uuid' => array('pretty_version' => '4.1.1', 'version' => '4.1.1.0', 'aliases' => array(), 'reference' => 'cd4032040a750077205918c86049aa0f43d22947'), 'rhumsaa/uuid' => array('replaced' => array(0 => '4.1.1')), 'spatie/backtrace' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'aliases' => array(), 'reference' => '3440fe023a7d5b4497090fb6b2dcdc747daf7873'), 'spatie/macroable' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'aliases' => array(), 'reference' => '7a99549fc001c925714b329220dea680c04bfa48'), 'spatie/ray' => array('pretty_version' => '1.21.2', 'version' => '1.21.2.0', 'aliases' => array(), 'reference' => '829676b1b6791aba6660fcca6f553d72c894a0ae'), 'symfony/polyfill-ctype' => array('pretty_version' => 'v1.22.1', 'version' => '1.22.1.0', 'aliases' => array(), 'reference' => 'c6c942b1ac76c82448322025e084cadc56048b4e'), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.22.1', 'version' => '1.22.1.0', 'aliases' => array(), 'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1'), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.22.1', 'version' => '1.22.1.0', 'aliases' => array(), 'reference' => 'dc3063ba22c2a1fd2f45ed856374d79114998f91'), 'symfony/service-contracts' => array('pretty_version' => 'v2.2.0', 'version' => '2.2.0.0', 'aliases' => array(), 'reference' => 'd15da7ba4957ffb8f1747218be9e1a121fd298a1'), 'symfony/stopwatch' => array('pretty_version' => 'v5.2.4', 'version' => '5.2.4.0', 'aliases' => array(), 'reference' => 'b12274acfab9d9850c52583d136a24398cdf1a0c'), 'symfony/var-dumper' => array('pretty_version' => 'v5.2.6', 'version' => '5.2.6.0', 'aliases' => array(), 'reference' => '89412a68ea2e675b4e44f260a5666729f77f668e'))); + private static $canGetVendors; + private static $installedByVendor = array(); + 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))); + } + public static function isInstalled($packageName) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return \true; + } + } + return \false; + } + public static function satisfies(\RayGlobalScoped\Composer\Semver\VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints($constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + return $provided->matches($constraint); + } + 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'); + } + 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'); + } + 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'); + } + 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'); + } + public static function getRootPackage() + { + $installed = self::getInstalled(); + return $installed[0]['root']; + } + public static function getRawData() + { + return self::$installed; + } + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = \method_exists('RayGlobalScoped\\Composer\\Autoload\\ClassLoader', 'getRegisteredLoaders'); + } + $installed = array(); + if (self::$canGetVendors) { + foreach (\RayGlobalScoped\Composer\Autoload\ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (\is_file($vendorDir . '/composer/installed.php')) { + $installed[] = self::$installedByVendor[$vendorDir] = (require $vendorDir . '/composer/installed.php'); + } + } + } + $installed[] = self::$installed; + return $installed; + } +} diff --git a/build/vendor/composer/LICENSE b/build/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/build/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +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. + diff --git a/build/vendor/composer/autoload_classmap.php b/build/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..4c64e3c --- /dev/null +++ b/build/vendor/composer/autoload_classmap.php @@ -0,0 +1,289 @@ + $vendorDir . '/composer/InstalledVersions.php', + 'RayGlobalScoped\\Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'RayGlobalScoped\\Brick\\Math\\BigDecimal' => $vendorDir . '/brick/math/src/BigDecimal.php', + 'RayGlobalScoped\\Brick\\Math\\BigInteger' => $vendorDir . '/brick/math/src/BigInteger.php', + 'RayGlobalScoped\\Brick\\Math\\BigNumber' => $vendorDir . '/brick/math/src/BigNumber.php', + 'RayGlobalScoped\\Brick\\Math\\BigRational' => $vendorDir . '/brick/math/src/BigRational.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\DivisionByZeroException' => $vendorDir . '/brick/math/src/Exception/DivisionByZeroException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\IntegerOverflowException' => $vendorDir . '/brick/math/src/Exception/IntegerOverflowException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\MathException' => $vendorDir . '/brick/math/src/Exception/MathException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\NegativeNumberException' => $vendorDir . '/brick/math/src/Exception/NegativeNumberException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\NumberFormatException' => $vendorDir . '/brick/math/src/Exception/NumberFormatException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\RoundingNecessaryException' => $vendorDir . '/brick/math/src/Exception/RoundingNecessaryException.php', + 'RayGlobalScoped\\Brick\\Math\\Internal\\Calculator' => $vendorDir . '/brick/math/src/Internal/Calculator.php', + 'RayGlobalScoped\\Brick\\Math\\Internal\\Calculator\\BcMathCalculator' => $vendorDir . '/brick/math/src/Internal/Calculator/BcMathCalculator.php', + 'RayGlobalScoped\\Brick\\Math\\Internal\\Calculator\\GmpCalculator' => $vendorDir . '/brick/math/src/Internal/Calculator/GmpCalculator.php', + 'RayGlobalScoped\\Brick\\Math\\Internal\\Calculator\\NativeCalculator' => $vendorDir . '/brick/math/src/Internal/Calculator/NativeCalculator.php', + 'RayGlobalScoped\\Brick\\Math\\RoundingMode' => $vendorDir . '/brick/math/src/RoundingMode.php', + 'RayGlobalScoped\\Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php', + 'RayGlobalScoped\\Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php', + 'RayGlobalScoped\\Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\AbstractArray' => $vendorDir . '/ramsey/collection/src/AbstractArray.php', + 'RayGlobalScoped\\Ramsey\\Collection\\AbstractCollection' => $vendorDir . '/ramsey/collection/src/AbstractCollection.php', + 'RayGlobalScoped\\Ramsey\\Collection\\AbstractSet' => $vendorDir . '/ramsey/collection/src/AbstractSet.php', + 'RayGlobalScoped\\Ramsey\\Collection\\ArrayInterface' => $vendorDir . '/ramsey/collection/src/ArrayInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Collection' => $vendorDir . '/ramsey/collection/src/Collection.php', + 'RayGlobalScoped\\Ramsey\\Collection\\CollectionInterface' => $vendorDir . '/ramsey/collection/src/CollectionInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\DoubleEndedQueue' => $vendorDir . '/ramsey/collection/src/DoubleEndedQueue.php', + 'RayGlobalScoped\\Ramsey\\Collection\\DoubleEndedQueueInterface' => $vendorDir . '/ramsey/collection/src/DoubleEndedQueueInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\CollectionMismatchException' => $vendorDir . '/ramsey/collection/src/Exception/CollectionMismatchException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\InvalidArgumentException' => $vendorDir . '/ramsey/collection/src/Exception/InvalidArgumentException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\InvalidSortOrderException' => $vendorDir . '/ramsey/collection/src/Exception/InvalidSortOrderException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\NoSuchElementException' => $vendorDir . '/ramsey/collection/src/Exception/NoSuchElementException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\OutOfBoundsException' => $vendorDir . '/ramsey/collection/src/Exception/OutOfBoundsException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\UnsupportedOperationException' => $vendorDir . '/ramsey/collection/src/Exception/UnsupportedOperationException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\ValueExtractionException' => $vendorDir . '/ramsey/collection/src/Exception/ValueExtractionException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\GenericArray' => $vendorDir . '/ramsey/collection/src/GenericArray.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\AbstractMap' => $vendorDir . '/ramsey/collection/src/Map/AbstractMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\AbstractTypedMap' => $vendorDir . '/ramsey/collection/src/Map/AbstractTypedMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\AssociativeArrayMap' => $vendorDir . '/ramsey/collection/src/Map/AssociativeArrayMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\MapInterface' => $vendorDir . '/ramsey/collection/src/Map/MapInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\NamedParameterMap' => $vendorDir . '/ramsey/collection/src/Map/NamedParameterMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\TypedMap' => $vendorDir . '/ramsey/collection/src/Map/TypedMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\TypedMapInterface' => $vendorDir . '/ramsey/collection/src/Map/TypedMapInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Queue' => $vendorDir . '/ramsey/collection/src/Queue.php', + 'RayGlobalScoped\\Ramsey\\Collection\\QueueInterface' => $vendorDir . '/ramsey/collection/src/QueueInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Set' => $vendorDir . '/ramsey/collection/src/Set.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Tool\\TypeTrait' => $vendorDir . '/ramsey/collection/src/Tool/TypeTrait.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Tool\\ValueExtractorTrait' => $vendorDir . '/ramsey/collection/src/Tool/ValueExtractorTrait.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Tool\\ValueToStringTrait' => $vendorDir . '/ramsey/collection/src/Tool/ValueToStringTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\BinaryUtils' => $vendorDir . '/ramsey/uuid/src/BinaryUtils.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\BuilderCollection' => $vendorDir . '/ramsey/uuid/src/Builder/BuilderCollection.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\FallbackBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/FallbackBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\UuidBuilderInterface' => $vendorDir . '/ramsey/uuid/src/Builder/UuidBuilderInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\CodecInterface' => $vendorDir . '/ramsey/uuid/src/Codec/CodecInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\GuidStringCodec' => $vendorDir . '/ramsey/uuid/src/Codec/GuidStringCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\OrderedTimeCodec' => $vendorDir . '/ramsey/uuid/src/Codec/OrderedTimeCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\StringCodec' => $vendorDir . '/ramsey/uuid/src/Codec/StringCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\TimestampFirstCombCodec' => $vendorDir . '/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\TimestampLastCombCodec' => $vendorDir . '/ramsey/uuid/src/Codec/TimestampLastCombCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\NumberConverterInterface' => $vendorDir . '/ramsey/uuid/src/Converter/NumberConverterInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Number\\BigNumberConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Number/BigNumberConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Number\\DegradedNumberConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Number\\GenericNumberConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\TimeConverterInterface' => $vendorDir . '/ramsey/uuid/src/Converter/TimeConverterInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Time\\BigNumberTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Time\\DegradedTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Time\\GenericTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Time\\PhpTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\DegradedUuid' => $vendorDir . '/ramsey/uuid/src/DegradedUuid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\DeprecatedUuidInterface' => $vendorDir . '/ramsey/uuid/src/DeprecatedUuidInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\DeprecatedUuidMethodsTrait' => $vendorDir . '/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\BuilderNotFoundException' => $vendorDir . '/ramsey/uuid/src/Exception/BuilderNotFoundException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\DateTimeException' => $vendorDir . '/ramsey/uuid/src/Exception/DateTimeException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\DceSecurityException' => $vendorDir . '/ramsey/uuid/src/Exception/DceSecurityException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\InvalidArgumentException' => $vendorDir . '/ramsey/uuid/src/Exception/InvalidArgumentException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\InvalidBytesException' => $vendorDir . '/ramsey/uuid/src/Exception/InvalidBytesException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\InvalidUuidStringException' => $vendorDir . '/ramsey/uuid/src/Exception/InvalidUuidStringException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\NameException' => $vendorDir . '/ramsey/uuid/src/Exception/NameException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\NodeException' => $vendorDir . '/ramsey/uuid/src/Exception/NodeException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\RandomSourceException' => $vendorDir . '/ramsey/uuid/src/Exception/RandomSourceException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\TimeSourceException' => $vendorDir . '/ramsey/uuid/src/Exception/TimeSourceException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\UnableToBuildUuidException' => $vendorDir . '/ramsey/uuid/src/Exception/UnableToBuildUuidException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\UnsupportedOperationException' => $vendorDir . '/ramsey/uuid/src/Exception/UnsupportedOperationException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\FeatureSet' => $vendorDir . '/ramsey/uuid/src/FeatureSet.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Fields\\FieldsInterface' => $vendorDir . '/ramsey/uuid/src/Fields/FieldsInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Fields\\SerializableFieldsTrait' => $vendorDir . '/ramsey/uuid/src/Fields/SerializableFieldsTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\CombGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/CombGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\DceSecurityGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/DceSecurityGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\DceSecurityGeneratorInterface' => $vendorDir . '/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\DefaultNameGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/DefaultNameGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\DefaultTimeGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/DefaultTimeGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\NameGeneratorFactory' => $vendorDir . '/ramsey/uuid/src/Generator/NameGeneratorFactory.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\NameGeneratorInterface' => $vendorDir . '/ramsey/uuid/src/Generator/NameGeneratorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\PeclUuidNameGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\PeclUuidRandomGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\PeclUuidTimeGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\RandomBytesGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/RandomBytesGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\RandomGeneratorFactory' => $vendorDir . '/ramsey/uuid/src/Generator/RandomGeneratorFactory.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\RandomGeneratorInterface' => $vendorDir . '/ramsey/uuid/src/Generator/RandomGeneratorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\RandomLibAdapter' => $vendorDir . '/ramsey/uuid/src/Generator/RandomLibAdapter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\TimeGeneratorFactory' => $vendorDir . '/ramsey/uuid/src/Generator/TimeGeneratorFactory.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\TimeGeneratorInterface' => $vendorDir . '/ramsey/uuid/src/Generator/TimeGeneratorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Guid\\Fields' => $vendorDir . '/ramsey/uuid/src/Guid/Fields.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Guid\\Guid' => $vendorDir . '/ramsey/uuid/src/Guid/Guid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Guid\\GuidBuilder' => $vendorDir . '/ramsey/uuid/src/Guid/GuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Lazy\\LazyUuidFromString' => $vendorDir . '/ramsey/uuid/src/Lazy/LazyUuidFromString.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Math\\BrickMathCalculator' => $vendorDir . '/ramsey/uuid/src/Math/BrickMathCalculator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Math\\CalculatorInterface' => $vendorDir . '/ramsey/uuid/src/Math/CalculatorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Math\\RoundingMode' => $vendorDir . '/ramsey/uuid/src/Math/RoundingMode.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Nonstandard\\Fields' => $vendorDir . '/ramsey/uuid/src/Nonstandard/Fields.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Nonstandard\\Uuid' => $vendorDir . '/ramsey/uuid/src/Nonstandard/Uuid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Nonstandard\\UuidBuilder' => $vendorDir . '/ramsey/uuid/src/Nonstandard/UuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Nonstandard\\UuidV6' => $vendorDir . '/ramsey/uuid/src/Nonstandard/UuidV6.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\DceSecurityProviderInterface' => $vendorDir . '/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Dce\\SystemDceSecurityProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\NodeProviderInterface' => $vendorDir . '/ramsey/uuid/src/Provider/NodeProviderInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\FallbackNodeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\NodeProviderCollection' => $vendorDir . '/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\RandomNodeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\StaticNodeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\SystemNodeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\TimeProviderInterface' => $vendorDir . '/ramsey/uuid/src/Provider/TimeProviderInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Time\\FixedTimeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\Fields' => $vendorDir . '/ramsey/uuid/src/Rfc4122/Fields.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\FieldsInterface' => $vendorDir . '/ramsey/uuid/src/Rfc4122/FieldsInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\NilTrait' => $vendorDir . '/ramsey/uuid/src/Rfc4122/NilTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\NilUuid' => $vendorDir . '/ramsey/uuid/src/Rfc4122/NilUuid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidBuilder' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidInterface' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV1' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV1.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV2' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV2.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV3' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV3.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV4' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV4.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV5' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV5.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\Validator' => $vendorDir . '/ramsey/uuid/src/Rfc4122/Validator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\VariantTrait' => $vendorDir . '/ramsey/uuid/src/Rfc4122/VariantTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\VersionTrait' => $vendorDir . '/ramsey/uuid/src/Rfc4122/VersionTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\Decimal' => $vendorDir . '/ramsey/uuid/src/Type/Decimal.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\Hexadecimal' => $vendorDir . '/ramsey/uuid/src/Type/Hexadecimal.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\Integer' => $vendorDir . '/ramsey/uuid/src/Type/Integer.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\NumberInterface' => $vendorDir . '/ramsey/uuid/src/Type/NumberInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\Time' => $vendorDir . '/ramsey/uuid/src/Type/Time.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\TypeInterface' => $vendorDir . '/ramsey/uuid/src/Type/TypeInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Uuid' => $vendorDir . '/ramsey/uuid/src/Uuid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\UuidFactory' => $vendorDir . '/ramsey/uuid/src/UuidFactory.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\UuidFactoryInterface' => $vendorDir . '/ramsey/uuid/src/UuidFactoryInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\UuidInterface' => $vendorDir . '/ramsey/uuid/src/UuidInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Validator\\GenericValidator' => $vendorDir . '/ramsey/uuid/src/Validator/GenericValidator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Validator\\ValidatorInterface' => $vendorDir . '/ramsey/uuid/src/Validator/ValidatorInterface.php', + 'RayGlobalScoped\\Spatie\\Backtrace\\Backtrace' => $vendorDir . '/spatie/backtrace/src/Backtrace.php', + 'RayGlobalScoped\\Spatie\\Backtrace\\CodeSnippet' => $vendorDir . '/spatie/backtrace/src/CodeSnippet.php', + 'RayGlobalScoped\\Spatie\\Backtrace\\File' => $vendorDir . '/spatie/backtrace/src/File.php', + 'RayGlobalScoped\\Spatie\\Backtrace\\Frame' => $vendorDir . '/spatie/backtrace/src/Frame.php', + 'RayGlobalScoped\\Spatie\\Macroable\\Macroable' => $vendorDir . '/spatie/macroable/src/Macroable.php', + 'RayGlobalScoped\\Spatie\\Ray\\ArgumentConverter' => $vendorDir . '/spatie/ray/src/ArgumentConverter.php', + 'RayGlobalScoped\\Spatie\\Ray\\Client' => $vendorDir . '/spatie/ray/src/Client.php', + 'RayGlobalScoped\\Spatie\\Ray\\Concerns\\RayColors' => $vendorDir . '/spatie/ray/src/Concerns/RayColors.php', + 'RayGlobalScoped\\Spatie\\Ray\\Concerns\\RaySizes' => $vendorDir . '/spatie/ray/src/Concerns/RaySizes.php', + 'RayGlobalScoped\\Spatie\\Ray\\Concerns\\RemovesRayFrames' => $vendorDir . '/spatie/ray/src/Concerns/RemovesRayFrames.php', + 'RayGlobalScoped\\Spatie\\Ray\\Exceptions\\CouldNotConnectToRay' => $vendorDir . '/spatie/ray/src/Exceptions/CouldNotConnectToRay.php', + 'RayGlobalScoped\\Spatie\\Ray\\Exceptions\\StopExecutionRequested' => $vendorDir . '/spatie/ray/src/Exceptions/StopExecutionRequested.php', + 'RayGlobalScoped\\Spatie\\Ray\\Origin\\DefaultOriginFactory' => $vendorDir . '/spatie/ray/src/Origin/DefaultOriginFactory.php', + 'RayGlobalScoped\\Spatie\\Ray\\Origin\\Hostname' => $vendorDir . '/spatie/ray/src/Origin/Hostname.php', + 'RayGlobalScoped\\Spatie\\Ray\\Origin\\Origin' => $vendorDir . '/spatie/ray/src/Origin/Origin.php', + 'RayGlobalScoped\\Spatie\\Ray\\Origin\\OriginFactory' => $vendorDir . '/spatie/ray/src/Origin/OriginFactory.php', + 'RayGlobalScoped\\Spatie\\Ray\\PayloadFactory' => $vendorDir . '/spatie/ray/src/PayloadFactory.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ApplicationLogPayload' => $vendorDir . '/spatie/ray/src/Payloads/ApplicationLogPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\BoolPayload' => $vendorDir . '/spatie/ray/src/Payloads/BoolPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\CallerPayload' => $vendorDir . '/spatie/ray/src/Payloads/CallerPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\CarbonPayload' => $vendorDir . '/spatie/ray/src/Payloads/CarbonPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ClearAllPayload' => $vendorDir . '/spatie/ray/src/Payloads/ClearAllPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ColorPayload' => $vendorDir . '/spatie/ray/src/Payloads/ColorPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\CreateLockPayload' => $vendorDir . '/spatie/ray/src/Payloads/CreateLockPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\CustomPayload' => $vendorDir . '/spatie/ray/src/Payloads/CustomPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\DecodedJsonPayload' => $vendorDir . '/spatie/ray/src/Payloads/DecodedJsonPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ExceptionPayload' => $vendorDir . '/spatie/ray/src/Payloads/ExceptionPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\FileContentsPayload' => $vendorDir . '/spatie/ray/src/Payloads/FileContentsPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\HideAppPayload' => $vendorDir . '/spatie/ray/src/Payloads/HideAppPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\HidePayload' => $vendorDir . '/spatie/ray/src/Payloads/HidePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\HtmlPayload' => $vendorDir . '/spatie/ray/src/Payloads/HtmlPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ImagePayload' => $vendorDir . '/spatie/ray/src/Payloads/ImagePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\JsonStringPayload' => $vendorDir . '/spatie/ray/src/Payloads/JsonStringPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\LogPayload' => $vendorDir . '/spatie/ray/src/Payloads/LogPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\MeasurePayload' => $vendorDir . '/spatie/ray/src/Payloads/MeasurePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\NewScreenPayload' => $vendorDir . '/spatie/ray/src/Payloads/NewScreenPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\NotifyPayload' => $vendorDir . '/spatie/ray/src/Payloads/NotifyPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\NullPayload' => $vendorDir . '/spatie/ray/src/Payloads/NullPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\Payload' => $vendorDir . '/spatie/ray/src/Payloads/Payload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\RemovePayload' => $vendorDir . '/spatie/ray/src/Payloads/RemovePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ShowAppPayload' => $vendorDir . '/spatie/ray/src/Payloads/ShowAppPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\SizePayload' => $vendorDir . '/spatie/ray/src/Payloads/SizePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\TablePayload' => $vendorDir . '/spatie/ray/src/Payloads/TablePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\TracePayload' => $vendorDir . '/spatie/ray/src/Payloads/TracePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\XmlPayload' => $vendorDir . '/spatie/ray/src/Payloads/XmlPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Ray' => $vendorDir . '/spatie/ray/src/Ray.php', + 'RayGlobalScoped\\Spatie\\Ray\\Request' => $vendorDir . '/spatie/ray/src/Request.php', + 'RayGlobalScoped\\Spatie\\Ray\\Settings\\Settings' => $vendorDir . '/spatie/ray/src/Settings/Settings.php', + 'RayGlobalScoped\\Spatie\\Ray\\Settings\\SettingsFactory' => $vendorDir . '/spatie/ray/src/Settings/SettingsFactory.php', + 'RayGlobalScoped\\Spatie\\Ray\\Support\\Counters' => $vendorDir . '/spatie/ray/src/Support/Counters.php', + 'RayGlobalScoped\\Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\Section' => $vendorDir . '/symfony/stopwatch/Section.php', + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\Stopwatch' => $vendorDir . '/symfony/stopwatch/Stopwatch.php', + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\StopwatchEvent' => $vendorDir . '/symfony/stopwatch/StopwatchEvent.php', + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\StopwatchPeriod' => $vendorDir . '/symfony/stopwatch/StopwatchPeriod.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => $vendorDir . '/symfony/var-dumper/Caster/AmqpCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => $vendorDir . '/symfony/var-dumper/Caster/ArgsStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\Caster' => $vendorDir . '/symfony/var-dumper/Caster/Caster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ClassStub' => $vendorDir . '/symfony/var-dumper/Caster/ClassStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ConstStub' => $vendorDir . '/symfony/var-dumper/Caster/ConstStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => $vendorDir . '/symfony/var-dumper/Caster/CutArrayStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\CutStub' => $vendorDir . '/symfony/var-dumper/Caster/CutStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => $vendorDir . '/symfony/var-dumper/Caster/DOMCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DateCaster' => $vendorDir . '/symfony/var-dumper/Caster/DateCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => $vendorDir . '/symfony/var-dumper/Caster/DoctrineCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DsCaster' => $vendorDir . '/symfony/var-dumper/Caster/DsCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => $vendorDir . '/symfony/var-dumper/Caster/DsPairStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\EnumStub' => $vendorDir . '/symfony/var-dumper/Caster/EnumStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ExceptionCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\FrameStub' => $vendorDir . '/symfony/var-dumper/Caster/FrameStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\GmpCaster' => $vendorDir . '/symfony/var-dumper/Caster/GmpCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ImagineCaster' => $vendorDir . '/symfony/var-dumper/Caster/ImagineCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ImgStub' => $vendorDir . '/symfony/var-dumper/Caster/ImgStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\IntlCaster' => $vendorDir . '/symfony/var-dumper/Caster/IntlCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\LinkStub' => $vendorDir . '/symfony/var-dumper/Caster/LinkStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\MemcachedCaster' => $vendorDir . '/symfony/var-dumper/Caster/MemcachedCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => $vendorDir . '/symfony/var-dumper/Caster/PdoCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => $vendorDir . '/symfony/var-dumper/Caster/PgSqlCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ProxyManagerCaster' => $vendorDir . '/symfony/var-dumper/Caster/ProxyManagerCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster' => $vendorDir . '/symfony/var-dumper/Caster/RdKafkaCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => $vendorDir . '/symfony/var-dumper/Caster/RedisCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ReflectionCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/ResourceCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster' => $vendorDir . '/symfony/var-dumper/Caster/SplCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster' => $vendorDir . '/symfony/var-dumper/Caster/StubCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster' => $vendorDir . '/symfony/var-dumper/Caster/SymfonyCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\TraceStub' => $vendorDir . '/symfony/var-dumper/Caster/TraceStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\UuidCaster' => $vendorDir . '/symfony/var-dumper/Caster/UuidCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlReaderCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlResourceCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => $vendorDir . '/symfony/var-dumper/Cloner/AbstractCloner.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => $vendorDir . '/symfony/var-dumper/Cloner/ClonerInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\Cursor' => $vendorDir . '/symfony/var-dumper/Cloner/Cursor.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\Data' => $vendorDir . '/symfony/var-dumper/Cloner/Data.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => $vendorDir . '/symfony/var-dumper/Cloner/DumperInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\Stub' => $vendorDir . '/symfony/var-dumper/Cloner/Stub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => $vendorDir . '/symfony/var-dumper/Cloner/VarCloner.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Command\\Descriptor\\CliDescriptor' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/CliDescriptor.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Command\\Descriptor\\DumpDescriptorInterface' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Command\\Descriptor\\HtmlDescriptor' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Command\\ServerDumpCommand' => $vendorDir . '/symfony/var-dumper/Command/ServerDumpCommand.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => $vendorDir . '/symfony/var-dumper/Dumper/AbstractDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => $vendorDir . '/symfony/var-dumper/Dumper/CliDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\CliContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\RequestContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\SourceContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextualizedDumper' => $vendorDir . '/symfony/var-dumper/Dumper/ContextualizedDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => $vendorDir . '/symfony/var-dumper/Dumper/DataDumperInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => $vendorDir . '/symfony/var-dumper/Dumper/HtmlDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ServerDumper' => $vendorDir . '/symfony/var-dumper/Dumper/ServerDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => $vendorDir . '/symfony/var-dumper/Exception/ThrowingCasterException.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Server\\Connection' => $vendorDir . '/symfony/var-dumper/Server/Connection.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Server\\DumpServer' => $vendorDir . '/symfony/var-dumper/Server/DumpServer.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => $vendorDir . '/symfony/var-dumper/Test/VarDumperTestTrait.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\VarDumper' => $vendorDir . '/symfony/var-dumper/VarDumper.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\Attribute\\Required' => $vendorDir . '/symfony/service-contracts/Attribute/Required.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/service-contracts/ResetInterface.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/service-contracts/ServiceLocatorTrait.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/service-contracts/Test/ServiceLocatorTest.php', + 'RayGlobalScoped\\Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php', + 'RayGlobalScoped\\Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php', + 'RayGlobalScoped\\Symfony\\Polyfill\\Php80\\Php80' => $vendorDir . '/symfony/polyfill-php80/Php80.php', + 'RayGlobalScoped\\UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', + 'RayGlobalScoped\\ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', +); diff --git a/build/vendor/composer/autoload_files.php b/build/vendor/composer/autoload_files.php new file mode 100644 index 0000000..97e5176 --- /dev/null +++ b/build/vendor/composer/autoload_files.php @@ -0,0 +1,15 @@ + $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', + '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + 'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php', + '3074abeef0bacf5811f59e9dee6311d1' => $vendorDir . '/spatie/ray/src/helpers.php', +); diff --git a/build/vendor/composer/autoload_namespaces.php b/build/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..b7fc012 --- /dev/null +++ b/build/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/symfony/polyfill-php80'), + 'RayGlobalScoped\\Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'RayGlobalScoped\\Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\' => array($vendorDir . '/symfony/stopwatch'), + 'RayGlobalScoped\\Spatie\\Ray\\' => array($vendorDir . '/spatie/ray/src'), + 'RayGlobalScoped\\Spatie\\Macroable\\' => array($vendorDir . '/spatie/macroable/src'), + 'RayGlobalScoped\\Spatie\\Backtrace\\' => array($vendorDir . '/spatie/backtrace/src'), + 'RayGlobalScoped\\Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'), + 'RayGlobalScoped\\Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'), + 'RayGlobalScoped\\Psr\\Container\\' => array($vendorDir . '/psr/container/src'), + 'RayGlobalScoped\\Brick\\Math\\' => array($vendorDir . '/brick/math/src'), +); diff --git a/build/vendor/composer/autoload_real.php b/build/vendor/composer/autoload_real.php new file mode 100644 index 0000000..77fcf0e --- /dev/null +++ b/build/vendor/composer/autoload_real.php @@ -0,0 +1,66 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInitRayGlobalScoped::getInitializer($loader)); + } else { + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->setClassMapAuthoritative(true); + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInitRayGlobalScoped::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequireRayGlobalScoped($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequireRayGlobalScoped($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/build/vendor/composer/autoload_static.php b/build/vendor/composer/autoload_static.php new file mode 100644 index 0000000..5d8e13a --- /dev/null +++ b/build/vendor/composer/autoload_static.php @@ -0,0 +1,384 @@ + __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', + '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + 'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php', + '3074abeef0bacf5811f59e9dee6311d1' => __DIR__ . '/..' . '/spatie/ray/src/helpers.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'R' => + array ( + 'RayGlobalScoped\\Symfony\\Polyfill\\Php80\\' => 39, + 'RayGlobalScoped\\Symfony\\Polyfill\\Mbstring\\' => 42, + 'RayGlobalScoped\\Symfony\\Polyfill\\Ctype\\' => 39, + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\' => 42, + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\' => 44, + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\' => 44, + 'RayGlobalScoped\\Spatie\\Ray\\' => 27, + 'RayGlobalScoped\\Spatie\\Macroable\\' => 33, + 'RayGlobalScoped\\Spatie\\Backtrace\\' => 33, + 'RayGlobalScoped\\Ramsey\\Uuid\\' => 28, + 'RayGlobalScoped\\Ramsey\\Collection\\' => 34, + 'RayGlobalScoped\\Psr\\Container\\' => 30, + 'RayGlobalScoped\\Brick\\Math\\' => 27, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'RayGlobalScoped\\Symfony\\Polyfill\\Php80\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', + ), + 'RayGlobalScoped\\Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'RayGlobalScoped\\Symfony\\Polyfill\\Ctype\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', + ), + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/service-contracts', + ), + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/var-dumper', + ), + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/stopwatch', + ), + 'RayGlobalScoped\\Spatie\\Ray\\' => + array ( + 0 => __DIR__ . '/..' . '/spatie/ray/src', + ), + 'RayGlobalScoped\\Spatie\\Macroable\\' => + array ( + 0 => __DIR__ . '/..' . '/spatie/macroable/src', + ), + 'RayGlobalScoped\\Spatie\\Backtrace\\' => + array ( + 0 => __DIR__ . '/..' . '/spatie/backtrace/src', + ), + 'RayGlobalScoped\\Ramsey\\Uuid\\' => + array ( + 0 => __DIR__ . '/..' . '/ramsey/uuid/src', + ), + 'RayGlobalScoped\\Ramsey\\Collection\\' => + array ( + 0 => __DIR__ . '/..' . '/ramsey/collection/src', + ), + 'RayGlobalScoped\\Psr\\Container\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/container/src', + ), + 'RayGlobalScoped\\Brick\\Math\\' => + array ( + 0 => __DIR__ . '/..' . '/brick/math/src', + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'RayGlobalScoped\\Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'RayGlobalScoped\\Brick\\Math\\BigDecimal' => __DIR__ . '/..' . '/brick/math/src/BigDecimal.php', + 'RayGlobalScoped\\Brick\\Math\\BigInteger' => __DIR__ . '/..' . '/brick/math/src/BigInteger.php', + 'RayGlobalScoped\\Brick\\Math\\BigNumber' => __DIR__ . '/..' . '/brick/math/src/BigNumber.php', + 'RayGlobalScoped\\Brick\\Math\\BigRational' => __DIR__ . '/..' . '/brick/math/src/BigRational.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\DivisionByZeroException' => __DIR__ . '/..' . '/brick/math/src/Exception/DivisionByZeroException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\IntegerOverflowException' => __DIR__ . '/..' . '/brick/math/src/Exception/IntegerOverflowException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\MathException' => __DIR__ . '/..' . '/brick/math/src/Exception/MathException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\NegativeNumberException' => __DIR__ . '/..' . '/brick/math/src/Exception/NegativeNumberException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\NumberFormatException' => __DIR__ . '/..' . '/brick/math/src/Exception/NumberFormatException.php', + 'RayGlobalScoped\\Brick\\Math\\Exception\\RoundingNecessaryException' => __DIR__ . '/..' . '/brick/math/src/Exception/RoundingNecessaryException.php', + 'RayGlobalScoped\\Brick\\Math\\Internal\\Calculator' => __DIR__ . '/..' . '/brick/math/src/Internal/Calculator.php', + 'RayGlobalScoped\\Brick\\Math\\Internal\\Calculator\\BcMathCalculator' => __DIR__ . '/..' . '/brick/math/src/Internal/Calculator/BcMathCalculator.php', + 'RayGlobalScoped\\Brick\\Math\\Internal\\Calculator\\GmpCalculator' => __DIR__ . '/..' . '/brick/math/src/Internal/Calculator/GmpCalculator.php', + 'RayGlobalScoped\\Brick\\Math\\Internal\\Calculator\\NativeCalculator' => __DIR__ . '/..' . '/brick/math/src/Internal/Calculator/NativeCalculator.php', + 'RayGlobalScoped\\Brick\\Math\\RoundingMode' => __DIR__ . '/..' . '/brick/math/src/RoundingMode.php', + 'RayGlobalScoped\\Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php', + 'RayGlobalScoped\\Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php', + 'RayGlobalScoped\\Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\AbstractArray' => __DIR__ . '/..' . '/ramsey/collection/src/AbstractArray.php', + 'RayGlobalScoped\\Ramsey\\Collection\\AbstractCollection' => __DIR__ . '/..' . '/ramsey/collection/src/AbstractCollection.php', + 'RayGlobalScoped\\Ramsey\\Collection\\AbstractSet' => __DIR__ . '/..' . '/ramsey/collection/src/AbstractSet.php', + 'RayGlobalScoped\\Ramsey\\Collection\\ArrayInterface' => __DIR__ . '/..' . '/ramsey/collection/src/ArrayInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Collection' => __DIR__ . '/..' . '/ramsey/collection/src/Collection.php', + 'RayGlobalScoped\\Ramsey\\Collection\\CollectionInterface' => __DIR__ . '/..' . '/ramsey/collection/src/CollectionInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\DoubleEndedQueue' => __DIR__ . '/..' . '/ramsey/collection/src/DoubleEndedQueue.php', + 'RayGlobalScoped\\Ramsey\\Collection\\DoubleEndedQueueInterface' => __DIR__ . '/..' . '/ramsey/collection/src/DoubleEndedQueueInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\CollectionMismatchException' => __DIR__ . '/..' . '/ramsey/collection/src/Exception/CollectionMismatchException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/ramsey/collection/src/Exception/InvalidArgumentException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\InvalidSortOrderException' => __DIR__ . '/..' . '/ramsey/collection/src/Exception/InvalidSortOrderException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\NoSuchElementException' => __DIR__ . '/..' . '/ramsey/collection/src/Exception/NoSuchElementException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/ramsey/collection/src/Exception/OutOfBoundsException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\UnsupportedOperationException' => __DIR__ . '/..' . '/ramsey/collection/src/Exception/UnsupportedOperationException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Exception\\ValueExtractionException' => __DIR__ . '/..' . '/ramsey/collection/src/Exception/ValueExtractionException.php', + 'RayGlobalScoped\\Ramsey\\Collection\\GenericArray' => __DIR__ . '/..' . '/ramsey/collection/src/GenericArray.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\AbstractMap' => __DIR__ . '/..' . '/ramsey/collection/src/Map/AbstractMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\AbstractTypedMap' => __DIR__ . '/..' . '/ramsey/collection/src/Map/AbstractTypedMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\AssociativeArrayMap' => __DIR__ . '/..' . '/ramsey/collection/src/Map/AssociativeArrayMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\MapInterface' => __DIR__ . '/..' . '/ramsey/collection/src/Map/MapInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\NamedParameterMap' => __DIR__ . '/..' . '/ramsey/collection/src/Map/NamedParameterMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\TypedMap' => __DIR__ . '/..' . '/ramsey/collection/src/Map/TypedMap.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Map\\TypedMapInterface' => __DIR__ . '/..' . '/ramsey/collection/src/Map/TypedMapInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Queue' => __DIR__ . '/..' . '/ramsey/collection/src/Queue.php', + 'RayGlobalScoped\\Ramsey\\Collection\\QueueInterface' => __DIR__ . '/..' . '/ramsey/collection/src/QueueInterface.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Set' => __DIR__ . '/..' . '/ramsey/collection/src/Set.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Tool\\TypeTrait' => __DIR__ . '/..' . '/ramsey/collection/src/Tool/TypeTrait.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Tool\\ValueExtractorTrait' => __DIR__ . '/..' . '/ramsey/collection/src/Tool/ValueExtractorTrait.php', + 'RayGlobalScoped\\Ramsey\\Collection\\Tool\\ValueToStringTrait' => __DIR__ . '/..' . '/ramsey/collection/src/Tool/ValueToStringTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\BinaryUtils' => __DIR__ . '/..' . '/ramsey/uuid/src/BinaryUtils.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\BuilderCollection' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/BuilderCollection.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\FallbackBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/FallbackBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Builder\\UuidBuilderInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/UuidBuilderInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\CodecInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/CodecInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\GuidStringCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/GuidStringCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\OrderedTimeCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/OrderedTimeCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\StringCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/StringCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\TimestampFirstCombCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Codec\\TimestampLastCombCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/TimestampLastCombCodec.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\NumberConverterInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/NumberConverterInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Number\\BigNumberConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Number/BigNumberConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Number\\DegradedNumberConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Number\\GenericNumberConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\TimeConverterInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/TimeConverterInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Time\\BigNumberTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Time\\DegradedTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Time\\GenericTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Converter\\Time\\PhpTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\DegradedUuid' => __DIR__ . '/..' . '/ramsey/uuid/src/DegradedUuid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\DeprecatedUuidInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/DeprecatedUuidInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\DeprecatedUuidMethodsTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\BuilderNotFoundException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/BuilderNotFoundException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\DateTimeException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/DateTimeException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\DceSecurityException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/DceSecurityException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/InvalidArgumentException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\InvalidBytesException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/InvalidBytesException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\InvalidUuidStringException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/InvalidUuidStringException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\NameException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/NameException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\NodeException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/NodeException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\RandomSourceException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/RandomSourceException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\TimeSourceException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/TimeSourceException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\UnableToBuildUuidException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/UnableToBuildUuidException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Exception\\UnsupportedOperationException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/UnsupportedOperationException.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\FeatureSet' => __DIR__ . '/..' . '/ramsey/uuid/src/FeatureSet.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Fields\\FieldsInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Fields/FieldsInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Fields\\SerializableFieldsTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/Fields/SerializableFieldsTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\CombGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/CombGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\DceSecurityGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/DceSecurityGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\DceSecurityGeneratorInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\DefaultNameGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/DefaultNameGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\DefaultTimeGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/DefaultTimeGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\NameGeneratorFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/NameGeneratorFactory.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\NameGeneratorInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/NameGeneratorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\PeclUuidNameGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\PeclUuidRandomGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\PeclUuidTimeGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\RandomBytesGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/RandomBytesGenerator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\RandomGeneratorFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/RandomGeneratorFactory.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\RandomGeneratorInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/RandomGeneratorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\RandomLibAdapter' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/RandomLibAdapter.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\TimeGeneratorFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/TimeGeneratorFactory.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Generator\\TimeGeneratorInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/TimeGeneratorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Guid\\Fields' => __DIR__ . '/..' . '/ramsey/uuid/src/Guid/Fields.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Guid\\Guid' => __DIR__ . '/..' . '/ramsey/uuid/src/Guid/Guid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Guid\\GuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Guid/GuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Lazy\\LazyUuidFromString' => __DIR__ . '/..' . '/ramsey/uuid/src/Lazy/LazyUuidFromString.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Math\\BrickMathCalculator' => __DIR__ . '/..' . '/ramsey/uuid/src/Math/BrickMathCalculator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Math\\CalculatorInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Math/CalculatorInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Math\\RoundingMode' => __DIR__ . '/..' . '/ramsey/uuid/src/Math/RoundingMode.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Nonstandard\\Fields' => __DIR__ . '/..' . '/ramsey/uuid/src/Nonstandard/Fields.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Nonstandard\\Uuid' => __DIR__ . '/..' . '/ramsey/uuid/src/Nonstandard/Uuid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Nonstandard\\UuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Nonstandard/UuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Nonstandard\\UuidV6' => __DIR__ . '/..' . '/ramsey/uuid/src/Nonstandard/UuidV6.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\DceSecurityProviderInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Dce\\SystemDceSecurityProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\NodeProviderInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/NodeProviderInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\FallbackNodeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\NodeProviderCollection' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\RandomNodeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\StaticNodeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Node\\SystemNodeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\TimeProviderInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/TimeProviderInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Time\\FixedTimeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\Fields' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/Fields.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\FieldsInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/FieldsInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\NilTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/NilTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\NilUuid' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/NilUuid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidBuilder.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV1' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV1.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV2' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV2.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV3' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV3.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV4' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV4.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\UuidV5' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV5.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\Validator' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/Validator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\VariantTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/VariantTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Rfc4122\\VersionTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/VersionTrait.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\Decimal' => __DIR__ . '/..' . '/ramsey/uuid/src/Type/Decimal.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\Hexadecimal' => __DIR__ . '/..' . '/ramsey/uuid/src/Type/Hexadecimal.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\Integer' => __DIR__ . '/..' . '/ramsey/uuid/src/Type/Integer.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\NumberInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Type/NumberInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\Time' => __DIR__ . '/..' . '/ramsey/uuid/src/Type/Time.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Type\\TypeInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Type/TypeInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Uuid' => __DIR__ . '/..' . '/ramsey/uuid/src/Uuid.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\UuidFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactory.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\UuidFactoryInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactoryInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\UuidInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidInterface.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Validator\\GenericValidator' => __DIR__ . '/..' . '/ramsey/uuid/src/Validator/GenericValidator.php', + 'RayGlobalScoped\\Ramsey\\Uuid\\Validator\\ValidatorInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Validator/ValidatorInterface.php', + 'RayGlobalScoped\\Spatie\\Backtrace\\Backtrace' => __DIR__ . '/..' . '/spatie/backtrace/src/Backtrace.php', + 'RayGlobalScoped\\Spatie\\Backtrace\\CodeSnippet' => __DIR__ . '/..' . '/spatie/backtrace/src/CodeSnippet.php', + 'RayGlobalScoped\\Spatie\\Backtrace\\File' => __DIR__ . '/..' . '/spatie/backtrace/src/File.php', + 'RayGlobalScoped\\Spatie\\Backtrace\\Frame' => __DIR__ . '/..' . '/spatie/backtrace/src/Frame.php', + 'RayGlobalScoped\\Spatie\\Macroable\\Macroable' => __DIR__ . '/..' . '/spatie/macroable/src/Macroable.php', + 'RayGlobalScoped\\Spatie\\Ray\\ArgumentConverter' => __DIR__ . '/..' . '/spatie/ray/src/ArgumentConverter.php', + 'RayGlobalScoped\\Spatie\\Ray\\Client' => __DIR__ . '/..' . '/spatie/ray/src/Client.php', + 'RayGlobalScoped\\Spatie\\Ray\\Concerns\\RayColors' => __DIR__ . '/..' . '/spatie/ray/src/Concerns/RayColors.php', + 'RayGlobalScoped\\Spatie\\Ray\\Concerns\\RaySizes' => __DIR__ . '/..' . '/spatie/ray/src/Concerns/RaySizes.php', + 'RayGlobalScoped\\Spatie\\Ray\\Concerns\\RemovesRayFrames' => __DIR__ . '/..' . '/spatie/ray/src/Concerns/RemovesRayFrames.php', + 'RayGlobalScoped\\Spatie\\Ray\\Exceptions\\CouldNotConnectToRay' => __DIR__ . '/..' . '/spatie/ray/src/Exceptions/CouldNotConnectToRay.php', + 'RayGlobalScoped\\Spatie\\Ray\\Exceptions\\StopExecutionRequested' => __DIR__ . '/..' . '/spatie/ray/src/Exceptions/StopExecutionRequested.php', + 'RayGlobalScoped\\Spatie\\Ray\\Origin\\DefaultOriginFactory' => __DIR__ . '/..' . '/spatie/ray/src/Origin/DefaultOriginFactory.php', + 'RayGlobalScoped\\Spatie\\Ray\\Origin\\Hostname' => __DIR__ . '/..' . '/spatie/ray/src/Origin/Hostname.php', + 'RayGlobalScoped\\Spatie\\Ray\\Origin\\Origin' => __DIR__ . '/..' . '/spatie/ray/src/Origin/Origin.php', + 'RayGlobalScoped\\Spatie\\Ray\\Origin\\OriginFactory' => __DIR__ . '/..' . '/spatie/ray/src/Origin/OriginFactory.php', + 'RayGlobalScoped\\Spatie\\Ray\\PayloadFactory' => __DIR__ . '/..' . '/spatie/ray/src/PayloadFactory.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ApplicationLogPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/ApplicationLogPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\BoolPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/BoolPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\CallerPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/CallerPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\CarbonPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/CarbonPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ClearAllPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/ClearAllPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ColorPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/ColorPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\CreateLockPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/CreateLockPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\CustomPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/CustomPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\DecodedJsonPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/DecodedJsonPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ExceptionPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/ExceptionPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\FileContentsPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/FileContentsPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\HideAppPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/HideAppPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\HidePayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/HidePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\HtmlPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/HtmlPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ImagePayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/ImagePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\JsonStringPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/JsonStringPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\LogPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/LogPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\MeasurePayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/MeasurePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\NewScreenPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/NewScreenPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\NotifyPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/NotifyPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\NullPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/NullPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\Payload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/Payload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\RemovePayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/RemovePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\ShowAppPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/ShowAppPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\SizePayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/SizePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\TablePayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/TablePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\TracePayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/TracePayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Payloads\\XmlPayload' => __DIR__ . '/..' . '/spatie/ray/src/Payloads/XmlPayload.php', + 'RayGlobalScoped\\Spatie\\Ray\\Ray' => __DIR__ . '/..' . '/spatie/ray/src/Ray.php', + 'RayGlobalScoped\\Spatie\\Ray\\Request' => __DIR__ . '/..' . '/spatie/ray/src/Request.php', + 'RayGlobalScoped\\Spatie\\Ray\\Settings\\Settings' => __DIR__ . '/..' . '/spatie/ray/src/Settings/Settings.php', + 'RayGlobalScoped\\Spatie\\Ray\\Settings\\SettingsFactory' => __DIR__ . '/..' . '/spatie/ray/src/Settings/SettingsFactory.php', + 'RayGlobalScoped\\Spatie\\Ray\\Support\\Counters' => __DIR__ . '/..' . '/spatie/ray/src/Support/Counters.php', + 'RayGlobalScoped\\Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\Section' => __DIR__ . '/..' . '/symfony/stopwatch/Section.php', + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\Stopwatch' => __DIR__ . '/..' . '/symfony/stopwatch/Stopwatch.php', + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\StopwatchEvent' => __DIR__ . '/..' . '/symfony/stopwatch/StopwatchEvent.php', + 'RayGlobalScoped\\Symfony\\Component\\Stopwatch\\StopwatchPeriod' => __DIR__ . '/..' . '/symfony/stopwatch/StopwatchPeriod.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/AmqpCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ArgsStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\Caster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/Caster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ClassStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ClassStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ConstStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ConstStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutArrayStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\CutStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DOMCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DateCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DateCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DoctrineCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DsCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsPairStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\EnumStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/EnumStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ExceptionCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\FrameStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/FrameStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\GmpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/GmpCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ImagineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ImagineCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ImgStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ImgStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\IntlCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/IntlCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\LinkStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/LinkStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\MemcachedCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/MemcachedCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PdoCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PgSqlCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ProxyManagerCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ProxyManagerCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/RdKafkaCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/RedisCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ReflectionCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ResourceCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/SplCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/StubCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/SymfonyCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\TraceStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/TraceStub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\UuidCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/UuidCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlReaderCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlResourceCaster.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/AbstractCloner.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/ClonerInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\Cursor' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Cursor.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\Data' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Data.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/DumperInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\Stub' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Stub.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/VarCloner.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Command\\Descriptor\\CliDescriptor' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/CliDescriptor.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Command\\Descriptor\\DumpDescriptorInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Command\\Descriptor\\HtmlDescriptor' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Command\\ServerDumpCommand' => __DIR__ . '/..' . '/symfony/var-dumper/Command/ServerDumpCommand.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/AbstractDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/CliDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\CliContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\RequestContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\SourceContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ContextualizedDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextualizedDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/DataDumperInterface.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/HtmlDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Dumper\\ServerDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ServerDumper.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => __DIR__ . '/..' . '/symfony/var-dumper/Exception/ThrowingCasterException.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Server\\Connection' => __DIR__ . '/..' . '/symfony/var-dumper/Server/Connection.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Server\\DumpServer' => __DIR__ . '/..' . '/symfony/var-dumper/Server/DumpServer.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => __DIR__ . '/..' . '/symfony/var-dumper/Test/VarDumperTestTrait.php', + 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\VarDumper' => __DIR__ . '/..' . '/symfony/var-dumper/VarDumper.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\Attribute\\Required' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/Required.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ResetInterface.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceLocatorTrait.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php', + 'RayGlobalScoped\\Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/service-contracts/Test/ServiceLocatorTest.php', + 'RayGlobalScoped\\Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php', + 'RayGlobalScoped\\Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php', + 'RayGlobalScoped\\Symfony\\Polyfill\\Php80\\Php80' => __DIR__ . '/..' . '/symfony/polyfill-php80/Php80.php', + 'RayGlobalScoped\\UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', + 'RayGlobalScoped\\ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInitRayGlobalScoped::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitRayGlobalScoped::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitRayGlobalScoped::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/build/vendor/composer/installed.json b/build/vendor/composer/installed.json new file mode 100644 index 0000000..070d26c --- /dev/null +++ b/build/vendor/composer/installed.json @@ -0,0 +1,976 @@ +{ + "packages": [ + { + "name": "brick\/math", + "version": "0.9.2", + "version_normalized": "0.9.2.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/brick\/math.git", + "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/brick\/math\/zipball\/dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "php-coveralls\/php-coveralls": "^2.2", + "phpunit\/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "vimeo\/psalm": "4.3.2" + }, + "time": "2021-01-20T22:51:39+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Brick\\Math\\": "src\/" + } + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "support": { + "issues": "https:\/\/github.com\/brick\/math\/issues", + "source": "https:\/\/github.com\/brick\/math\/tree\/0.9.2" + }, + "funding": [ + { + "url": "https:\/\/tidelift.com\/funding\/github\/packagist\/brick\/math", + "type": "tidelift" + } + ], + "install-path": "..\/brick\/math" + }, + { + "name": "psr\/container", + "version": "1.1.1", + "version_normalized": "1.1.1.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/php-fig\/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/php-fig\/container\/zipball\/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "time": "2021-03-05T17:36:06+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Psr\\Container\\": "src\/" + } + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https:\/\/www.php-fig.org\/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https:\/\/github.com\/php-fig\/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https:\/\/github.com\/php-fig\/container\/issues", + "source": "https:\/\/github.com\/php-fig\/container\/tree\/1.1.1" + }, + "install-path": "..\/psr\/container" + }, + { + "name": "ramsey\/collection", + "version": "1.1.3", + "version_normalized": "1.1.3.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/ramsey\/collection.git", + "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/ramsey\/collection\/zipball\/28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", + "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8" + }, + "require-dev": { + "captainhook\/captainhook": "^5.3", + "dealerdirect\/phpcodesniffer-composer-installer": "^0.7.0", + "ergebnis\/composer-normalize": "^2.6", + "fakerphp\/faker": "^1.5", + "hamcrest\/hamcrest-php": "^2", + "jangregor\/phpstan-prophecy": "^0.8", + "mockery\/mockery": "^1.3", + "phpstan\/extension-installer": "^1", + "phpstan\/phpstan": "^0.12.32", + "phpstan\/phpstan-mockery": "^0.12.5", + "phpstan\/phpstan-phpunit": "^0.12.11", + "phpunit\/phpunit": "^8.5 || ^9", + "psy\/psysh": "^0.10.4", + "slevomat\/coding-standard": "^6.3", + "squizlabs\/php_codesniffer": "^3.5", + "vimeo\/psalm": "^4.4" + }, + "time": "2021-01-21T17:40:04+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Ramsey\\Collection\\": "src\/" + } + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https:\/\/benramsey.com" + } + ], + "description": "A PHP 7.2+ library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https:\/\/github.com\/ramsey\/collection\/issues", + "source": "https:\/\/github.com\/ramsey\/collection\/tree\/1.1.3" + }, + "funding": [ + { + "url": "https:\/\/github.com\/ramsey", + "type": "github" + }, + { + "url": "https:\/\/tidelift.com\/funding\/github\/packagist\/ramsey\/collection", + "type": "tidelift" + } + ], + "install-path": "..\/ramsey\/collection" + }, + { + "name": "ramsey\/uuid", + "version": "4.1.1", + "version_normalized": "4.1.1.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/ramsey\/uuid.git", + "reference": "cd4032040a750077205918c86049aa0f43d22947" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/ramsey\/uuid\/zipball\/cd4032040a750077205918c86049aa0f43d22947", + "reference": "cd4032040a750077205918c86049aa0f43d22947", + "shasum": "" + }, + "require": { + "brick\/math": "^0.8 || ^0.9", + "ext-json": "*", + "php": "^7.2 || ^8", + "ramsey\/collection": "^1.0", + "symfony\/polyfill-ctype": "^1.8" + }, + "replace": { + "rhumsaa\/uuid": "self.version" + }, + "require-dev": { + "codeception\/aspect-mock": "^3", + "dealerdirect\/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7.0", + "doctrine\/annotations": "^1.8", + "goaop\/framework": "^2", + "mockery\/mockery": "^1.3", + "moontoast\/math": "^1.1", + "paragonie\/random-lib": "^2", + "php-mock\/php-mock-mockery": "^1.3", + "php-mock\/php-mock-phpunit": "^2.5", + "php-parallel-lint\/php-parallel-lint": "^1.1", + "phpbench\/phpbench": "^0.17.1", + "phpstan\/extension-installer": "^1.0", + "phpstan\/phpstan": "^0.12", + "phpstan\/phpstan-mockery": "^0.12", + "phpstan\/phpstan-phpunit": "^0.12", + "phpunit\/phpunit": "^8.5", + "psy\/psysh": "^0.10.0", + "slevomat\/coding-standard": "^6.0", + "squizlabs\/php_codesniffer": "^3.5", + "vimeo\/psalm": "3.9.4" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie\/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey\/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "time": "2020-08-18T17:17:46+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Ramsey\\Uuid\\": "src\/" + }, + "files": [ + "src\/functions.php" + ] + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "homepage": "https:\/\/github.com\/ramsey\/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "support": { + "issues": "https:\/\/github.com\/ramsey\/uuid\/issues", + "rss": "https:\/\/github.com\/ramsey\/uuid\/releases.atom", + "source": "https:\/\/github.com\/ramsey\/uuid" + }, + "funding": [ + { + "url": "https:\/\/github.com\/ramsey", + "type": "github" + } + ], + "install-path": "..\/ramsey\/uuid" + }, + { + "name": "spatie\/backtrace", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/spatie\/backtrace.git", + "reference": "3440fe023a7d5b4497090fb6b2dcdc747daf7873" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/spatie\/backtrace\/zipball\/3440fe023a7d5b4497090fb6b2dcdc747daf7873", + "reference": "3440fe023a7d5b4497090fb6b2dcdc747daf7873", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "ext-json": "*", + "phpunit\/phpunit": "^9.3", + "symfony\/var-dumper": "^5.1" + }, + "time": "2021-01-29T09:20:43+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Spatie\\Backtrace\\": "src" + } + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van de Herten", + "email": "freek@spatie.be", + "homepage": "https:\/\/spatie.be", + "role": "Developer" + } + ], + "description": "A better backtrace", + "homepage": "https:\/\/github.com\/spatie\/backtrace", + "keywords": [ + "Backtrace", + "spatie" + ], + "support": { + "issues": "https:\/\/github.com\/spatie\/backtrace\/issues", + "source": "https:\/\/github.com\/spatie\/backtrace\/tree\/1.1.0" + }, + "funding": [ + { + "url": "https:\/\/github.com\/sponsors\/spatie", + "type": "github" + }, + { + "url": "https:\/\/spatie.be\/open-source\/support-us", + "type": "other" + } + ], + "install-path": "..\/spatie\/backtrace" + }, + { + "name": "spatie\/macroable", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/spatie\/macroable.git", + "reference": "7a99549fc001c925714b329220dea680c04bfa48" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/spatie\/macroable\/zipball\/7a99549fc001c925714b329220dea680c04bfa48", + "reference": "7a99549fc001c925714b329220dea680c04bfa48", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "require-dev": { + "phpunit\/phpunit": "^8.0|^9.3" + }, + "time": "2020-11-03T10:15:05+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Spatie\\Macroable\\": "src" + } + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https:\/\/spatie.be", + "role": "Developer" + } + ], + "description": "A trait to dynamically add methods to a class", + "homepage": "https:\/\/github.com\/spatie\/macroable", + "keywords": [ + "macroable", + "spatie" + ], + "support": { + "issues": "https:\/\/github.com\/spatie\/macroable\/issues", + "source": "https:\/\/github.com\/spatie\/macroable\/tree\/1.0.1" + }, + "install-path": "..\/spatie\/macroable" + }, + { + "name": "spatie\/ray", + "version": "1.21.2", + "version_normalized": "1.21.2.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/spatie\/ray.git", + "reference": "829676b1b6791aba6660fcca6f553d72c894a0ae" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/spatie\/ray\/zipball\/829676b1b6791aba6660fcca6f553d72c894a0ae", + "reference": "829676b1b6791aba6660fcca6f553d72c894a0ae", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "php": "^7.3|^8.0", + "ramsey\/uuid": "^3.0|^4.1", + "spatie\/backtrace": "^1.1", + "spatie\/macroable": "^1.0", + "symfony\/stopwatch": "^4.0|^5.1", + "symfony\/var-dumper": "^4.2|^5.1" + }, + "require-dev": { + "illuminate\/support": "6.x|^8.18", + "nesbot\/carbon": "^2.43", + "phpunit\/phpunit": "^9.5", + "rector\/rector": "^0.9.16", + "spatie\/phpunit-snapshot-assertions": "^4.2", + "spatie\/test-time": "^1.2" + }, + "time": "2021-03-04T11:06:19+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Spatie\\Ray\\": "src" + }, + "files": [ + "src\/helpers.php" + ] + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https:\/\/spatie.be", + "role": "Developer" + } + ], + "description": "Debug with Ray to fix problems faster", + "homepage": "https:\/\/github.com\/spatie\/ray", + "keywords": [ + "ray", + "spatie" + ], + "support": { + "issues": "https:\/\/github.com\/spatie\/ray\/issues", + "source": "https:\/\/github.com\/spatie\/ray\/tree\/1.21.2" + }, + "funding": [ + { + "url": "https:\/\/github.com\/sponsors\/spatie", + "type": "github" + }, + { + "url": "https:\/\/spatie.be\/open-source\/support-us", + "type": "other" + } + ], + "install-path": "..\/spatie\/ray" + }, + { + "name": "symfony\/polyfill-ctype", + "version": "v1.22.1", + "version_normalized": "1.22.1.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/symfony\/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/symfony\/polyfill-ctype\/zipball\/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "time": "2021-01-07T16:49:33+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony\/polyfill", + "url": "https:\/\/github.com\/symfony\/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https:\/\/symfony.com\/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https:\/\/symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https:\/\/github.com\/symfony\/polyfill-ctype\/tree\/v1.22.1" + }, + "funding": [ + { + "url": "https:\/\/symfony.com\/sponsor", + "type": "custom" + }, + { + "url": "https:\/\/github.com\/fabpot", + "type": "github" + }, + { + "url": "https:\/\/tidelift.com\/funding\/github\/packagist\/symfony\/symfony", + "type": "tidelift" + } + ], + "install-path": "..\/symfony\/polyfill-ctype" + }, + { + "name": "symfony\/polyfill-mbstring", + "version": "v1.22.1", + "version_normalized": "1.22.1.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/symfony\/polyfill-mbstring.git", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/symfony\/polyfill-mbstring\/zipball\/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2021-01-22T09:19:47+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony\/polyfill", + "url": "https:\/\/github.com\/symfony\/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https:\/\/symfony.com\/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https:\/\/symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https:\/\/github.com\/symfony\/polyfill-mbstring\/tree\/v1.22.1" + }, + "funding": [ + { + "url": "https:\/\/symfony.com\/sponsor", + "type": "custom" + }, + { + "url": "https:\/\/github.com\/fabpot", + "type": "github" + }, + { + "url": "https:\/\/tidelift.com\/funding\/github\/packagist\/symfony\/symfony", + "type": "tidelift" + } + ], + "install-path": "..\/symfony\/polyfill-mbstring" + }, + { + "name": "symfony\/polyfill-php80", + "version": "v1.22.1", + "version_normalized": "1.22.1.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/symfony\/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/symfony\/polyfill-php80\/zipball\/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "time": "2021-01-07T16:49:33+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony\/polyfill", + "url": "https:\/\/github.com\/symfony\/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources\/stubs" + ] + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https:\/\/symfony.com\/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https:\/\/symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https:\/\/github.com\/symfony\/polyfill-php80\/tree\/v1.22.1" + }, + "funding": [ + { + "url": "https:\/\/symfony.com\/sponsor", + "type": "custom" + }, + { + "url": "https:\/\/github.com\/fabpot", + "type": "github" + }, + { + "url": "https:\/\/tidelift.com\/funding\/github\/packagist\/symfony\/symfony", + "type": "tidelift" + } + ], + "install-path": "..\/symfony\/polyfill-php80" + }, + { + "name": "symfony\/service-contracts", + "version": "v2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/symfony\/service-contracts.git", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/symfony\/service-contracts\/zipball\/d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr\/container": "^1.0" + }, + "suggest": { + "symfony\/service-implementation": "" + }, + "time": "2020-09-07T11:33:47+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony\/contracts", + "url": "https:\/\/github.com\/symfony\/contracts" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https:\/\/symfony.com\/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https:\/\/symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https:\/\/github.com\/symfony\/service-contracts\/tree\/master" + }, + "funding": [ + { + "url": "https:\/\/symfony.com\/sponsor", + "type": "custom" + }, + { + "url": "https:\/\/github.com\/fabpot", + "type": "github" + }, + { + "url": "https:\/\/tidelift.com\/funding\/github\/packagist\/symfony\/symfony", + "type": "tidelift" + } + ], + "install-path": "..\/symfony\/service-contracts" + }, + { + "name": "symfony\/stopwatch", + "version": "v5.2.4", + "version_normalized": "5.2.4.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/symfony\/stopwatch.git", + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/symfony\/stopwatch\/zipball\/b12274acfab9d9850c52583d136a24398cdf1a0c", + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony\/service-contracts": "^1.0|^2" + }, + "time": "2021-01-27T10:15:41+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "RayGlobalScoped\\Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "\/Tests\/" + ] + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https:\/\/symfony.com\/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https:\/\/symfony.com", + "support": { + "source": "https:\/\/github.com\/symfony\/stopwatch\/tree\/v5.2.4" + }, + "funding": [ + { + "url": "https:\/\/symfony.com\/sponsor", + "type": "custom" + }, + { + "url": "https:\/\/github.com\/fabpot", + "type": "github" + }, + { + "url": "https:\/\/tidelift.com\/funding\/github\/packagist\/symfony\/symfony", + "type": "tidelift" + } + ], + "install-path": "..\/symfony\/stopwatch" + }, + { + "name": "symfony\/var-dumper", + "version": "v5.2.6", + "version_normalized": "5.2.6.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/symfony\/var-dumper.git", + "reference": "89412a68ea2e675b4e44f260a5666729f77f668e" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/symfony\/var-dumper\/zipball\/89412a68ea2e675b4e44f260a5666729f77f668e", + "reference": "89412a68ea2e675b4e44f260a5666729f77f668e", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony\/polyfill-mbstring": "~1.0", + "symfony\/polyfill-php80": "^1.15" + }, + "conflict": { + "phpunit\/phpunit": "<5.4.3", + "symfony\/console": "<4.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony\/console": "^4.4|^5.0", + "symfony\/process": "^4.4|^5.0", + "twig\/twig": "^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony\/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony\/console": "To use the ServerDumpCommand and\/or the bin\/var-dump-server script" + }, + "time": "2021-03-28T09:42:18+00:00", + "bin": [ + "Resources\/bin\/var-dump-server" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "Resources\/functions\/dump.php" + ], + "psr-4": { + "RayGlobalScoped\\Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "\/Tests\/" + ] + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https:\/\/symfony.com\/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https:\/\/symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https:\/\/github.com\/symfony\/var-dumper\/tree\/v5.2.6" + }, + "funding": [ + { + "url": "https:\/\/symfony.com\/sponsor", + "type": "custom" + }, + { + "url": "https:\/\/github.com\/fabpot", + "type": "github" + }, + { + "url": "https:\/\/tidelift.com\/funding\/github\/packagist\/symfony\/symfony", + "type": "tidelift" + } + ], + "install-path": "..\/symfony\/var-dumper" + } + ], + "dev": false, + "dev-package-names": [] +} \ No newline at end of file diff --git a/build/vendor/composer/installed.php b/build/vendor/composer/installed.php new file mode 100644 index 0000000..fd1b5bb --- /dev/null +++ b/build/vendor/composer/installed.php @@ -0,0 +1,5 @@ + array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '5e25edcb1b3f8abe876148f59afe519c616edb18', 'name' => 'cuyz/global-ray'), 'versions' => array('brick/math' => array('pretty_version' => '0.9.2', 'version' => '0.9.2.0', 'aliases' => array(), 'reference' => 'dff976c2f3487d42c1db75a3b180e2b9f0e72ce0'), 'cuyz/global-ray' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'aliases' => array(), 'reference' => '5e25edcb1b3f8abe876148f59afe519c616edb18'), 'psr/container' => array('pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'aliases' => array(), 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf'), 'ramsey/collection' => array('pretty_version' => '1.1.3', 'version' => '1.1.3.0', 'aliases' => array(), 'reference' => '28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1'), 'ramsey/uuid' => array('pretty_version' => '4.1.1', 'version' => '4.1.1.0', 'aliases' => array(), 'reference' => 'cd4032040a750077205918c86049aa0f43d22947'), 'rhumsaa/uuid' => array('replaced' => array(0 => '4.1.1')), 'spatie/backtrace' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'aliases' => array(), 'reference' => '3440fe023a7d5b4497090fb6b2dcdc747daf7873'), 'spatie/macroable' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'aliases' => array(), 'reference' => '7a99549fc001c925714b329220dea680c04bfa48'), 'spatie/ray' => array('pretty_version' => '1.21.2', 'version' => '1.21.2.0', 'aliases' => array(), 'reference' => '829676b1b6791aba6660fcca6f553d72c894a0ae'), 'symfony/polyfill-ctype' => array('pretty_version' => 'v1.22.1', 'version' => '1.22.1.0', 'aliases' => array(), 'reference' => 'c6c942b1ac76c82448322025e084cadc56048b4e'), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.22.1', 'version' => '1.22.1.0', 'aliases' => array(), 'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1'), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.22.1', 'version' => '1.22.1.0', 'aliases' => array(), 'reference' => 'dc3063ba22c2a1fd2f45ed856374d79114998f91'), 'symfony/service-contracts' => array('pretty_version' => 'v2.2.0', 'version' => '2.2.0.0', 'aliases' => array(), 'reference' => 'd15da7ba4957ffb8f1747218be9e1a121fd298a1'), 'symfony/stopwatch' => array('pretty_version' => 'v5.2.4', 'version' => '5.2.4.0', 'aliases' => array(), 'reference' => 'b12274acfab9d9850c52583d136a24398cdf1a0c'), 'symfony/var-dumper' => array('pretty_version' => 'v5.2.6', 'version' => '5.2.6.0', 'aliases' => array(), 'reference' => '89412a68ea2e675b4e44f260a5666729f77f668e'))); diff --git a/build/vendor/composer/platform_check.php b/build/vendor/composer/platform_check.php new file mode 100644 index 0000000..92370c5 --- /dev/null +++ b/build/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70300)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.3.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/build/vendor/psr/container/LICENSE b/build/vendor/psr/container/LICENSE new file mode 100644 index 0000000..2877a48 --- /dev/null +++ b/build/vendor/psr/container/LICENSE @@ -0,0 +1,21 @@ +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. diff --git a/build/vendor/psr/container/src/ContainerExceptionInterface.php b/build/vendor/psr/container/src/ContainerExceptionInterface.php new file mode 100644 index 0000000..304c0d7 --- /dev/null +++ b/build/vendor/psr/container/src/ContainerExceptionInterface.php @@ -0,0 +1,10 @@ + + +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. diff --git a/build/vendor/ramsey/collection/src/AbstractArray.php b/build/vendor/ramsey/collection/src/AbstractArray.php new file mode 100644 index 0000000..3d4d4b8 --- /dev/null +++ b/build/vendor/ramsey/collection/src/AbstractArray.php @@ -0,0 +1,160 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +use ArrayIterator; +use Traversable; +use function serialize; +use function unserialize; +/** + * This class provides a basic implementation of `ArrayInterface`, to minimize + * the effort required to implement this interface. + * + * @template T + * @template-implements ArrayInterface + */ +abstract class AbstractArray implements \RayGlobalScoped\Ramsey\Collection\ArrayInterface +{ + /** + * The items of this array. + * + * @var array + */ + protected $data = []; + /** + * Constructs a new array object. + * + * @param array $data The initial items to add to this array. + */ + public function __construct(array $data = []) + { + // Invoke offsetSet() for each value added; in this way, sub-classes + // may provide additional logic about values added to the array object. + foreach ($data as $key => $value) { + $this[$key] = $value; + } + } + /** + * Returns an iterator for this array. + * + * @link http://php.net/manual/en/iteratoraggregate.getiterator.php IteratorAggregate::getIterator() + */ + public function getIterator() : \Traversable + { + return new \ArrayIterator($this->data); + } + /** + * Returns `true` if the given offset exists in this array. + * + * @link http://php.net/manual/en/arrayaccess.offsetexists.php ArrayAccess::offsetExists() + * + * @param array-key $offset The offset to check. + */ + public function offsetExists($offset) : bool + { + return isset($this->data[$offset]); + } + /** + * Returns the value at the specified offset. + * + * @link http://php.net/manual/en/arrayaccess.offsetget.php ArrayAccess::offsetGet() + * + * @param array-key $offset The offset for which a value should be returned. + * + * @return T|null the value stored at the offset, or null if the offset + * does not exist. + */ + public function offsetGet($offset) + { + return $this->data[$offset] ?? null; + } + /** + * Sets the given value to the given offset in the array. + * + * @link http://php.net/manual/en/arrayaccess.offsetset.php ArrayAccess::offsetSet() + * + * @param array-key|null $offset The offset to set. If `null`, the value may be + * set at a numerically-indexed offset. + * @param T $value The value to set at the given offset. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function offsetSet($offset, $value) : void + { + if ($offset === null) { + $this->data[] = $value; + } else { + $this->data[$offset] = $value; + } + } + /** + * Removes the given offset and its value from the array. + * + * @link http://php.net/manual/en/arrayaccess.offsetunset.php ArrayAccess::offsetUnset() + * + * @param array-key $offset The offset to remove from the array. + */ + public function offsetUnset($offset) : void + { + unset($this->data[$offset]); + } + /** + * Returns a serialized string representation of this array object. + * + * @link http://php.net/manual/en/serializable.serialize.php Serializable::serialize() + * + * @return string a PHP serialized string. + */ + public function serialize() : string + { + return \serialize($this->data); + } + /** + * Converts a serialized string representation into an instance object. + * + * @link http://php.net/manual/en/serializable.unserialize.php Serializable::unserialize() + * + * @param string $serialized A PHP serialized string to unserialize. + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + */ + public function unserialize($serialized) : void + { + /** @var array $data */ + $data = \unserialize($serialized, ['allowed_classes' => \false]); + $this->data = $data; + } + /** + * Returns the number of items in this array. + * + * @link http://php.net/manual/en/countable.count.php Countable::count() + */ + public function count() : int + { + return \count($this->data); + } + public function clear() : void + { + $this->data = []; + } + /** + * @inheritDoc + */ + public function toArray() : array + { + return $this->data; + } + public function isEmpty() : bool + { + return \count($this->data) === 0; + } +} diff --git a/build/vendor/ramsey/collection/src/AbstractCollection.php b/build/vendor/ramsey/collection/src/AbstractCollection.php new file mode 100644 index 0000000..c941d63 --- /dev/null +++ b/build/vendor/ramsey/collection/src/AbstractCollection.php @@ -0,0 +1,250 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +use Closure; +use RayGlobalScoped\Ramsey\Collection\Exception\CollectionMismatchException; +use RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Collection\Exception\InvalidSortOrderException; +use RayGlobalScoped\Ramsey\Collection\Exception\OutOfBoundsException; +use RayGlobalScoped\Ramsey\Collection\Tool\TypeTrait; +use RayGlobalScoped\Ramsey\Collection\Tool\ValueExtractorTrait; +use RayGlobalScoped\Ramsey\Collection\Tool\ValueToStringTrait; +use function array_filter; +use function array_map; +use function array_merge; +use function array_search; +use function array_udiff; +use function array_uintersect; +use function current; +use function end; +use function in_array; +use function reset; +use function sprintf; +use function unserialize; +use function usort; +/** + * This class provides a basic implementation of `CollectionInterface`, to + * minimize the effort required to implement this interface + * + * @template T + * @template-extends AbstractArray + * @template-implements CollectionInterface + */ +abstract class AbstractCollection extends \RayGlobalScoped\Ramsey\Collection\AbstractArray implements \RayGlobalScoped\Ramsey\Collection\CollectionInterface +{ + use TypeTrait; + use ValueToStringTrait; + use ValueExtractorTrait; + /** + * @inheritDoc + */ + public function add($element) : bool + { + $this[] = $element; + return \true; + } + /** + * @inheritDoc + */ + public function contains($element, bool $strict = \true) : bool + { + return \in_array($element, $this->data, $strict); + } + /** + * @inheritDoc + */ + public function offsetSet($offset, $value) : void + { + if ($this->checkType($this->getType(), $value) === \false) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Value must be of type ' . $this->getType() . '; value is ' . $this->toolValueToString($value)); + } + if ($offset === null) { + $this->data[] = $value; + } else { + $this->data[$offset] = $value; + } + } + /** + * @inheritDoc + */ + public function remove($element) : bool + { + if (($position = \array_search($element, $this->data, \true)) !== \false) { + unset($this->data[$position]); + return \true; + } + return \false; + } + /** + * @inheritDoc + */ + public function column(string $propertyOrMethod) : array + { + $temp = []; + foreach ($this->data as $item) { + /** @var mixed $value */ + $value = $this->extractValue($item, $propertyOrMethod); + /** @psalm-suppress MixedAssignment */ + $temp[] = $value; + } + return $temp; + } + /** + * @inheritDoc + */ + public function first() + { + if ($this->isEmpty()) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\OutOfBoundsException('Can\'t determine first item. Collection is empty'); + } + \reset($this->data); + /** @var T $first */ + $first = \current($this->data); + return $first; + } + /** + * @inheritDoc + */ + public function last() + { + if ($this->isEmpty()) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\OutOfBoundsException('Can\'t determine last item. Collection is empty'); + } + /** @var T $item */ + $item = \end($this->data); + \reset($this->data); + return $item; + } + public function sort(string $propertyOrMethod, string $order = self::SORT_ASC) : \RayGlobalScoped\Ramsey\Collection\CollectionInterface + { + if (!\in_array($order, [self::SORT_ASC, self::SORT_DESC], \true)) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidSortOrderException('Invalid sort order given: ' . $order); + } + $collection = clone $this; + \usort( + $collection->data, + /** + * @param T $a + * @param T $b + */ + function ($a, $b) use($propertyOrMethod, $order) : int { + /** @var mixed $aValue */ + $aValue = $this->extractValue($a, $propertyOrMethod); + /** @var mixed $bValue */ + $bValue = $this->extractValue($b, $propertyOrMethod); + return ($aValue <=> $bValue) * ($order === self::SORT_DESC ? -1 : 1); + } + ); + return $collection; + } + public function filter(callable $callback) : \RayGlobalScoped\Ramsey\Collection\CollectionInterface + { + $collection = clone $this; + $collection->data = \array_merge([], \array_filter($collection->data, $callback)); + return $collection; + } + /** + * {@inheritdoc} + */ + public function where(string $propertyOrMethod, $value) : \RayGlobalScoped\Ramsey\Collection\CollectionInterface + { + return $this->filter(function ($item) use($propertyOrMethod, $value) { + /** @var mixed $accessorValue */ + $accessorValue = $this->extractValue($item, $propertyOrMethod); + return $accessorValue === $value; + }); + } + public function map(callable $callback) : \RayGlobalScoped\Ramsey\Collection\CollectionInterface + { + return new \RayGlobalScoped\Ramsey\Collection\Collection('mixed', \array_map($callback, $this->data)); + } + public function diff(\RayGlobalScoped\Ramsey\Collection\CollectionInterface $other) : \RayGlobalScoped\Ramsey\Collection\CollectionInterface + { + $this->compareCollectionTypes($other); + $diffAtoB = \array_udiff($this->data, $other->toArray(), $this->getComparator()); + $diffBtoA = \array_udiff($other->toArray(), $this->data, $this->getComparator()); + /** @var array $diff */ + $diff = \array_merge($diffAtoB, $diffBtoA); + $collection = clone $this; + $collection->data = $diff; + return $collection; + } + public function intersect(\RayGlobalScoped\Ramsey\Collection\CollectionInterface $other) : \RayGlobalScoped\Ramsey\Collection\CollectionInterface + { + $this->compareCollectionTypes($other); + /** @var array $intersect */ + $intersect = \array_uintersect($this->data, $other->toArray(), $this->getComparator()); + $collection = clone $this; + $collection->data = $intersect; + return $collection; + } + public function merge(\RayGlobalScoped\Ramsey\Collection\CollectionInterface ...$collections) : \RayGlobalScoped\Ramsey\Collection\CollectionInterface + { + $temp = [$this->data]; + foreach ($collections as $index => $collection) { + if (!$collection instanceof static) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\CollectionMismatchException(\sprintf('Collection with index %d must be of type %s', $index, static::class)); + } + // When using generics (Collection.php, Set.php, etc), + // we also need to make sure that the internal types match each other + if ($collection->getType() !== $this->getType()) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\CollectionMismatchException(\sprintf('Collection items in collection with index %d must be of type %s', $index, $this->getType())); + } + $temp[] = $collection->toArray(); + } + /** @var array $merge */ + $merge = \array_merge(...$temp); + $collection = clone $this; + $collection->data = $merge; + return $collection; + } + /** + * @inheritDoc + */ + public function unserialize($serialized) : void + { + /** @var array $data */ + $data = \unserialize($serialized, ['allowed_classes' => [$this->getType()]]); + $this->data = $data; + } + /** + * @param CollectionInterface $other + */ + private function compareCollectionTypes(\RayGlobalScoped\Ramsey\Collection\CollectionInterface $other) : void + { + if (!$other instanceof static) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\CollectionMismatchException('Collection must be of type ' . static::class); + } + // When using generics (Collection.php, Set.php, etc), + // we also need to make sure that the internal types match each other + if ($other->getType() !== $this->getType()) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\CollectionMismatchException('Collection items must be of type ' . $this->getType()); + } + } + private function getComparator() : \Closure + { + return function ($a, $b) : int { + // If the two values are object, we convert them to unique scalars. + // If the collection contains mixed values (unlikely) where some are objects + // and some are not, we leave them as they are. + // The comparator should still work and the result of $a < $b should + // be consistent but unpredictable since not documented. + if (\is_object($a) && \is_object($b)) { + $a = \spl_object_id($a); + $b = \spl_object_id($b); + } + return $a === $b ? 0 : ($a < $b ? 1 : -1); + }; + } +} diff --git a/build/vendor/ramsey/collection/src/AbstractSet.php b/build/vendor/ramsey/collection/src/AbstractSet.php new file mode 100644 index 0000000..f02ad8d --- /dev/null +++ b/build/vendor/ramsey/collection/src/AbstractSet.php @@ -0,0 +1,45 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +/** + * This class contains the basic implementation of a collection that does not + * allow duplicated values (a set), to minimize the effort required to implement + * this specific type of collection. + * + * @template T + * @template-extends AbstractCollection + */ +abstract class AbstractSet extends \RayGlobalScoped\Ramsey\Collection\AbstractCollection +{ + /** + * @inheritDoc + */ + public function add($element) : bool + { + if ($this->contains($element)) { + return \false; + } + return parent::add($element); + } + /** + * @inheritDoc + */ + public function offsetSet($offset, $value) : void + { + if ($this->contains($value)) { + return; + } + parent::offsetSet($offset, $value); + } +} diff --git a/build/vendor/ramsey/collection/src/ArrayInterface.php b/build/vendor/ramsey/collection/src/ArrayInterface.php new file mode 100644 index 0000000..5eae14d --- /dev/null +++ b/build/vendor/ramsey/collection/src/ArrayInterface.php @@ -0,0 +1,40 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +use ArrayAccess; +use Countable; +use IteratorAggregate; +use Serializable; +/** + * `ArrayInterface` provides traversable array functionality to data types. + * + * @template T + */ +interface ArrayInterface extends \ArrayAccess, \Countable, \IteratorAggregate, \Serializable +{ + /** + * Removes all items from this array. + */ + public function clear() : void; + /** + * Returns a native PHP array representation of this array object. + * + * @return array + */ + public function toArray() : array; + /** + * Returns `true` if this array is empty. + */ + public function isEmpty() : bool; +} diff --git a/build/vendor/ramsey/collection/src/Collection.php b/build/vendor/ramsey/collection/src/Collection.php new file mode 100644 index 0000000..f11c8d9 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Collection.php @@ -0,0 +1,102 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +/** + * A collection represents a group of objects. + * + * Each object in the collection is of a specific, defined type. + * + * This is a direct implementation of `CollectionInterface`, provided for + * the sake of convenience. + * + * Example usage: + * + * ``` php + * $collection = new \Ramsey\Collection\Collection('My\\Foo'); + * $collection->add(new \My\Foo()); + * $collection->add(new \My\Foo()); + * + * foreach ($collection as $foo) { + * // Do something with $foo + * } + * ``` + * + * It is preferable to subclass `AbstractCollection` to create your own typed + * collections. For example: + * + * ``` php + * namespace My\Foo; + * + * class FooCollection extends \Ramsey\Collection\AbstractCollection + * { + * public function getType() + * { + * return 'My\\Foo'; + * } + * } + * ``` + * + * And then use it similarly to the earlier example: + * + * ``` php + * $fooCollection = new \My\Foo\FooCollection(); + * $fooCollection->add(new \My\Foo()); + * $fooCollection->add(new \My\Foo()); + * + * foreach ($fooCollection as $foo) { + * // Do something with $foo + * } + * ``` + * + * The benefit with this approach is that you may do type-checking on the + * collection object: + * + * ``` php + * if ($collection instanceof \My\Foo\FooCollection) { + * // the collection is a collection of My\Foo objects + * } + * ``` + * + * @template T + * @template-extends AbstractCollection + */ +class Collection extends \RayGlobalScoped\Ramsey\Collection\AbstractCollection +{ + /** + * The type of elements stored in this collection. + * + * A collection's type is immutable once it is set. For this reason, this + * property is set private. + * + * @var string + */ + private $collectionType; + /** + * Constructs a collection object of the specified type, optionally with the + * specified data. + * + * @param string $collectionType The type (FQCN) associated with this + * collection. + * @param array $data The initial items to store in the collection. + */ + public function __construct(string $collectionType, array $data = []) + { + $this->collectionType = $collectionType; + parent::__construct($data); + } + public function getType() : string + { + return $this->collectionType; + } +} diff --git a/build/vendor/ramsey/collection/src/CollectionInterface.php b/build/vendor/ramsey/collection/src/CollectionInterface.php new file mode 100644 index 0000000..8c8319b --- /dev/null +++ b/build/vendor/ramsey/collection/src/CollectionInterface.php @@ -0,0 +1,188 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +/** + * A collection represents a group of objects, known as its elements. + * + * Some collections allow duplicate elements and others do not. Some are ordered + * and others unordered. + * + * @template T + * @template-extends ArrayInterface + */ +interface CollectionInterface extends \RayGlobalScoped\Ramsey\Collection\ArrayInterface +{ + /** + * Ascending sort type. + */ + public const SORT_ASC = 'asc'; + /** + * Descending sort type. + */ + public const SORT_DESC = 'desc'; + /** + * Ensures that this collection contains the specified element (optional + * operation). + * + * Returns `true` if this collection changed as a result of the call. + * (Returns `false` if this collection does not permit duplicates and + * already contains the specified element.) + * + * Collections that support this operation may place limitations on what + * elements may be added to this collection. In particular, some + * collections will refuse to add `null` elements, and others will impose + * restrictions on the type of elements that may be added. Collection + * classes should clearly specify in their documentation any restrictions + * on what elements may be added. + * + * If a collection refuses to add a particular element for any reason other + * than that it already contains the element, it must throw an exception + * (rather than returning `false`). This preserves the invariant that a + * collection always contains the specified element after this call returns. + * + * @param T $element The element to add to the collection. + * + * @return bool `true` if this collection changed as a result of the call. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function add($element) : bool; + /** + * Returns `true` if this collection contains the specified element. + * + * @param T $element The element to check whether the collection contains. + * @param bool $strict Whether to perform a strict type check on the value. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function contains($element, bool $strict = \true) : bool; + /** + * Returns the type associated with this collection. + */ + public function getType() : string; + /** + * Removes a single instance of the specified element from this collection, + * if it is present. + * + * @param T $element The element to remove from the collection. + * + * @return bool `true` if an element was removed as a result of this call. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function remove($element) : bool; + /** + * Returns the values from the given property or method. + * + * @param string $propertyOrMethod The property or method name to filter by. + * + * @return list + */ + public function column(string $propertyOrMethod) : array; + /** + * Returns the first item of the collection. + * + * @return T + */ + public function first(); + /** + * Returns the last item of the collection. + * + * @return T + */ + public function last(); + /** + * Sort the collection by a property or method with the given sort order. + * + * This will always leave the original collection untouched and will return + * a new one. + * + * @param string $propertyOrMethod The property or method to sort by. + * @param string $order The sort order for the resulting collection (one of + * this interface's `SORT_*` constants). + * + * @return CollectionInterface + */ + public function sort(string $propertyOrMethod, string $order = self::SORT_ASC) : self; + /** + * Filter out items of the collection which don't match the criteria of + * given callback. + * + * This will always leave the original collection untouched and will return + * a new one. + * + * See the {@link http://php.net/manual/en/function.array-filter.php PHP array_filter() documentation} + * for examples of how the `$callback` parameter works. + * + * @param callable(T):bool $callback A callable to use for filtering elements. + * + * @return CollectionInterface + */ + public function filter(callable $callback) : self; + /** + * Create a new collection where items match the criteria of given callback. + * + * This will always leave the original collection untouched and will return + * a new one. + * + * @param string $propertyOrMethod The property or method to evaluate. + * @param mixed $value The value to match. + * + * @return CollectionInterface + */ + public function where(string $propertyOrMethod, $value) : self; + /** + * Apply a given callback method on each item of the collection. + * + * This will always leave the original collection untouched. The new + * collection is created by mapping the callback to each item of the + * original collection. + * + * See the {@link http://php.net/manual/en/function.array-map.php PHP array_map() documentation} + * for examples of how the `$callback` parameter works. + * + * @param callable(T):TCallbackReturn $callback A callable to apply to each + * item of the collection. + * + * @return CollectionInterface + * + * @template TCallbackReturn + */ + public function map(callable $callback) : self; + /** + * Create a new collection with divergent items between current and given + * collection. + * + * @param CollectionInterface $other The collection to check for divergent + * items. + * + * @return CollectionInterface + */ + public function diff(\RayGlobalScoped\Ramsey\Collection\CollectionInterface $other) : self; + /** + * Create a new collection with intersecting item between current and given + * collection. + * + * @param CollectionInterface $other The collection to check for + * intersecting items. + * + * @return CollectionInterface + */ + public function intersect(\RayGlobalScoped\Ramsey\Collection\CollectionInterface $other) : self; + /** + * Merge current items and items of given collections into a new one. + * + * @param CollectionInterface ...$collections The collections to merge. + * + * @return CollectionInterface + */ + public function merge(\RayGlobalScoped\Ramsey\Collection\CollectionInterface ...$collections) : self; +} diff --git a/build/vendor/ramsey/collection/src/DoubleEndedQueue.php b/build/vendor/ramsey/collection/src/DoubleEndedQueue.php new file mode 100644 index 0000000..6ce24d0 --- /dev/null +++ b/build/vendor/ramsey/collection/src/DoubleEndedQueue.php @@ -0,0 +1,153 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +use RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Collection\Exception\NoSuchElementException; +/** + * This class provides a basic implementation of `DoubleEndedQueueInterface`, to + * minimize the effort required to implement this interface. + * + * @template T + * @template-extends Queue + * @template-implements DoubleEndedQueueInterface + */ +class DoubleEndedQueue extends \RayGlobalScoped\Ramsey\Collection\Queue implements \RayGlobalScoped\Ramsey\Collection\DoubleEndedQueueInterface +{ + /** + * Index of the last element in the queue. + * + * @var int + */ + private $tail = -1; + /** + * @inheritDoc + */ + public function offsetSet($offset, $value) : void + { + if ($this->checkType($this->getType(), $value) === \false) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Value must be of type ' . $this->getType() . '; value is ' . $this->toolValueToString($value)); + } + $this->tail++; + $this->data[$this->tail] = $value; + } + /** + * @inheritDoc + */ + public function addFirst($element) : bool + { + if ($this->checkType($this->getType(), $element) === \false) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Value must be of type ' . $this->getType() . '; value is ' . $this->toolValueToString($element)); + } + $this->index--; + $this->data[$this->index] = $element; + return \true; + } + /** + * @inheritDoc + */ + public function addLast($element) : bool + { + return $this->add($element); + } + /** + * @inheritDoc + */ + public function offerFirst($element) : bool + { + try { + return $this->addFirst($element); + } catch (\RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException $e) { + return \false; + } + } + /** + * @inheritDoc + */ + public function offerLast($element) : bool + { + return $this->offer($element); + } + /** + * @inheritDoc + */ + public function removeFirst() + { + return $this->remove(); + } + /** + * @inheritDoc + */ + public function removeLast() + { + $tail = $this->pollLast(); + if ($tail === null) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\NoSuchElementException('Can\'t return element from Queue. Queue is empty.'); + } + return $tail; + } + /** + * @inheritDoc + */ + public function pollFirst() + { + return $this->poll(); + } + /** + * @inheritDoc + */ + public function pollLast() + { + if ($this->count() === 0) { + return null; + } + $tail = $this[$this->tail]; + unset($this[$this->tail]); + $this->tail--; + return $tail; + } + /** + * @inheritDoc + */ + public function firstElement() + { + return $this->element(); + } + /** + * @inheritDoc + */ + public function lastElement() + { + if ($this->count() === 0) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\NoSuchElementException('Can\'t return element from Queue. Queue is empty.'); + } + return $this->data[$this->tail]; + } + /** + * @inheritDoc + */ + public function peekFirst() + { + return $this->peek(); + } + /** + * @inheritDoc + */ + public function peekLast() + { + if ($this->count() === 0) { + return null; + } + return $this->data[$this->tail]; + } +} diff --git a/build/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php b/build/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php new file mode 100644 index 0000000..cc42eb1 --- /dev/null +++ b/build/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php @@ -0,0 +1,302 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +use RayGlobalScoped\Ramsey\Collection\Exception\NoSuchElementException; +/** + * A linear collection that supports element insertion and removal at both ends. + * + * Most `DoubleEndedQueueInterface` implementations place no fixed limits on the + * number of elements they may contain, but this interface supports + * capacity-restricted double-ended queues as well as those with no fixed size + * limit. + * + * This interface defines methods to access the elements at both ends of the + * double-ended queue. Methods are provided to insert, remove, and examine the + * element. Each of these methods exists in two forms: one throws an exception + * if the operation fails, the other returns a special value (either `null` or + * `false`, depending on the operation). The latter form of the insert operation + * is designed specifically for use with capacity-restricted implementations; in + * most implementations, insert operations cannot fail. + * + * The twelve methods described above are summarized in the following table: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Summary of DoubleEndedQueueInterface methods
First Element (Head)Last Element (Tail)
Throws exceptionSpecial valueThrows exceptionSpecial value
InsertaddFirst()offerFirst()addLast()offerLast()
RemoveremoveFirst()pollFirst()removeLast()pollLast()
ExaminefirstElement()peekFirst()lastElement()peekLast()
+ * + * This interface extends the `QueueInterface`. When a double-ended queue is + * used as a queue, FIFO (first-in-first-out) behavior results. Elements are + * added at the end of the double-ended queue and removed from the beginning. + * The methods inherited from the `QueueInterface` are precisely equivalent to + * `DoubleEndedQueueInterface` methods as indicated in the following table: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Comparison of QueueInterface and DoubleEndedQueueInterface methods
QueueInterface MethodDoubleEndedQueueInterface Method
add()addLast()
offer()offerLast()
remove()removeFirst()
poll()pollFirst()
element()firstElement()
peek()peekFirst()
+ * + * Double-ended queues can also be used as LIFO (last-in-first-out) stacks. When + * a double-ended queue is used as a stack, elements are pushed and popped from + * the beginning of the double-ended queue. Stack concepts are precisely + * equivalent to `DoubleEndedQueueInterface` methods as indicated in the table + * below: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Comparison of stack concepts and DoubleEndedQueueInterface methods
Stack conceptDoubleEndedQueueInterface Method
pushaddFirst()
popremoveFirst()
peekpeekFirst()
+ * + * Note that the `peek()` method works equally well when a double-ended queue is + * used as a queue or a stack; in either case, elements are drawn from the + * beginning of the double-ended queue. + * + * While `DoubleEndedQueueInterface` implementations are not strictly required + * to prohibit the insertion of `null` elements, they are strongly encouraged to + * do so. Users of any `DoubleEndedQueueInterface` implementations that do allow + * `null` elements are strongly encouraged *not* to take advantage of the + * ability to insert nulls. This is so because `null` is used as a special + * return value by various methods to indicated that the double-ended queue is + * empty. + * + * @template T + * @template-extends QueueInterface + */ +interface DoubleEndedQueueInterface extends \RayGlobalScoped\Ramsey\Collection\QueueInterface +{ + /** + * Inserts the specified element at the front of this queue if it is + * possible to do so immediately without violating capacity restrictions. + * + * When using a capacity-restricted double-ended queue, it is generally + * preferable to use the `offerFirst()` method. + * + * @param T $element The element to add to the front of this queue. + * + * @return bool `true` if this queue changed as a result of the call. + * + * @throws \RuntimeException if a queue refuses to add a particular element + * for any reason other than that it already contains the element. + * Implementations should use a more-specific exception that extends + * `\RuntimeException`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function addFirst($element) : bool; + /** + * Inserts the specified element at the end of this queue if it is possible + * to do so immediately without violating capacity restrictions. + * + * When using a capacity-restricted double-ended queue, it is generally + * preferable to use the `offerLast()` method. + * + * This method is equivalent to `add()`. + * + * @param T $element The element to add to the end of this queue. + * + * @return bool `true` if this queue changed as a result of the call. + * + * @throws \RuntimeException if a queue refuses to add a particular element + * for any reason other than that it already contains the element. + * Implementations should use a more-specific exception that extends + * `\RuntimeException`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function addLast($element) : bool; + /** + * Inserts the specified element at the front of this queue if it is + * possible to do so immediately without violating capacity restrictions. + * + * When using a capacity-restricted queue, this method is generally + * preferable to `addFirst()`, which can fail to insert an element only by + * throwing an exception. + * + * @param T $element The element to add to the front of this queue. + * + * @return bool `true` if the element was added to this queue, else `false`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function offerFirst($element) : bool; + /** + * Inserts the specified element at the end of this queue if it is possible + * to do so immediately without violating capacity restrictions. + * + * When using a capacity-restricted queue, this method is generally + * preferable to `addLast()` which can fail to insert an element only by + * throwing an exception. + * + * @param T $element The element to add to the end of this queue. + * + * @return bool `true` if the element was added to this queue, else `false`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function offerLast($element) : bool; + /** + * Retrieves and removes the head of this queue. + * + * This method differs from `pollFirst()` only in that it throws an + * exception if this queue is empty. + * + * @return T the first element in this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function removeFirst(); + /** + * Retrieves and removes the tail of this queue. + * + * This method differs from `pollLast()` only in that it throws an exception + * if this queue is empty. + * + * @return T the last element in this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function removeLast(); + /** + * Retrieves and removes the head of this queue, or returns `null` if this + * queue is empty. + * + * @return T|null the head of this queue, or `null` if this queue is empty. + */ + public function pollFirst(); + /** + * Retrieves and removes the tail of this queue, or returns `null` if this + * queue is empty. + * + * @return T|null the tail of this queue, or `null` if this queue is empty. + */ + public function pollLast(); + /** + * Retrieves, but does not remove, the head of this queue. + * + * This method differs from `peekFirst()` only in that it throws an + * exception if this queue is empty. + * + * @return T the head of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function firstElement(); + /** + * Retrieves, but does not remove, the tail of this queue. + * + * This method differs from `peekLast()` only in that it throws an exception + * if this queue is empty. + * + * @return T the tail of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function lastElement(); + /** + * Retrieves, but does not remove, the head of this queue, or returns `null` + * if this queue is empty. + * + * @return T|null the head of this queue, or `null` if this queue is empty. + */ + public function peekFirst(); + /** + * Retrieves, but does not remove, the tail of this queue, or returns `null` + * if this queue is empty. + * + * @return T|null the tail of this queue, or `null` if this queue is empty. + */ + public function peekLast(); +} diff --git a/build/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php b/build/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php new file mode 100644 index 0000000..c60c3c7 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php @@ -0,0 +1,20 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Exception; + +/** + * Thrown when attempting to operate on collections of differing types. + */ +class CollectionMismatchException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php b/build/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..b27874e --- /dev/null +++ b/build/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php @@ -0,0 +1,20 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Exception; + +/** + * Thrown to indicate an argument is not of the expected type. + */ +class InvalidArgumentException extends \InvalidArgumentException +{ +} diff --git a/build/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php b/build/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php new file mode 100644 index 0000000..47bccf4 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php @@ -0,0 +1,20 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Exception; + +/** + * Thrown when attempting to use a sort order that is not recognized. + */ +class InvalidSortOrderException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/collection/src/Exception/NoSuchElementException.php b/build/vendor/ramsey/collection/src/Exception/NoSuchElementException.php new file mode 100644 index 0000000..78a4054 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Exception/NoSuchElementException.php @@ -0,0 +1,20 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Exception; + +/** + * Thrown when attempting to access an element that does not exist. + */ +class NoSuchElementException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php b/build/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php new file mode 100644 index 0000000..7e4d7ed --- /dev/null +++ b/build/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php @@ -0,0 +1,20 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Exception; + +/** + * Thrown when attempting to access an element out of the range of the collection. + */ +class OutOfBoundsException extends \OutOfBoundsException +{ +} diff --git a/build/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php b/build/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php new file mode 100644 index 0000000..6622d05 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php @@ -0,0 +1,20 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Exception; + +/** + * Thrown to indicate that the requested operation is not supported. + */ +class UnsupportedOperationException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/collection/src/Exception/ValueExtractionException.php b/build/vendor/ramsey/collection/src/Exception/ValueExtractionException.php new file mode 100644 index 0000000..6c99c0d --- /dev/null +++ b/build/vendor/ramsey/collection/src/Exception/ValueExtractionException.php @@ -0,0 +1,20 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Exception; + +/** + * Thrown when attempting to extract a value for a method or property that does not exist. + */ +class ValueExtractionException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/collection/src/GenericArray.php b/build/vendor/ramsey/collection/src/GenericArray.php new file mode 100644 index 0000000..97bafa6 --- /dev/null +++ b/build/vendor/ramsey/collection/src/GenericArray.php @@ -0,0 +1,22 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +/** + * `GenericArray` represents a standard array object. + * + * @template-extends AbstractArray + */ +class GenericArray extends \RayGlobalScoped\Ramsey\Collection\AbstractArray +{ +} diff --git a/build/vendor/ramsey/collection/src/Map/AbstractMap.php b/build/vendor/ramsey/collection/src/Map/AbstractMap.php new file mode 100644 index 0000000..e55d106 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Map/AbstractMap.php @@ -0,0 +1,133 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Map; + +use RayGlobalScoped\Ramsey\Collection\AbstractArray; +use RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException; +use function array_key_exists; +use function array_keys; +use function in_array; +/** + * This class provides a basic implementation of `MapInterface`, to minimize the + * effort required to implement this interface. + * + * @template T + * @template-extends AbstractArray + * @template-implements MapInterface + */ +abstract class AbstractMap extends \RayGlobalScoped\Ramsey\Collection\AbstractArray implements \RayGlobalScoped\Ramsey\Collection\Map\MapInterface +{ + /** + * @inheritDoc + */ + public function offsetSet($offset, $value) : void + { + if ($offset === null) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Map elements are key/value pairs; a key must be provided for ' . 'value ' . \var_export($value, \true)); + } + $this->data[$offset] = $value; + } + /** + * @inheritDoc + */ + public function containsKey($key) : bool + { + return \array_key_exists($key, $this->data); + } + /** + * @inheritDoc + */ + public function containsValue($value) : bool + { + return \in_array($value, $this->data, \true); + } + /** + * @inheritDoc + */ + public function keys() : array + { + return \array_keys($this->data); + } + /** + * @inheritDoc + */ + public function get($key, $defaultValue = null) + { + if (!$this->containsKey($key)) { + return $defaultValue; + } + return $this[$key]; + } + /** + * @inheritDoc + */ + public function put($key, $value) + { + $previousValue = $this->get($key); + $this[$key] = $value; + return $previousValue; + } + /** + * @inheritDoc + */ + public function putIfAbsent($key, $value) + { + $currentValue = $this->get($key); + if ($currentValue === null) { + $this[$key] = $value; + } + return $currentValue; + } + /** + * @inheritDoc + */ + public function remove($key) + { + $previousValue = $this->get($key); + unset($this[$key]); + return $previousValue; + } + /** + * @inheritDoc + */ + public function removeIf($key, $value) : bool + { + if ($this->get($key) === $value) { + unset($this[$key]); + return \true; + } + return \false; + } + /** + * @inheritDoc + */ + public function replace($key, $value) + { + $currentValue = $this->get($key); + if ($this->containsKey($key)) { + $this[$key] = $value; + } + return $currentValue; + } + /** + * @inheritDoc + */ + public function replaceIf($key, $oldValue, $newValue) : bool + { + if ($this->get($key) === $oldValue) { + $this[$key] = $newValue; + return \true; + } + return \false; + } +} diff --git a/build/vendor/ramsey/collection/src/Map/AbstractTypedMap.php b/build/vendor/ramsey/collection/src/Map/AbstractTypedMap.php new file mode 100644 index 0000000..ac88851 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Map/AbstractTypedMap.php @@ -0,0 +1,53 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Map; + +use RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Collection\Tool\TypeTrait; +use RayGlobalScoped\Ramsey\Collection\Tool\ValueToStringTrait; +/** + * This class provides a basic implementation of `TypedMapInterface`, to + * minimize the effort required to implement this interface. + * + * @phpstan-ignore-next-line + * @template K as array-key + * @template T + * @template-extends AbstractMap + * @template-implements TypedMapInterface + */ +abstract class AbstractTypedMap extends \RayGlobalScoped\Ramsey\Collection\Map\AbstractMap implements \RayGlobalScoped\Ramsey\Collection\Map\TypedMapInterface +{ + use TypeTrait; + use ValueToStringTrait; + /** + * @param K|null $offset + * @param T $value + * + * @inheritDoc + * + * @psalm-suppress MoreSpecificImplementedParamType + */ + public function offsetSet($offset, $value) : void + { + if ($offset === null) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Map elements are key/value pairs; a key must be provided for ' . 'value ' . \var_export($value, \true)); + } + if ($this->checkType($this->getKeyType(), $offset) === \false) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Key must be of type ' . $this->getKeyType() . '; key is ' . $this->toolValueToString($offset)); + } + if ($this->checkType($this->getValueType(), $value) === \false) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Value must be of type ' . $this->getValueType() . '; value is ' . $this->toolValueToString($value)); + } + parent::offsetSet($offset, $value); + } +} diff --git a/build/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php b/build/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php new file mode 100644 index 0000000..8ec358d --- /dev/null +++ b/build/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php @@ -0,0 +1,23 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Map; + +/** + * `AssociativeArrayMap` represents a standard associative array object. + * + * @template T + * @template-extends AbstractMap + */ +class AssociativeArrayMap extends \RayGlobalScoped\Ramsey\Collection\Map\AbstractMap +{ +} diff --git a/build/vendor/ramsey/collection/src/Map/MapInterface.php b/build/vendor/ramsey/collection/src/Map/MapInterface.php new file mode 100644 index 0000000..f55f2c8 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Map/MapInterface.php @@ -0,0 +1,137 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Map; + +use RayGlobalScoped\Ramsey\Collection\ArrayInterface; +/** + * An object that maps keys to values. + * + * A map cannot contain duplicate keys; each key can map to at most one value. + * + * @template T + * @template-extends ArrayInterface + */ +interface MapInterface extends \RayGlobalScoped\Ramsey\Collection\ArrayInterface +{ + /** + * Returns `true` if this map contains a mapping for the specified key. + * + * @param array-key $key The key to check in the map. + */ + public function containsKey($key) : bool; + /** + * Returns `true` if this map maps one or more keys to the specified value. + * + * This performs a strict type check on the value. + * + * @param T $value The value to check in the map. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function containsValue($value) : bool; + /** + * Return an array of the keys contained in this map. + * + * @return list + */ + public function keys() : array; + /** + * Returns the value to which the specified key is mapped, `null` if this + * map contains no mapping for the key, or (optionally) `$defaultValue` if + * this map contains no mapping for the key. + * + * @param array-key $key The key to return from the map. + * @param T|null $defaultValue The default value to use if `$key` is not found. + * + * @return T|null the value or `null` if the key could not be found. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function get($key, $defaultValue = null); + /** + * Associates the specified value with the specified key in this map. + * + * If the map previously contained a mapping for the key, the old value is + * replaced by the specified value. + * + * @param array-key $key The key to put or replace in the map. + * @param T $value The value to store at `$key`. + * + * @return T|null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function put($key, $value); + /** + * Associates the specified value with the specified key in this map only if + * it is not already set. + * + * If there is already a value associated with `$key`, this returns that + * value without replacing it. + * + * @param array-key $key The key to put in the map. + * @param T $value The value to store at `$key`. + * + * @return T|null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function putIfAbsent($key, $value); + /** + * Removes the mapping for a key from this map if it is present. + * + * @param array-key $key The key to remove from the map. + * + * @return T|null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function remove($key); + /** + * Removes the entry for the specified key only if it is currently mapped to + * the specified value. + * + * This performs a strict type check on the value. + * + * @param array-key $key The key to remove from the map. + * @param T $value The value to match. + * + * @return bool true if the value was removed. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function removeIf($key, $value) : bool; + /** + * Replaces the entry for the specified key only if it is currently mapped + * to some value. + * + * @param array-key $key The key to replace. + * @param T $value The value to set at `$key`. + * + * @return T|null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function replace($key, $value); + /** + * Replaces the entry for the specified key only if currently mapped to the + * specified value. + * + * This performs a strict type check on the value. + * + * @param array-key $key The key to remove from the map. + * @param T $oldValue The value to match. + * @param T $newValue The value to use as a replacement. + * + * @return bool true if the value was replaced. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function replaceIf($key, $oldValue, $newValue) : bool; +} diff --git a/build/vendor/ramsey/collection/src/Map/NamedParameterMap.php b/build/vendor/ramsey/collection/src/Map/NamedParameterMap.php new file mode 100644 index 0000000..5d7cf16 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Map/NamedParameterMap.php @@ -0,0 +1,96 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Map; + +use RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Collection\Tool\TypeTrait; +use RayGlobalScoped\Ramsey\Collection\Tool\ValueToStringTrait; +use function array_combine; +use function array_key_exists; +use function is_int; +/** + * `NamedParameterMap` represents a mapping of values to a set of named keys + * that may optionally be typed + * + * @template-extends AbstractMap + */ +class NamedParameterMap extends \RayGlobalScoped\Ramsey\Collection\Map\AbstractMap +{ + use TypeTrait; + use ValueToStringTrait; + /** + * Named parameters defined for this map. + * + * @var array + */ + protected $namedParameters; + /** + * Constructs a new `NamedParameterMap`. + * + * @param array $namedParameters The named parameters defined for this map. + * @param array $data An initial set of data to set on this map. + */ + public function __construct(array $namedParameters, array $data = []) + { + $this->namedParameters = $this->filterNamedParameters($namedParameters); + parent::__construct($data); + } + /** + * Returns named parameters set for this `NamedParameterMap`. + * + * @return array + */ + public function getNamedParameters() : array + { + return $this->namedParameters; + } + /** + * @inheritDoc + */ + public function offsetSet($offset, $value) : void + { + if ($offset === null) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Map elements are key/value pairs; a key must be provided for ' . 'value ' . \var_export($value, \true)); + } + if (!\array_key_exists($offset, $this->namedParameters)) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Attempting to set value for unconfigured parameter \'' . $offset . '\''); + } + if ($this->checkType($this->namedParameters[$offset], $value) === \false) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Value for \'' . $offset . '\' must be of type ' . $this->namedParameters[$offset] . '; value is ' . $this->toolValueToString($value)); + } + $this->data[$offset] = $value; + } + /** + * Given an array of named parameters, constructs a proper mapping of + * named parameters to types. + * + * @param array $namedParameters The named parameters to filter. + * + * @return array + */ + protected function filterNamedParameters(array $namedParameters) : array + { + $names = []; + $types = []; + foreach ($namedParameters as $key => $value) { + if (\is_int($key)) { + $names[] = $value; + $types[] = 'mixed'; + } else { + $names[] = $key; + $types[] = $value; + } + } + return \array_combine($names, $types) ?: []; + } +} diff --git a/build/vendor/ramsey/collection/src/Map/TypedMap.php b/build/vendor/ramsey/collection/src/Map/TypedMap.php new file mode 100644 index 0000000..f4bec27 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Map/TypedMap.php @@ -0,0 +1,128 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Map; + +use RayGlobalScoped\Ramsey\Collection\Tool\TypeTrait; +/** + * A `TypedMap` represents a map of elements where key and value are typed. + * + * Each element is identified by a key with defined type and a value of defined + * type. The keys of the map must be unique. The values on the map can be= + * repeated but each with its own different key. + * + * The most common case is to use a string type key, but it's not limited to + * this type of keys. + * + * This is a direct implementation of `TypedMapInterface`, provided for the sake + * of convenience. + * + * Example usage: + * + * ```php + * $map = new TypedMap('string', Foo::class); + * $map['x'] = new Foo(); + * foreach ($map as $key => $value) { + * // do something with $key, it will be a Foo::class + * } + * + * // this will throw an exception since key must be string + * $map[10] = new Foo(); + * + * // this will throw an exception since value must be a Foo + * $map['bar'] = 'bar'; + * + * // initialize map with contents + * $map = new TypedMap('string', Foo::class, [ + * new Foo(), new Foo(), new Foo() + * ]); + * ``` + * + * It is preferable to subclass `AbstractTypedMap` to create your own typed map + * implementation: + * + * ```php + * class FooTypedMap extends AbstractTypedMap + * { + * public function getKeyType() + * { + * return 'int'; + * } + * + * public function getValueType() + * { + * return Foo::class; + * } + * } + * ``` + * + * … but you also may use the `TypedMap` class: + * + * ```php + * class FooTypedMap extends TypedMap + * { + * public function __constructor(array $data = []) + * { + * parent::__construct('int', Foo::class, $data); + * } + * } + * ``` + * + * @phpstan-ignore-next-line + * @template K as array-key + * @template T + * @template-extends AbstractTypedMap + */ +class TypedMap extends \RayGlobalScoped\Ramsey\Collection\Map\AbstractTypedMap +{ + use TypeTrait; + /** + * The data type of keys stored in this collection. + * + * A map key's type is immutable once it is set. For this reason, this + * property is set private. + * + * @var string data type of the map key. + */ + private $keyType; + /** + * The data type of values stored in this collection. + * + * A map value's type is immutable once it is set. For this reason, this + * property is set private. + * + * @var string data type of the map value. + */ + private $valueType; + /** + * Constructs a map object of the specified key and value types, + * optionally with the specified data. + * + * @param string $keyType The data type of the map's keys. + * @param string $valueType The data type of the map's values. + * @param array $data The initial data to set for this map. + */ + public function __construct(string $keyType, string $valueType, array $data = []) + { + $this->keyType = $keyType; + $this->valueType = $valueType; + parent::__construct($data); + } + public function getKeyType() : string + { + return $this->keyType; + } + public function getValueType() : string + { + return $this->valueType; + } +} diff --git a/build/vendor/ramsey/collection/src/Map/TypedMapInterface.php b/build/vendor/ramsey/collection/src/Map/TypedMapInterface.php new file mode 100644 index 0000000..dbc94fe --- /dev/null +++ b/build/vendor/ramsey/collection/src/Map/TypedMapInterface.php @@ -0,0 +1,32 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Map; + +/** + * A `TypedMapInterface` represents a map of elements where key and value are + * typed. + * + * @template T + * @template-extends MapInterface + */ +interface TypedMapInterface extends \RayGlobalScoped\Ramsey\Collection\Map\MapInterface +{ + /** + * Return the type used on the key. + */ + public function getKeyType() : string; + /** + * Return the type forced on the values. + */ + public function getValueType() : string; +} diff --git a/build/vendor/ramsey/collection/src/Queue.php b/build/vendor/ramsey/collection/src/Queue.php new file mode 100644 index 0000000..1109174 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Queue.php @@ -0,0 +1,140 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +use RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Collection\Exception\NoSuchElementException; +use RayGlobalScoped\Ramsey\Collection\Tool\TypeTrait; +use RayGlobalScoped\Ramsey\Collection\Tool\ValueToStringTrait; +/** + * This class provides a basic implementation of `QueueInterface`, to minimize + * the effort required to implement this interface. + * + * @template T + * @template-extends AbstractArray + * @template-implements QueueInterface + */ +class Queue extends \RayGlobalScoped\Ramsey\Collection\AbstractArray implements \RayGlobalScoped\Ramsey\Collection\QueueInterface +{ + use TypeTrait; + use ValueToStringTrait; + /** + * The type of elements stored in this queue. + * + * A queue's type is immutable once it is set. For this reason, this + * property is set private. + * + * @var string + */ + private $queueType; + /** + * The index of the head of the queue. + * + * @var int + */ + protected $index = 0; + /** + * Constructs a queue object of the specified type, optionally with the + * specified data. + * + * @param string $queueType The type (FQCN) associated with this queue. + * @param array $data The initial items to store in the collection. + */ + public function __construct(string $queueType, array $data = []) + { + $this->queueType = $queueType; + parent::__construct($data); + } + /** + * {@inheritDoc} + * + * Since arbitrary offsets may not be manipulated in a queue, this method + * serves only to fulfill the `ArrayAccess` interface requirements. It is + * invoked by other operations when adding values to the queue. + */ + public function offsetSet($offset, $value) : void + { + if ($this->checkType($this->getType(), $value) === \false) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException('Value must be of type ' . $this->getType() . '; value is ' . $this->toolValueToString($value)); + } + $this->data[] = $value; + } + /** + * @inheritDoc + */ + public function add($element) : bool + { + $this[] = $element; + return \true; + } + /** + * @inheritDoc + */ + public function element() + { + $element = $this->peek(); + if ($element === null) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\NoSuchElementException('Can\'t return element from Queue. Queue is empty.'); + } + return $element; + } + /** + * @inheritDoc + */ + public function offer($element) : bool + { + try { + return $this->add($element); + } catch (\RayGlobalScoped\Ramsey\Collection\Exception\InvalidArgumentException $e) { + return \false; + } + } + /** + * @inheritDoc + */ + public function peek() + { + if ($this->count() === 0) { + return null; + } + return $this[$this->index]; + } + /** + * @inheritDoc + */ + public function poll() + { + if ($this->count() === 0) { + return null; + } + $head = $this[$this->index]; + unset($this[$this->index]); + $this->index++; + return $head; + } + /** + * @inheritDoc + */ + public function remove() + { + $head = $this->poll(); + if ($head === null) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\NoSuchElementException('Can\'t return element from Queue. Queue is empty.'); + } + return $head; + } + public function getType() : string + { + return $this->queueType; + } +} diff --git a/build/vendor/ramsey/collection/src/QueueInterface.php b/build/vendor/ramsey/collection/src/QueueInterface.php new file mode 100644 index 0000000..09fd6d6 --- /dev/null +++ b/build/vendor/ramsey/collection/src/QueueInterface.php @@ -0,0 +1,194 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +use RayGlobalScoped\Ramsey\Collection\Exception\NoSuchElementException; +/** + * A queue is a collection in which the entities in the collection are kept in + * order. + * + * The principal operations on the queue are the addition of entities to the end + * (tail), also known as *enqueue*, and removal of entities from the front + * (head), also known as *dequeue*. This makes the queue a first-in-first-out + * (FIFO) data structure. + * + * Besides basic array operations, queues provide additional insertion, + * extraction, and inspection operations. Each of these methods exists in two + * forms: one throws an exception if the operation fails, the other returns a + * special value (either `null` or `false`, depending on the operation). The + * latter form of the insert operation is designed specifically for use with + * capacity-restricted `QueueInterface` implementations; in most + * implementations, insert operations cannot fail. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Summary of QueueInterface methods
Throws exceptionReturns special value
Insertadd()offer()
Removeremove()poll()
Examineelement()peek()
+ * + * Queues typically, but do not necessarily, order elements in a FIFO + * (first-in-first-out) manner. Among the exceptions are priority queues, which + * order elements according to a supplied comparator, or the elements' natural + * ordering, and LIFO queues (or stacks) which order the elements LIFO + * (last-in-first-out). Whatever the ordering used, the head of the queue is + * that element which would be removed by a call to remove() or poll(). In a + * FIFO queue, all new elements are inserted at the tail of the queue. Other + * kinds of queues may use different placement rules. Every `QueueInterface` + * implementation must specify its ordering properties. + * + * The `offer()` method inserts an element if possible, otherwise returning + * `false`. This differs from the `add()` method, which can fail to add an + * element only by throwing an unchecked exception. The `offer()` method is + * designed for use when failure is a normal, rather than exceptional + * occurrence, for example, in fixed-capacity (or "bounded") queues. + * + * The `remove()` and `poll()` methods remove and return the head of the queue. + * Exactly which element is removed from the queue is a function of the queue's + * ordering policy, which differs from implementation to implementation. The + * `remove()` and `poll()` methods differ only in their behavior when the queue + * is empty: the `remove()` method throws an exception, while the `poll()` + * method returns `null`. + * + * The `element()` and `peek()` methods return, but do not remove, the head of + * the queue. + * + * `QueueInterface` implementations generally do not allow insertion of `null` + * elements, although some implementations do not prohibit insertion of `null`. + * Even in the implementations that permit it, `null` should not be inserted + * into a queue, as `null` is also used as a special return value by the + * `poll()` method to indicate that the queue contains no elements. + * + * @template T + * @template-extends ArrayInterface + */ +interface QueueInterface extends \RayGlobalScoped\Ramsey\Collection\ArrayInterface +{ + /** + * Ensures that this queue contains the specified element (optional + * operation). + * + * Returns `true` if this queue changed as a result of the call. (Returns + * `false` if this queue does not permit duplicates and already contains the + * specified element.) + * + * Queues that support this operation may place limitations on what elements + * may be added to this queue. In particular, some queues will refuse to add + * `null` elements, and others will impose restrictions on the type of + * elements that may be added. Queue classes should clearly specify in their + * documentation any restrictions on what elements may be added. + * + * If a queue refuses to add a particular element for any reason other than + * that it already contains the element, it must throw an exception (rather + * than returning `false`). This preserves the invariant that a queue always + * contains the specified element after this call returns. + * + * @see self::offer() + * + * @param T $element The element to add to this queue. + * + * @return bool `true` if this queue changed as a result of the call. + * + * @throws \RuntimeException if a queue refuses to add a particular element + * for any reason other than that it already contains the element. + * Implementations should use a more-specific exception that extends + * `\RuntimeException`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function add($element) : bool; + /** + * Retrieves, but does not remove, the head of this queue. + * + * This method differs from `peek()` only in that it throws an exception if + * this queue is empty. + * + * @see self::peek() + * + * @return T the head of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function element(); + /** + * Inserts the specified element into this queue if it is possible to do so + * immediately without violating capacity restrictions. + * + * When using a capacity-restricted queue, this method is generally + * preferable to `add()`, which can fail to insert an element only by + * throwing an exception. + * + * @see self::add() + * + * @param T $element The element to add to this queue. + * + * @return bool `true` if the element was added to this queue, else `false`. + */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + public function offer($element) : bool; + /** + * Retrieves, but does not remove, the head of this queue, or returns `null` + * if this queue is empty. + * + * @see self::element() + * + * @return T|null the head of this queue, or `null` if this queue is empty. + */ + public function peek(); + /** + * Retrieves and removes the head of this queue, or returns `null` + * if this queue is empty. + * + * @see self::remove() + * + * @return T|null the head of this queue, or `null` if this queue is empty. + */ + public function poll(); + /** + * Retrieves and removes the head of this queue. + * + * This method differs from `poll()` only in that it throws an exception if + * this queue is empty. + * + * @see self::poll() + * + * @return T the head of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function remove(); + /** + * Returns the type associated with this queue. + */ + public function getType() : string; +} diff --git a/build/vendor/ramsey/collection/src/Set.php b/build/vendor/ramsey/collection/src/Set.php new file mode 100644 index 0000000..a96ee36 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Set.php @@ -0,0 +1,65 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection; + +/** + * A set is a collection that contains no duplicate elements. + * + * Great care must be exercised if mutable objects are used as set elements. + * The behavior of a set is not specified if the value of an object is changed + * in a manner that affects equals comparisons while the object is an element in + * the set. + * + * Example usage: + * + * ``` php + * $foo = new \My\Foo(); + * $set = new Set(\My\Foo::class); + * + * $set->add($foo); // returns TRUE, the element don't exists + * $set->add($foo); // returns FALSE, the element already exists + * + * $bar = new \My\Foo(); + * $set->add($bar); // returns TRUE, $bar !== $foo + * ``` + * + * @template T + * @template-extends AbstractSet + */ +class Set extends \RayGlobalScoped\Ramsey\Collection\AbstractSet +{ + /** + * The type of elements stored in this set + * + * A set's type is immutable. For this reason, this property is private. + * + * @var string + */ + private $setType; + /** + * Constructs a set object of the specified type, optionally with the + * specified data. + * + * @param string $setType The type (FQCN) associated with this set. + * @param array $data The initial items to store in the set. + */ + public function __construct(string $setType, array $data = []) + { + $this->setType = $setType; + parent::__construct($data); + } + public function getType() : string + { + return $this->setType; + } +} diff --git a/build/vendor/ramsey/collection/src/Tool/TypeTrait.php b/build/vendor/ramsey/collection/src/Tool/TypeTrait.php new file mode 100644 index 0000000..8a82621 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Tool/TypeTrait.php @@ -0,0 +1,70 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Tool; + +use function is_array; +use function is_bool; +use function is_callable; +use function is_float; +use function is_int; +use function is_numeric; +use function is_object; +use function is_resource; +use function is_scalar; +use function is_string; +/** + * Provides functionality to check values for specific types. + */ +trait TypeTrait +{ + /** + * Returns `true` if value is of the specified type. + * + * @param string $type The type to check the value against. + * @param mixed $value The value to check. + */ + protected function checkType(string $type, $value) : bool + { + switch ($type) { + case 'array': + return \is_array($value); + case 'bool': + case 'boolean': + return \is_bool($value); + case 'callable': + return \is_callable($value); + case 'float': + case 'double': + return \is_float($value); + case 'int': + case 'integer': + return \is_int($value); + case 'null': + return $value === null; + case 'numeric': + return \is_numeric($value); + case 'object': + return \is_object($value); + case 'resource': + return \is_resource($value); + case 'scalar': + return \is_scalar($value); + case 'string': + return \is_string($value); + case 'mixed': + return \true; + default: + return $value instanceof $type; + } + } +} diff --git a/build/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php b/build/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php new file mode 100644 index 0000000..1431c87 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php @@ -0,0 +1,49 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Tool; + +use RayGlobalScoped\Ramsey\Collection\Exception\ValueExtractionException; +use function get_class; +use function method_exists; +use function property_exists; +use function sprintf; +/** + * Provides functionality to extract the value of a property or method from an object. + */ +trait ValueExtractorTrait +{ + /** + * Extracts the value of the given property or method from the object. + * + * @param mixed $object The object to extract the value from. + * @param string $propertyOrMethod The property or method for which the + * value should be extracted. + * + * @return mixed the value extracted from the specified property or method. + * + * @throws ValueExtractionException if the method or property is not defined. + */ + protected function extractValue($object, string $propertyOrMethod) + { + if (!\is_object($object)) { + throw new \RayGlobalScoped\Ramsey\Collection\Exception\ValueExtractionException('Unable to extract a value from a non-object'); + } + if (\property_exists($object, $propertyOrMethod)) { + return $object->{$propertyOrMethod}; + } + if (\method_exists($object, $propertyOrMethod)) { + return $object->{$propertyOrMethod}(); + } + throw new \RayGlobalScoped\Ramsey\Collection\Exception\ValueExtractionException(\sprintf('Method or property "%s" not defined in %s', $propertyOrMethod, \get_class($object))); + } +} diff --git a/build/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php b/build/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php new file mode 100644 index 0000000..1e0a7a0 --- /dev/null +++ b/build/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php @@ -0,0 +1,81 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Collection\Tool; + +use DateTimeInterface; +use function get_class; +use function get_resource_type; +use function is_array; +use function is_bool; +use function is_callable; +use function is_resource; +use function is_scalar; +/** + * Provides functionality to express a value as string + */ +trait ValueToStringTrait +{ + /** + * Returns a string representation of the value. + * + * - null value: `'NULL'` + * - boolean: `'TRUE'`, `'FALSE'` + * - array: `'Array'` + * - scalar: converted-value + * - resource: `'(type resource #number)'` + * - object with `__toString()`: result of `__toString()` + * - object DateTime: ISO 8601 date + * - object: `'(className Object)'` + * - anonymous function: same as object + * + * @param mixed $value the value to return as a string. + */ + protected function toolValueToString($value) : string + { + // null + if ($value === null) { + return 'NULL'; + } + // boolean constants + if (\is_bool($value)) { + return $value ? 'TRUE' : 'FALSE'; + } + // array + if (\is_array($value)) { + return 'Array'; + } + // scalar types (integer, float, string) + if (\is_scalar($value)) { + return (string) $value; + } + // resource + if (\is_resource($value)) { + return '(' . \get_resource_type($value) . ' resource #' . (int) $value . ')'; + } + // If we don't know what it is, use var_export(). + if (!\is_object($value)) { + return '(' . \var_export($value, \true) . ')'; + } + // From here, $value should be an object. + // __toString() is implemented + if (\is_callable([$value, '__toString'])) { + return (string) $value->__toString(); + } + // object of type \DateTime + if ($value instanceof \DateTimeInterface) { + return $value->format('c'); + } + // unknown type + return '(' . \get_class($value) . ' Object)'; + } +} diff --git a/build/vendor/ramsey/uuid/LICENSE b/build/vendor/ramsey/uuid/LICENSE new file mode 100644 index 0000000..b2aa4b5 --- /dev/null +++ b/build/vendor/ramsey/uuid/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012-2020 Ben Ramsey + +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. diff --git a/build/vendor/ramsey/uuid/src/BinaryUtils.php b/build/vendor/ramsey/uuid/src/BinaryUtils.php new file mode 100644 index 0000000..90df01c --- /dev/null +++ b/build/vendor/ramsey/uuid/src/BinaryUtils.php @@ -0,0 +1,58 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +/** + * Provides binary math utilities + */ +class BinaryUtils +{ + /** + * Applies the RFC 4122 variant field to the 16-bit clock sequence + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, § 4.1.1: Variant + * + * @param int $clockSeq The 16-bit clock sequence value before the RFC 4122 + * variant is applied + * + * @return int The 16-bit clock sequence multiplexed with the UUID variant + * + * @psalm-pure + */ + public static function applyVariant(int $clockSeq) : int + { + $clockSeq = $clockSeq & 0x3fff; + $clockSeq |= 0x8000; + return $clockSeq; + } + /** + * Applies the RFC 4122 version number to the 16-bit `time_hi_and_version` field + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version + * + * @param int $timeHi The value of the 16-bit `time_hi_and_version` field + * before the RFC 4122 version is applied + * @param int $version The RFC 4122 version to apply to the `time_hi` field + * + * @return int The 16-bit time_hi field of the timestamp multiplexed with + * the UUID version number + * + * @psalm-pure + */ + public static function applyVersion(int $timeHi, int $version) : int + { + $timeHi = $timeHi & 0xfff; + $timeHi |= $version << 12; + return $timeHi; + } +} diff --git a/build/vendor/ramsey/uuid/src/Builder/BuilderCollection.php b/build/vendor/ramsey/uuid/src/Builder/BuilderCollection.php new file mode 100644 index 0000000..eaa3aa8 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Builder/BuilderCollection.php @@ -0,0 +1,57 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Builder; + +use RayGlobalScoped\Ramsey\Collection\AbstractCollection; +use RayGlobalScoped\Ramsey\Collection\CollectionInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\Number\GenericNumberConverter; +use RayGlobalScoped\Ramsey\Uuid\Converter\Time\GenericTimeConverter; +use RayGlobalScoped\Ramsey\Uuid\Converter\Time\PhpTimeConverter; +use RayGlobalScoped\Ramsey\Uuid\Guid\GuidBuilder; +use RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator; +use RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidBuilder as NonstandardUuidBuilder; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; +use Traversable; +/** + * A collection of UuidBuilderInterface objects + */ +class BuilderCollection extends \RayGlobalScoped\Ramsey\Collection\AbstractCollection implements \RayGlobalScoped\Ramsey\Collection\CollectionInterface +{ + public function getType() : string + { + return \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface::class; + } + /** + * @psalm-mutation-free + * @psalm-suppress ImpureMethodCall + * @psalm-suppress InvalidTemplateParam + */ + public function getIterator() : \Traversable + { + return parent::getIterator(); + } + /** + * Re-constructs the object from its serialized form + * + * @param string $serialized The serialized PHP string to unserialize into + * a UuidInterface instance + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + */ + public function unserialize($serialized) : void + { + /** @var mixed[] $data */ + $data = \unserialize($serialized, ['allowed_classes' => [\RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator::class, \RayGlobalScoped\Ramsey\Uuid\Converter\Number\GenericNumberConverter::class, \RayGlobalScoped\Ramsey\Uuid\Converter\Time\GenericTimeConverter::class, \RayGlobalScoped\Ramsey\Uuid\Guid\GuidBuilder::class, \RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidBuilder::class, \RayGlobalScoped\Ramsey\Uuid\Converter\Time\PhpTimeConverter::class, \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidBuilder::class]]); + $this->data = $data; + } +} diff --git a/build/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php b/build/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php new file mode 100644 index 0000000..47020cc --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php @@ -0,0 +1,23 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Builder; + +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; +/** + * @deprecated Transition to {@see Rfc4122UuidBuilder}. + * + * @psalm-immutable + */ +class DefaultUuidBuilder extends \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidBuilder implements \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface +{ +} diff --git a/build/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php b/build/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php new file mode 100644 index 0000000..d287a95 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php @@ -0,0 +1,63 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Builder; + +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\Time\DegradedTimeConverter; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\DegradedUuid; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\Fields as Rfc4122Fields; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +/** + * @deprecated DegradedUuid instances are no longer necessary to support 32-bit + * systems. Transition to {@see DefaultUuidBuilder}. + * + * @psalm-immutable + */ +class DegradedUuidBuilder implements \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface +{ + /** + * @var NumberConverterInterface + */ + private $numberConverter; + /** + * @var TimeConverterInterface + */ + private $timeConverter; + /** + * @param NumberConverterInterface $numberConverter The number converter to + * use when constructing the DegradedUuid + * @param TimeConverterInterface|null $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to Unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, ?\RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter = null) + { + $this->numberConverter = $numberConverter; + $this->timeConverter = $timeConverter ?: new \RayGlobalScoped\Ramsey\Uuid\Converter\Time\DegradedTimeConverter(); + } + /** + * Builds and returns a DegradedUuid + * + * @param CodecInterface $codec The codec to use for building this DegradedUuid instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return DegradedUuid The DegradedUuidBuild returns an instance of Ramsey\Uuid\DegradedUuid + * + * @psalm-pure + */ + public function build(\RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return new \RayGlobalScoped\Ramsey\Uuid\DegradedUuid(new \RayGlobalScoped\Ramsey\Uuid\Rfc4122\Fields($bytes), $this->numberConverter, $codec, $this->timeConverter); + } +} diff --git a/build/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php b/build/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php new file mode 100644 index 0000000..0790198 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php @@ -0,0 +1,63 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Builder; + +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\BuilderNotFoundException; +use RayGlobalScoped\Ramsey\Uuid\Exception\UnableToBuildUuidException; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +/** + * FallbackBuilder builds a UUID by stepping through a list of UUID builders + * until a UUID can be constructed without exceptions + * + * @psalm-immutable + */ +class FallbackBuilder implements \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface +{ + /** + * @var BuilderCollection + */ + private $builders; + /** + * @param BuilderCollection $builders An array of UUID builders + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Builder\BuilderCollection $builders) + { + $this->builders = $builders; + } + /** + * Builds and returns a UuidInterface instance using the first builder that + * succeeds + * + * @param CodecInterface $codec The codec to use for building this instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return UuidInterface an instance of a UUID object + * + * @psalm-pure + */ + public function build(\RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $lastBuilderException = null; + /** @var UuidBuilderInterface $builder */ + foreach ($this->builders as $builder) { + try { + return $builder->build($codec, $bytes); + } catch (\RayGlobalScoped\Ramsey\Uuid\Exception\UnableToBuildUuidException $exception) { + $lastBuilderException = $exception; + continue; + } + } + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\BuilderNotFoundException('Could not find a suitable builder for the provided codec and fields', 0, $lastBuilderException); + } +} diff --git a/build/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php b/build/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php new file mode 100644 index 0000000..d27e5c8 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php @@ -0,0 +1,36 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Builder; + +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +/** + * A UUID builder builds instances of UuidInterface + * + * @psalm-immutable + */ +interface UuidBuilderInterface +{ + /** + * Builds and returns a UuidInterface + * + * @param CodecInterface $codec The codec to use for building this UuidInterface instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return UuidInterface Implementations may choose to return more specific + * instances of UUIDs that implement UuidInterface + * + * @psalm-pure + */ + public function build(\RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; +} diff --git a/build/vendor/ramsey/uuid/src/Codec/CodecInterface.php b/build/vendor/ramsey/uuid/src/Codec/CodecInterface.php new file mode 100644 index 0000000..aad5799 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Codec/CodecInterface.php @@ -0,0 +1,65 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Codec; + +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +/** + * A codec encodes and decodes a UUID according to defined rules + * + * @psalm-immutable + */ +interface CodecInterface +{ + /** + * Returns a hexadecimal string representation of a UuidInterface + * + * @param UuidInterface $uuid The UUID for which to create a hexadecimal + * string representation + * + * @return string Hexadecimal string representation of a UUID + * + * @psalm-return non-empty-string + */ + public function encode(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $uuid) : string; + /** + * Returns a binary string representation of a UuidInterface + * + * @param UuidInterface $uuid The UUID for which to create a binary string + * representation + * + * @return string Binary string representation of a UUID + * + * @psalm-return non-empty-string + */ + public function encodeBinary(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $uuid) : string; + /** + * Returns a UuidInterface derived from a hexadecimal string representation + * + * @param string $encodedUuid The hexadecimal string representation to + * convert into a UuidInterface instance + * + * @return UuidInterface An instance of a UUID decoded from a hexadecimal + * string representation + */ + public function decode(string $encodedUuid) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Returns a UuidInterface derived from a binary string representation + * + * @param string $bytes The binary string representation to convert into a + * UuidInterface instance + * + * @return UuidInterface An instance of a UUID decoded from a binary string + * representation + */ + public function decodeBytes(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; +} diff --git a/build/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php b/build/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php new file mode 100644 index 0000000..362fed7 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php @@ -0,0 +1,45 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Codec; + +use RayGlobalScoped\Ramsey\Uuid\Guid\Guid; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use function bin2hex; +use function substr; +/** + * GuidStringCodec encodes and decodes globally unique identifiers (GUID) + * + * @see Guid + * + * @psalm-immutable + */ +class GuidStringCodec extends \RayGlobalScoped\Ramsey\Uuid\Codec\StringCodec +{ + public function decode(string $encodedUuid) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $bytes = $this->getBytes($encodedUuid); + return $this->getBuilder()->build($this, $this->swapBytes($bytes)); + } + public function decodeBytes(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + // Specifically call parent::decode to preserve correct byte order + return parent::decode(\bin2hex($bytes)); + } + /** + * Swaps bytes according to the GUID rules + */ + private function swapBytes(string $bytes) : string + { + return $bytes[3] . $bytes[2] . $bytes[1] . $bytes[0] . $bytes[5] . $bytes[4] . $bytes[7] . $bytes[6] . \substr($bytes, 8); + } +} diff --git a/build/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php b/build/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php new file mode 100644 index 0000000..6fd7e82 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php @@ -0,0 +1,82 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Codec; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use function strlen; +use function substr; +/** + * OrderedTimeCodec encodes and decodes a UUID, optimizing the byte order for + * more efficient storage + * + * For binary representations of version 1 UUID, this codec may be used to + * reorganize the time fields, making the UUID closer to sequential when storing + * the bytes. According to Percona, this optimization can improve database + * INSERTs and SELECTs using the UUID column as a key. + * + * The string representation of the UUID will remain unchanged. Only the binary + * representation is reordered. + * + * **PLEASE NOTE:** Binary representations of UUIDs encoded with this codec must + * be decoded with this codec. Decoding using another codec can result in + * malformed UUIDs. + * + * @link https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/ Storing UUID Values in MySQL + * + * @psalm-immutable + */ +class OrderedTimeCodec extends \RayGlobalScoped\Ramsey\Uuid\Codec\StringCodec +{ + /** + * Returns a binary string representation of a UUID, with the timestamp + * fields rearranged for optimized storage + * + * @inheritDoc + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function encodeBinary(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $uuid) : string + { + if (!$uuid->getFields() instanceof \RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface || $uuid->getFields()->getVersion() !== \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_TIME) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Expected RFC 4122 version 1 (time-based) UUID'); + } + $bytes = $uuid->getFields()->getBytes(); + return $bytes[6] . $bytes[7] . $bytes[4] . $bytes[5] . $bytes[0] . $bytes[1] . $bytes[2] . $bytes[3] . \substr($bytes, 8); + } + /** + * Returns a UuidInterface derived from an ordered-time binary string + * representation + * + * @throws InvalidArgumentException if $bytes is an invalid length + * + * @inheritDoc + */ + public function decodeBytes(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + if (\strlen($bytes) !== 16) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('$bytes string should contain 16 characters.'); + } + // Rearrange the bytes to their original order. + $rearrangedBytes = $bytes[4] . $bytes[5] . $bytes[6] . $bytes[7] . $bytes[2] . $bytes[3] . $bytes[0] . $bytes[1] . \substr($bytes, 8); + $uuid = parent::decodeBytes($rearrangedBytes); + if (!$uuid->getFields() instanceof \RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface || $uuid->getFields()->getVersion() !== \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_TIME) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException('Attempting to decode a non-time-based UUID using ' . 'OrderedTimeCodec'); + } + return $uuid; + } +} diff --git a/build/vendor/ramsey/uuid/src/Codec/StringCodec.php b/build/vendor/ramsey/uuid/src/Codec/StringCodec.php new file mode 100644 index 0000000..58d21ad --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Codec/StringCodec.php @@ -0,0 +1,98 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Codec; + +use RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidUuidStringException; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use function hex2bin; +use function implode; +use function str_replace; +use function strlen; +use function substr; +/** + * StringCodec encodes and decodes RFC 4122 UUIDs + * + * @link http://tools.ietf.org/html/rfc4122 + * + * @psalm-immutable + */ +class StringCodec implements \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface +{ + /** + * @var UuidBuilderInterface + */ + private $builder; + /** + * Constructs a StringCodec + * + * @param UuidBuilderInterface $builder The builder to use when encoding UUIDs + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface $builder) + { + $this->builder = $builder; + } + public function encode(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $uuid) : string + { + /** @var FieldsInterface $fields */ + $fields = $uuid->getFields(); + return $fields->getTimeLow()->toString() . '-' . $fields->getTimeMid()->toString() . '-' . $fields->getTimeHiAndVersion()->toString() . '-' . $fields->getClockSeqHiAndReserved()->toString() . $fields->getClockSeqLow()->toString() . '-' . $fields->getNode()->toString(); + } + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function encodeBinary(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $uuid) : string + { + return $uuid->getFields()->getBytes(); + } + /** + * @throws InvalidUuidStringException + * + * @inheritDoc + */ + public function decode(string $encodedUuid) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return $this->builder->build($this, $this->getBytes($encodedUuid)); + } + public function decodeBytes(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + if (\strlen($bytes) !== 16) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('$bytes string should contain 16 characters.'); + } + return $this->builder->build($this, $bytes); + } + /** + * Returns the UUID builder + */ + protected function getBuilder() : \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface + { + return $this->builder; + } + /** + * Returns a byte string of the UUID + */ + protected function getBytes(string $encodedUuid) : string + { + $parsedUuid = \str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}', '-'], '', $encodedUuid); + $components = [\substr($parsedUuid, 0, 8), \substr($parsedUuid, 8, 4), \substr($parsedUuid, 12, 4), \substr($parsedUuid, 16, 4), \substr($parsedUuid, 20)]; + if (!\RayGlobalScoped\Ramsey\Uuid\Uuid::isValid(\implode('-', $components))) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidUuidStringException('Invalid UUID string: ' . $encodedUuid); + } + return (string) \hex2bin($parsedUuid); + } +} diff --git a/build/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php b/build/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php new file mode 100644 index 0000000..9cc4afa --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php @@ -0,0 +1,93 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Codec; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidUuidStringException; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use function bin2hex; +use function sprintf; +use function substr; +use function substr_replace; +/** + * TimestampFirstCombCodec encodes and decodes COMBs, with the timestamp as the + * first 48 bits + * + * In contrast with the TimestampLastCombCodec, the TimestampFirstCombCodec + * adds the timestamp to the first 48 bits of the COMB. To generate a + * timestamp-first COMB, set the TimestampFirstCombCodec as the codec, along + * with the CombGenerator as the random generator. + * + * ``` php + * $factory = new UuidFactory(); + * + * $factory->setCodec(new TimestampFirstCombCodec($factory->getUuidBuilder())); + * + * $factory->setRandomGenerator(new CombGenerator( + * $factory->getRandomGenerator(), + * $factory->getNumberConverter() + * )); + * + * $timestampFirstComb = $factory->uuid4(); + * ``` + * + * @link https://www.informit.com/articles/printerfriendly/25862 The Cost of GUIDs as Primary Keys + * + * @psalm-immutable + */ +class TimestampFirstCombCodec extends \RayGlobalScoped\Ramsey\Uuid\Codec\StringCodec +{ + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function encode(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $uuid) : string + { + $bytes = $this->swapBytes($uuid->getFields()->getBytes()); + return \sprintf('%08s-%04s-%04s-%04s-%012s', \bin2hex(\substr($bytes, 0, 4)), \bin2hex(\substr($bytes, 4, 2)), \bin2hex(\substr($bytes, 6, 2)), \bin2hex(\substr($bytes, 8, 2)), \bin2hex(\substr($bytes, 10))); + } + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function encodeBinary(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $uuid) : string + { + return $this->swapBytes($uuid->getFields()->getBytes()); + } + /** + * @throws InvalidUuidStringException + * + * @inheritDoc + */ + public function decode(string $encodedUuid) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $bytes = $this->getBytes($encodedUuid); + return $this->getBuilder()->build($this, $this->swapBytes($bytes)); + } + public function decodeBytes(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return $this->getBuilder()->build($this, $this->swapBytes($bytes)); + } + /** + * Swaps bytes according to the timestamp-first COMB rules + */ + private function swapBytes(string $bytes) : string + { + $first48Bits = \substr($bytes, 0, 6); + $last48Bits = \substr($bytes, -6); + $bytes = \substr_replace($bytes, $last48Bits, 0, 6); + $bytes = \substr_replace($bytes, $first48Bits, -6); + return $bytes; + } +} diff --git a/build/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php b/build/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php new file mode 100644 index 0000000..9fabfb6 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php @@ -0,0 +1,49 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Codec; + +/** + * TimestampLastCombCodec encodes and decodes COMBs, with the timestamp as the + * last 48 bits + * + * The CombGenerator when used with the StringCodec (and, by proxy, the + * TimestampLastCombCodec) adds the timestamp to the last 48 bits of the COMB. + * The TimestampLastCombCodec is provided for the sake of consistency. In + * practice, it is identical to the standard StringCodec but, it may be used + * with the CombGenerator for additional context when reading code. + * + * Consider the following code. By default, the codec used by UuidFactory is the + * StringCodec, but here, we explicitly set the TimestampLastCombCodec. It is + * redundant, but it is clear that we intend this COMB to be generated with the + * timestamp appearing at the end. + * + * ``` php + * $factory = new UuidFactory(); + * + * $factory->setCodec(new TimestampLastCombCodec($factory->getUuidBuilder())); + * + * $factory->setRandomGenerator(new CombGenerator( + * $factory->getRandomGenerator(), + * $factory->getNumberConverter() + * )); + * + * $timestampLastComb = $factory->uuid4(); + * ``` + * + * @link https://www.informit.com/articles/printerfriendly/25862 The Cost of GUIDs as Primary Keys + * + * @psalm-immutable + */ +class TimestampLastCombCodec extends \RayGlobalScoped\Ramsey\Uuid\Codec\StringCodec +{ +} diff --git a/build/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php b/build/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php new file mode 100644 index 0000000..ce9fb6f --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php @@ -0,0 +1,51 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Converter\Number; + +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator; +/** + * Previously used to integrate moontoast/math as a bignum arithmetic library, + * BigNumberConverter is deprecated in favor of GenericNumberConverter + * + * @deprecated Transition to {@see GenericNumberConverter}. + * + * @psalm-immutable + */ +class BigNumberConverter implements \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface +{ + /** + * @var NumberConverterInterface + */ + private $converter; + public function __construct() + { + $this->converter = new \RayGlobalScoped\Ramsey\Uuid\Converter\Number\GenericNumberConverter(new \RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator()); + } + /** + * @inheritDoc + * @psalm-pure + */ + public function fromHex(string $hex) : string + { + return $this->converter->fromHex($hex); + } + /** + * @inheritDoc + * @psalm-pure + */ + public function toHex(string $number) : string + { + return $this->converter->toHex($number); + } +} diff --git a/build/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php b/build/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php new file mode 100644 index 0000000..5c4873b --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php @@ -0,0 +1,23 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Converter\Number; + +/** + * @deprecated DegradedNumberConverter is no longer necessary for converting + * numbers on 32-bit systems. Transition to {@see GenericNumberConverter}. + * + * @psalm-immutable + */ +class DegradedNumberConverter extends \RayGlobalScoped\Ramsey\Uuid\Converter\Number\BigNumberConverter +{ +} diff --git a/build/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php b/build/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php new file mode 100644 index 0000000..be1699e --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php @@ -0,0 +1,56 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Converter\Number; + +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +/** + * GenericNumberConverter uses the provided calculate to convert decimal + * numbers to and from hexadecimal values + * + * @psalm-immutable + */ +class GenericNumberConverter implements \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface +{ + /** + * @var CalculatorInterface + */ + private $calculator; + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface $calculator) + { + $this->calculator = $calculator; + } + /** + * @inheritDoc + * @psalm-pure + * @psalm-return numeric-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function fromHex(string $hex) : string + { + return $this->calculator->fromBase($hex, 16)->toString(); + } + /** + * @inheritDoc + * @psalm-pure + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function toHex(string $number) : string + { + return $this->calculator->toBase(new \RayGlobalScoped\Ramsey\Uuid\Type\Integer($number), 16); + } +} diff --git a/build/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php b/build/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php new file mode 100644 index 0000000..92026fd --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php @@ -0,0 +1,54 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Converter; + +/** + * A number converter converts UUIDs from hexadecimal characters into + * representations of integers and vice versa + * + * @psalm-immutable + */ +interface NumberConverterInterface +{ + /** + * Converts a hexadecimal number into an string integer representation of + * the number + * + * The integer representation returned is a string representation of the + * integer, to accommodate unsigned integers greater than PHP_INT_MAX. + * + * @param string $hex The hexadecimal string representation to convert + * + * @return string String representation of an integer + * + * @psalm-return numeric-string + * + * @psalm-pure + */ + public function fromHex(string $hex) : string; + /** + * Converts a string integer representation into a hexadecimal string + * representation of the number + * + * @param string $number A string integer representation to convert; this + * must be a numeric string to accommodate unsigned integers greater + * than PHP_INT_MAX. + * + * @return string Hexadecimal string + * + * @psalm-return non-empty-string + * + * @psalm-pure + */ + public function toHex(string $number) : string; +} diff --git a/build/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php b/build/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php new file mode 100644 index 0000000..a9ac109 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php @@ -0,0 +1,45 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Converter\Time; + +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Time; +/** + * Previously used to integrate moontoast/math as a bignum arithmetic library, + * BigNumberTimeConverter is deprecated in favor of GenericTimeConverter + * + * @deprecated Transition to {@see GenericTimeConverter}. + * + * @psalm-immutable + */ +class BigNumberTimeConverter implements \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface +{ + /** + * @var TimeConverterInterface + */ + private $converter; + public function __construct() + { + $this->converter = new \RayGlobalScoped\Ramsey\Uuid\Converter\Time\GenericTimeConverter(new \RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator()); + } + public function calculateTime(string $seconds, string $microseconds) : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return $this->converter->calculateTime($seconds, $microseconds); + } + public function convertTime(\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $uuidTimestamp) : \RayGlobalScoped\Ramsey\Uuid\Type\Time + { + return $this->converter->convertTime($uuidTimestamp); + } +} diff --git a/build/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php b/build/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php new file mode 100644 index 0000000..f597eeb --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php @@ -0,0 +1,23 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Converter\Time; + +/** + * @deprecated DegradedTimeConverter is no longer necessary for converting + * time on 32-bit systems. Transition to {@see GenericTimeConverter}. + * + * @psalm-immutable + */ +class DegradedTimeConverter extends \RayGlobalScoped\Ramsey\Uuid\Converter\Time\BigNumberTimeConverter +{ +} diff --git a/build/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php b/build/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php new file mode 100644 index 0000000..f623c8b --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php @@ -0,0 +1,82 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Converter\Time; + +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface; +use RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\Type\Time; +use function explode; +use function str_pad; +use const STR_PAD_LEFT; +/** + * GenericTimeConverter uses the provided calculator to calculate and convert + * time values + * + * @psalm-immutable + */ +class GenericTimeConverter implements \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface +{ + /** + * The number of 100-nanosecond intervals from the Gregorian calendar epoch + * to the Unix epoch. + */ + private const GREGORIAN_TO_UNIX_INTERVALS = '122192928000000000'; + /** + * The number of 100-nanosecond intervals in one second. + */ + private const SECOND_INTERVALS = '10000000'; + /** + * The number of 100-nanosecond intervals in one microsecond. + */ + private const MICROSECOND_INTERVALS = '10'; + /** + * @var CalculatorInterface + */ + private $calculator; + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface $calculator) + { + $this->calculator = $calculator; + } + public function calculateTime(string $seconds, string $microseconds) : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + $timestamp = new \RayGlobalScoped\Ramsey\Uuid\Type\Time($seconds, $microseconds); + // Convert the seconds into a count of 100-nanosecond intervals. + $sec = $this->calculator->multiply($timestamp->getSeconds(), new \RayGlobalScoped\Ramsey\Uuid\Type\Integer(self::SECOND_INTERVALS)); + // Convert the microseconds into a count of 100-nanosecond intervals. + $usec = $this->calculator->multiply($timestamp->getMicroseconds(), new \RayGlobalScoped\Ramsey\Uuid\Type\Integer(self::MICROSECOND_INTERVALS)); + // Combine the seconds and microseconds intervals and add the count of + // 100-nanosecond intervals from the Gregorian calendar epoch to the + // Unix epoch. This gives us the correct count of 100-nanosecond + // intervals since the Gregorian calendar epoch for the given seconds + // and microseconds. + /** @var IntegerObject $uuidTime */ + $uuidTime = $this->calculator->add($sec, $usec, new \RayGlobalScoped\Ramsey\Uuid\Type\Integer(self::GREGORIAN_TO_UNIX_INTERVALS)); + $uuidTimeHex = \str_pad($this->calculator->toHexadecimal($uuidTime)->toString(), 16, '0', \STR_PAD_LEFT); + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal($uuidTimeHex); + } + public function convertTime(\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $uuidTimestamp) : \RayGlobalScoped\Ramsey\Uuid\Type\Time + { + // From the total, subtract the number of 100-nanosecond intervals from + // the Gregorian calendar epoch to the Unix epoch. This gives us the + // number of 100-nanosecond intervals from the Unix epoch, which also + // includes the microtime. + $epochNanoseconds = $this->calculator->subtract($this->calculator->toInteger($uuidTimestamp), new \RayGlobalScoped\Ramsey\Uuid\Type\Integer(self::GREGORIAN_TO_UNIX_INTERVALS)); + // Convert the 100-nanosecond intervals into seconds and microseconds. + $unixTimestamp = $this->calculator->divide(\RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::HALF_UP, 6, $epochNanoseconds, new \RayGlobalScoped\Ramsey\Uuid\Type\Integer(self::SECOND_INTERVALS)); + $split = \explode('.', (string) $unixTimestamp, 2); + return new \RayGlobalScoped\Ramsey\Uuid\Type\Time($split[0], $split[1] ?? 0); + } +} diff --git a/build/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php b/build/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php new file mode 100644 index 0000000..1820f6f --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php @@ -0,0 +1,138 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Converter\Time; + +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator; +use RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\Type\Time; +use function count; +use function dechex; +use function explode; +use function is_float; +use function is_int; +use function str_pad; +use function strlen; +use function substr; +use const STR_PAD_LEFT; +use const STR_PAD_RIGHT; +/** + * PhpTimeConverter uses built-in PHP functions and standard math operations + * available to the PHP programming language to provide facilities for + * converting parts of time into representations that may be used in UUIDs + * + * @psalm-immutable + */ +class PhpTimeConverter implements \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface +{ + /** + * The number of 100-nanosecond intervals from the Gregorian calendar epoch + * to the Unix epoch. + */ + private const GREGORIAN_TO_UNIX_INTERVALS = 0x1b21dd213814000; + /** + * The number of 100-nanosecond intervals in one second. + */ + private const SECOND_INTERVALS = 10000000; + /** + * The number of 100-nanosecond intervals in one microsecond. + */ + private const MICROSECOND_INTERVALS = 10; + /** + * @var CalculatorInterface + */ + private $calculator; + /** + * @var TimeConverterInterface + */ + private $fallbackConverter; + /** + * @var int + */ + private $phpPrecision; + public function __construct(?\RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface $calculator = null, ?\RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $fallbackConverter = null) + { + if ($calculator === null) { + $calculator = new \RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator(); + } + if ($fallbackConverter === null) { + $fallbackConverter = new \RayGlobalScoped\Ramsey\Uuid\Converter\Time\GenericTimeConverter($calculator); + } + $this->calculator = $calculator; + $this->fallbackConverter = $fallbackConverter; + $this->phpPrecision = (int) \ini_get('precision'); + } + public function calculateTime(string $seconds, string $microseconds) : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + $seconds = new \RayGlobalScoped\Ramsey\Uuid\Type\Integer($seconds); + $microseconds = new \RayGlobalScoped\Ramsey\Uuid\Type\Integer($microseconds); + // Calculate the count of 100-nanosecond intervals since the Gregorian + // calendar epoch for the given seconds and microseconds. + $uuidTime = (int) $seconds->toString() * self::SECOND_INTERVALS + (int) $microseconds->toString() * self::MICROSECOND_INTERVALS + self::GREGORIAN_TO_UNIX_INTERVALS; + // Check to see whether we've overflowed the max/min integer size. + // If so, we will default to a different time converter. + /** @psalm-suppress RedundantCondition */ + if (!\is_int($uuidTime)) { + return $this->fallbackConverter->calculateTime($seconds->toString(), $microseconds->toString()); + } + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\str_pad(\dechex((int) $uuidTime), 16, '0', \STR_PAD_LEFT)); + } + public function convertTime(\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $uuidTimestamp) : \RayGlobalScoped\Ramsey\Uuid\Type\Time + { + $timestamp = $this->calculator->toInteger($uuidTimestamp); + // Convert the 100-nanosecond intervals into seconds and microseconds. + $splitTime = $this->splitTime(((int) $timestamp->toString() - self::GREGORIAN_TO_UNIX_INTERVALS) / self::SECOND_INTERVALS); + if (\count($splitTime) === 0) { + return $this->fallbackConverter->convertTime($uuidTimestamp); + } + return new \RayGlobalScoped\Ramsey\Uuid\Type\Time($splitTime['sec'], $splitTime['usec']); + } + /** + * @param int|float $time The time to split into seconds and microseconds + * + * @return string[] + */ + private function splitTime($time) : array + { + $split = \explode('.', (string) $time, 2); + // If the $time value is a float but $split only has 1 element, then the + // float math was rounded up to the next second, so we want to return + // an empty array to allow use of the fallback converter. + if (\is_float($time) && \count($split) === 1) { + return []; + } + if (\count($split) === 1) { + return ['sec' => $split[0], 'usec' => '0']; + } + // If the microseconds are less than six characters AND the length of + // the number is greater than or equal to the PHP precision, then it's + // possible that we lost some precision for the microseconds. Return an + // empty array, so that we can choose to use the fallback converter. + if (\strlen($split[1]) < 6 && \strlen((string) $time) >= $this->phpPrecision) { + return []; + } + $microseconds = $split[1]; + // Ensure the microseconds are no longer than 6 digits. If they are, + // truncate the number to the first 6 digits and round up, if needed. + if (\strlen($microseconds) > 6) { + $roundingDigit = (int) \substr($microseconds, 6, 1); + $microseconds = (int) \substr($microseconds, 0, 6); + if ($roundingDigit >= 5) { + $microseconds++; + } + } + return ['sec' => $split[0], 'usec' => \str_pad((string) $microseconds, 6, '0', \STR_PAD_RIGHT)]; + } +} diff --git a/build/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php b/build/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php new file mode 100644 index 0000000..e8efd22 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php @@ -0,0 +1,54 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Converter; + +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Time; +/** + * A time converter converts timestamps into representations that may be used + * in UUIDs + * + * @psalm-immutable + */ +interface TimeConverterInterface +{ + /** + * Uses the provided seconds and micro-seconds to calculate the count of + * 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582, for + * RFC 4122 variant UUIDs + * + * @link http://tools.ietf.org/html/rfc4122#section-4.2.2 RFC 4122, § 4.2.2: Generation Details + * + * @param string $seconds A string representation of the number of seconds + * since the Unix epoch for the time to calculate + * @param string $microseconds A string representation of the micro-seconds + * associated with the time to calculate + * + * @return Hexadecimal The full UUID timestamp as a Hexadecimal value + * + * @psalm-pure + */ + public function calculateTime(string $seconds, string $microseconds) : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Converts a timestamp extracted from a UUID to a Unix timestamp + * + * @param Hexadecimal $uuidTimestamp A hexadecimal representation of a UUID + * timestamp; a UUID timestamp is a count of 100-nanosecond intervals + * since UTC 00:00:00.00, 15 October 1582. + * + * @return Time An instance of {@see Time} + * + * @psalm-pure + */ + public function convertTime(\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $uuidTimestamp) : \RayGlobalScoped\Ramsey\Uuid\Type\Time; +} diff --git a/build/vendor/ramsey/uuid/src/DegradedUuid.php b/build/vendor/ramsey/uuid/src/DegradedUuid.php new file mode 100644 index 0000000..c66e353 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/DegradedUuid.php @@ -0,0 +1,23 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +/** + * @deprecated DegradedUuid is no longer necessary to represent UUIDs on 32-bit + * systems. Transition typehints to {@see UuidInterface}. + * + * @psalm-immutable + */ +class DegradedUuid extends \RayGlobalScoped\Ramsey\Uuid\Uuid +{ +} diff --git a/build/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php b/build/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php new file mode 100644 index 0000000..1fc573f --- /dev/null +++ b/build/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php @@ -0,0 +1,129 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +use DateTimeInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +/** + * This interface encapsulates deprecated methods for ramsey/uuid; this + * interface and its methods will be removed in ramsey/uuid 5.0.0. + * + * @psalm-immutable + */ +interface DeprecatedUuidInterface +{ + /** + * @deprecated This method will be removed in 5.0.0. There is no alternative + * recommendation, so plan accordingly. + */ + public function getNumberConverter() : \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. + * + * @return string[] + */ + public function getFieldsHex() : array; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}. + */ + public function getClockSeqHiAndReservedHex() : string; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}. + */ + public function getClockSeqLowHex() : string; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}. + */ + public function getClockSequenceHex() : string; + /** + * @deprecated In ramsey/uuid version 5.0.0, this will be removed from the + * interface. It is available at {@see UuidV1::getDateTime()}. + */ + public function getDateTime() : \DateTimeInterface; + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getLeastSignificantBitsHex() : string; + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getMostSignificantBitsHex() : string; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()}. + */ + public function getNodeHex() : string; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}. + */ + public function getTimeHiAndVersionHex() : string; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()}. + */ + public function getTimeLowHex() : string; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()}. + */ + public function getTimeMidHex() : string; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()}. + */ + public function getTimestampHex() : string; + /** + * @deprecated In ramsey/uuid version 5.0.0, this will be removed from this + * interface. It has moved to {@see \Ramsey\Uuid\Rfc4122\UuidInterface::getUrn()}. + */ + public function getUrn() : string; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}. + */ + public function getVariant() : ?int; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}. + */ + public function getVersion() : ?int; +} diff --git a/build/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php b/build/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php new file mode 100644 index 0000000..31beb8c --- /dev/null +++ b/build/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php @@ -0,0 +1,319 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +use DateTimeImmutable; +use DateTimeInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\DateTimeException; +use RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Throwable; +use function str_pad; +use function substr; +use const STR_PAD_LEFT; +/** + * This trait encapsulates deprecated methods for ramsey/uuid; this trait and + * its methods will be removed in ramsey/uuid 5.0.0. + * + * @psalm-immutable + */ +trait DeprecatedUuidMethodsTrait +{ + /** + * @var Rfc4122FieldsInterface + */ + protected $fields; + /** + * @var NumberConverterInterface + */ + protected $numberConverter; + /** + * @var TimeConverterInterface + */ + protected $timeConverter; + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqHiAndReserved()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getClockSeqHiAndReserved() : string + { + return $this->numberConverter->fromHex($this->fields->getClockSeqHiAndReserved()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqHiAndReserved()}. + */ + public function getClockSeqHiAndReservedHex() : string + { + return $this->fields->getClockSeqHiAndReserved()->toString(); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqLow()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getClockSeqLow() : string + { + return $this->numberConverter->fromHex($this->fields->getClockSeqLow()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqLow()}. + */ + public function getClockSeqLowHex() : string + { + return $this->fields->getClockSeqLow()->toString(); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeq()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getClockSequence() : string + { + return $this->numberConverter->fromHex($this->fields->getClockSeq()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeq()}. + */ + public function getClockSequenceHex() : string + { + return $this->fields->getClockSeq()->toString(); + } + /** + * @deprecated This method will be removed in 5.0.0. There is no alternative + * recommendation, so plan accordingly. + */ + public function getNumberConverter() : \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface + { + return $this->numberConverter; + } + /** + * @deprecated In ramsey/uuid version 5.0.0, this will be removed. + * It is available at {@see UuidV1::getDateTime()}. + * + * @return DateTimeImmutable An immutable instance of DateTimeInterface + * + * @throws UnsupportedOperationException if UUID is not time-based + * @throws DateTimeException if DateTime throws an exception/error + */ + public function getDateTime() : \DateTimeInterface + { + if ($this->fields->getVersion() !== 1) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException('Not a time-based UUID'); + } + $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); + try { + return new \DateTimeImmutable('@' . $time->getSeconds()->toString() . '.' . \str_pad($time->getMicroseconds()->toString(), 6, '0', \STR_PAD_LEFT)); + } catch (\Throwable $e) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DateTimeException($e->getMessage(), (int) $e->getCode(), $e); + } + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. + * + * @return string[] + */ + public function getFieldsHex() : array + { + return ['time_low' => $this->fields->getTimeLow()->toString(), 'time_mid' => $this->fields->getTimeMid()->toString(), 'time_hi_and_version' => $this->fields->getTimeHiAndVersion()->toString(), 'clock_seq_hi_and_reserved' => $this->fields->getClockSeqHiAndReserved()->toString(), 'clock_seq_low' => $this->fields->getClockSeqLow()->toString(), 'node' => $this->fields->getNode()->toString()]; + } + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getLeastSignificantBits() : string + { + $leastSignificantHex = \substr($this->getHex()->toString(), 16); + return $this->numberConverter->fromHex($leastSignificantHex); + } + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getLeastSignificantBitsHex() : string + { + return \substr($this->getHex()->toString(), 16); + } + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getMostSignificantBits() : string + { + $mostSignificantHex = \substr($this->getHex()->toString(), 0, 16); + return $this->numberConverter->fromHex($mostSignificantHex); + } + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getMostSignificantBitsHex() : string + { + return \substr($this->getHex()->toString(), 0, 16); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getNode()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getNode() : string + { + return $this->numberConverter->fromHex($this->fields->getNode()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getNode()}. + */ + public function getNodeHex() : string + { + return $this->fields->getNode()->toString(); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeHiAndVersion()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getTimeHiAndVersion() : string + { + return $this->numberConverter->fromHex($this->fields->getTimeHiAndVersion()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeHiAndVersion()}. + */ + public function getTimeHiAndVersionHex() : string + { + return $this->fields->getTimeHiAndVersion()->toString(); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeLow()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getTimeLow() : string + { + return $this->numberConverter->fromHex($this->fields->getTimeLow()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeLow()}. + */ + public function getTimeLowHex() : string + { + return $this->fields->getTimeLow()->toString(); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeMid()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getTimeMid() : string + { + return $this->numberConverter->fromHex($this->fields->getTimeMid()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeMid()}. + */ + public function getTimeMidHex() : string + { + return $this->fields->getTimeMid()->toString(); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimestamp()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getTimestamp() : string + { + if ($this->fields->getVersion() !== 1) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException('Not a time-based UUID'); + } + return $this->numberConverter->fromHex($this->fields->getTimestamp()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimestamp()}. + */ + public function getTimestampHex() : string + { + if ($this->fields->getVersion() !== 1) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException('Not a time-based UUID'); + } + return $this->fields->getTimestamp()->toString(); + } + /** + * @deprecated This has moved to {@see Rfc4122FieldsInterface::getUrn()} and + * is available on {@see \Ramsey\Uuid\Rfc4122\UuidV1}, + * {@see \Ramsey\Uuid\Rfc4122\UuidV3}, {@see \Ramsey\Uuid\Rfc4122\UuidV4}, + * and {@see \Ramsey\Uuid\Rfc4122\UuidV5}. + */ + public function getUrn() : string + { + return 'urn:uuid:' . $this->toString(); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}. + */ + public function getVariant() : ?int + { + return $this->fields->getVariant(); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}. + */ + public function getVersion() : ?int + { + return $this->fields->getVersion(); + } +} diff --git a/build/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php b/build/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php new file mode 100644 index 0000000..69f43af --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; +/** + * Thrown to indicate that no suitable builder could be found + */ +class BuilderNotFoundException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/DateTimeException.php b/build/vendor/ramsey/uuid/src/Exception/DateTimeException.php new file mode 100644 index 0000000..19e8e8c --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/DateTimeException.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; +/** + * Thrown to indicate that the PHP DateTime extension encountered an exception/error + */ +class DateTimeException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/DceSecurityException.php b/build/vendor/ramsey/uuid/src/Exception/DceSecurityException.php new file mode 100644 index 0000000..7998d70 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/DceSecurityException.php @@ -0,0 +1,22 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; +/** + * Thrown to indicate an exception occurred while dealing with DCE Security + * (version 2) UUIDs + */ +class DceSecurityException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php b/build/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..71e50a6 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use InvalidArgumentException as PhpInvalidArgumentException; +/** + * Thrown to indicate that the argument received is not valid + */ +class InvalidArgumentException extends \InvalidArgumentException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php b/build/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php new file mode 100644 index 0000000..83e4947 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; +/** + * Thrown to indicate that the bytes being operated on are invalid in some way + */ +class InvalidBytesException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php b/build/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php new file mode 100644 index 0000000..0ebc0a1 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php @@ -0,0 +1,23 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +/** + * Thrown to indicate that the string received is not a valid UUID + * + * The InvalidArgumentException that this extends is the ramsey/uuid version + * of this exception. It exists in the same namespace as this class. + */ +class InvalidUuidStringException extends \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/NameException.php b/build/vendor/ramsey/uuid/src/Exception/NameException.php new file mode 100644 index 0000000..94f8e24 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/NameException.php @@ -0,0 +1,22 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; +/** + * Thrown to indicate that an error occurred while attempting to hash a + * namespace and name + */ +class NameException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/NodeException.php b/build/vendor/ramsey/uuid/src/Exception/NodeException.php new file mode 100644 index 0000000..b8847f7 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/NodeException.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; +/** + * Thrown to indicate that attempting to fetch or create a node ID encountered an error + */ +class NodeException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/RandomSourceException.php b/build/vendor/ramsey/uuid/src/Exception/RandomSourceException.php new file mode 100644 index 0000000..da3493d --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/RandomSourceException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; +/** + * Thrown to indicate that the source of random data encountered an error + * + * This exception is used mostly to indicate that random_bytes() or random_int() + * threw an exception. However, it may be used for other sources of random data. + */ +class RandomSourceException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/TimeSourceException.php b/build/vendor/ramsey/uuid/src/Exception/TimeSourceException.php new file mode 100644 index 0000000..7d61ca5 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/TimeSourceException.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; +/** + * Thrown to indicate that the source of time encountered an error + */ +class TimeSourceException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php b/build/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php new file mode 100644 index 0000000..03cb16b --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; +/** + * Thrown to indicate a builder is unable to build a UUID + */ +class UnableToBuildUuidException extends \RuntimeException +{ +} diff --git a/build/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php b/build/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php new file mode 100644 index 0000000..897b651 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Exception; + +use LogicException as PhpLogicException; +/** + * Thrown to indicate that the requested operation is not supported + */ +class UnsupportedOperationException extends \LogicException +{ +} diff --git a/build/vendor/ramsey/uuid/src/FeatureSet.php b/build/vendor/ramsey/uuid/src/FeatureSet.php new file mode 100644 index 0000000..f0c1e56 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/FeatureSet.php @@ -0,0 +1,372 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +use RayGlobalScoped\Ramsey\Uuid\Builder\BuilderCollection; +use RayGlobalScoped\Ramsey\Uuid\Builder\FallbackBuilder; +use RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\GuidStringCodec; +use RayGlobalScoped\Ramsey\Uuid\Codec\StringCodec; +use RayGlobalScoped\Ramsey\Uuid\Converter\Number\GenericNumberConverter; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\Time\GenericTimeConverter; +use RayGlobalScoped\Ramsey\Uuid\Converter\Time\PhpTimeConverter; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Generator\DceSecurityGenerator; +use RayGlobalScoped\Ramsey\Uuid\Generator\DceSecurityGeneratorInterface; +use RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorFactory; +use RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorInterface; +use RayGlobalScoped\Ramsey\Uuid\Generator\PeclUuidNameGenerator; +use RayGlobalScoped\Ramsey\Uuid\Generator\PeclUuidRandomGenerator; +use RayGlobalScoped\Ramsey\Uuid\Generator\PeclUuidTimeGenerator; +use RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorFactory; +use RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface; +use RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorFactory; +use RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface; +use RayGlobalScoped\Ramsey\Uuid\Guid\GuidBuilder; +use RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator; +use RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface; +use RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidBuilder as NonstandardUuidBuilder; +use RayGlobalScoped\Ramsey\Uuid\Provider\Dce\SystemDceSecurityProvider; +use RayGlobalScoped\Ramsey\Uuid\Provider\DceSecurityProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Provider\Node\FallbackNodeProvider; +use RayGlobalScoped\Ramsey\Uuid\Provider\Node\NodeProviderCollection; +use RayGlobalScoped\Ramsey\Uuid\Provider\Node\RandomNodeProvider; +use RayGlobalScoped\Ramsey\Uuid\Provider\Node\SystemNodeProvider; +use RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Provider\Time\SystemTimeProvider; +use RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; +use RayGlobalScoped\Ramsey\Uuid\Validator\GenericValidator; +use RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface; +use const PHP_INT_SIZE; +/** + * FeatureSet detects and exposes available features in the current environment + * + * A feature set is used by UuidFactory to determine the available features and + * capabilities of the environment. + */ +class FeatureSet +{ + /** + * @var bool + */ + private $disableBigNumber = \false; + /** + * @var bool + */ + private $disable64Bit = \false; + /** + * @var bool + */ + private $ignoreSystemNode = \false; + /** + * @var bool + */ + private $enablePecl = \false; + /** + * @var UuidBuilderInterface + */ + private $builder; + /** + * @var CodecInterface + */ + private $codec; + /** + * @var DceSecurityGeneratorInterface + */ + private $dceSecurityGenerator; + /** + * @var NameGeneratorInterface + */ + private $nameGenerator; + /** + * @var NodeProviderInterface + */ + private $nodeProvider; + /** + * @var NumberConverterInterface + */ + private $numberConverter; + /** + * @var TimeConverterInterface + */ + private $timeConverter; + /** + * @var RandomGeneratorInterface + */ + private $randomGenerator; + /** + * @var TimeGeneratorInterface + */ + private $timeGenerator; + /** + * @var TimeProviderInterface + */ + private $timeProvider; + /** + * @var ValidatorInterface + */ + private $validator; + /** + * @var CalculatorInterface + */ + private $calculator; + /** + * @param bool $useGuids True build UUIDs using the GuidStringCodec + * @param bool $force32Bit True to force the use of 32-bit functionality + * (primarily for testing purposes) + * @param bool $forceNoBigNumber True to disable the use of moontoast/math + * (primarily for testing purposes) + * @param bool $ignoreSystemNode True to disable attempts to check for the + * system node ID (primarily for testing purposes) + * @param bool $enablePecl True to enable the use of the PeclUuidTimeGenerator + * to generate version 1 UUIDs + */ + public function __construct(bool $useGuids = \false, bool $force32Bit = \false, bool $forceNoBigNumber = \false, bool $ignoreSystemNode = \false, bool $enablePecl = \false) + { + $this->disableBigNumber = $forceNoBigNumber; + $this->disable64Bit = $force32Bit; + $this->ignoreSystemNode = $ignoreSystemNode; + $this->enablePecl = $enablePecl; + $this->setCalculator(new \RayGlobalScoped\Ramsey\Uuid\Math\BrickMathCalculator()); + $this->builder = $this->buildUuidBuilder($useGuids); + $this->codec = $this->buildCodec($useGuids); + $this->nodeProvider = $this->buildNodeProvider(); + $this->nameGenerator = $this->buildNameGenerator(); + $this->randomGenerator = $this->buildRandomGenerator(); + $this->setTimeProvider(new \RayGlobalScoped\Ramsey\Uuid\Provider\Time\SystemTimeProvider()); + $this->setDceSecurityProvider(new \RayGlobalScoped\Ramsey\Uuid\Provider\Dce\SystemDceSecurityProvider()); + $this->validator = new \RayGlobalScoped\Ramsey\Uuid\Validator\GenericValidator(); + } + /** + * Returns the builder configured for this environment + */ + public function getBuilder() : \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface + { + return $this->builder; + } + /** + * Returns the calculator configured for this environment + */ + public function getCalculator() : \RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface + { + return $this->calculator; + } + /** + * Returns the codec configured for this environment + */ + public function getCodec() : \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface + { + return $this->codec; + } + /** + * Returns the DCE Security generator configured for this environment + */ + public function getDceSecurityGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\DceSecurityGeneratorInterface + { + return $this->dceSecurityGenerator; + } + /** + * Returns the name generator configured for this environment + */ + public function getNameGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorInterface + { + return $this->nameGenerator; + } + /** + * Returns the node provider configured for this environment + */ + public function getNodeProvider() : \RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface + { + return $this->nodeProvider; + } + /** + * Returns the number converter configured for this environment + */ + public function getNumberConverter() : \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface + { + return $this->numberConverter; + } + /** + * Returns the random generator configured for this environment + */ + public function getRandomGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface + { + return $this->randomGenerator; + } + /** + * Returns the time converter configured for this environment + */ + public function getTimeConverter() : \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface + { + return $this->timeConverter; + } + /** + * Returns the time generator configured for this environment + */ + public function getTimeGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface + { + return $this->timeGenerator; + } + /** + * Returns the validator configured for this environment + */ + public function getValidator() : \RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface + { + return $this->validator; + } + /** + * Sets the calculator to use in this environment + */ + public function setCalculator(\RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface $calculator) : void + { + $this->calculator = $calculator; + $this->numberConverter = $this->buildNumberConverter($calculator); + $this->timeConverter = $this->buildTimeConverter($calculator); + if (isset($this->timeProvider)) { + $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider); + } + } + /** + * Sets the DCE Security provider to use in this environment + */ + public function setDceSecurityProvider(\RayGlobalScoped\Ramsey\Uuid\Provider\DceSecurityProviderInterface $dceSecurityProvider) : void + { + $this->dceSecurityGenerator = $this->buildDceSecurityGenerator($dceSecurityProvider); + } + /** + * Sets the node provider to use in this environment + */ + public function setNodeProvider(\RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface $nodeProvider) : void + { + $this->nodeProvider = $nodeProvider; + $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider); + } + /** + * Sets the time provider to use in this environment + */ + public function setTimeProvider(\RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface $timeProvider) : void + { + $this->timeProvider = $timeProvider; + $this->timeGenerator = $this->buildTimeGenerator($timeProvider); + } + /** + * Set the validator to use in this environment + */ + public function setValidator(\RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface $validator) : void + { + $this->validator = $validator; + } + /** + * Returns a codec configured for this environment + * + * @param bool $useGuids Whether to build UUIDs using the GuidStringCodec + */ + private function buildCodec(bool $useGuids = \false) : \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface + { + if ($useGuids) { + return new \RayGlobalScoped\Ramsey\Uuid\Codec\GuidStringCodec($this->builder); + } + return new \RayGlobalScoped\Ramsey\Uuid\Codec\StringCodec($this->builder); + } + /** + * Returns a DCE Security generator configured for this environment + */ + private function buildDceSecurityGenerator(\RayGlobalScoped\Ramsey\Uuid\Provider\DceSecurityProviderInterface $dceSecurityProvider) : \RayGlobalScoped\Ramsey\Uuid\Generator\DceSecurityGeneratorInterface + { + return new \RayGlobalScoped\Ramsey\Uuid\Generator\DceSecurityGenerator($this->numberConverter, $this->timeGenerator, $dceSecurityProvider); + } + /** + * Returns a node provider configured for this environment + */ + private function buildNodeProvider() : \RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface + { + if ($this->ignoreSystemNode) { + return new \RayGlobalScoped\Ramsey\Uuid\Provider\Node\RandomNodeProvider(); + } + return new \RayGlobalScoped\Ramsey\Uuid\Provider\Node\FallbackNodeProvider(new \RayGlobalScoped\Ramsey\Uuid\Provider\Node\NodeProviderCollection([new \RayGlobalScoped\Ramsey\Uuid\Provider\Node\SystemNodeProvider(), new \RayGlobalScoped\Ramsey\Uuid\Provider\Node\RandomNodeProvider()])); + } + /** + * Returns a number converter configured for this environment + */ + private function buildNumberConverter(\RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface $calculator) : \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface + { + return new \RayGlobalScoped\Ramsey\Uuid\Converter\Number\GenericNumberConverter($calculator); + } + /** + * Returns a random generator configured for this environment + */ + private function buildRandomGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface + { + if ($this->enablePecl) { + return new \RayGlobalScoped\Ramsey\Uuid\Generator\PeclUuidRandomGenerator(); + } + return (new \RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorFactory())->getGenerator(); + } + /** + * Returns a time generator configured for this environment + * + * @param TimeProviderInterface $timeProvider The time provider to use with + * the time generator + */ + private function buildTimeGenerator(\RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface $timeProvider) : \RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface + { + if ($this->enablePecl) { + return new \RayGlobalScoped\Ramsey\Uuid\Generator\PeclUuidTimeGenerator(); + } + return (new \RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorFactory($this->nodeProvider, $this->timeConverter, $timeProvider))->getGenerator(); + } + /** + * Returns a name generator configured for this environment + */ + private function buildNameGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorInterface + { + if ($this->enablePecl) { + return new \RayGlobalScoped\Ramsey\Uuid\Generator\PeclUuidNameGenerator(); + } + return (new \RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorFactory())->getGenerator(); + } + /** + * Returns a time converter configured for this environment + */ + private function buildTimeConverter(\RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface $calculator) : \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface + { + $genericConverter = new \RayGlobalScoped\Ramsey\Uuid\Converter\Time\GenericTimeConverter($calculator); + if ($this->is64BitSystem()) { + return new \RayGlobalScoped\Ramsey\Uuid\Converter\Time\PhpTimeConverter($calculator, $genericConverter); + } + return $genericConverter; + } + /** + * Returns a UUID builder configured for this environment + * + * @param bool $useGuids Whether to build UUIDs using the GuidStringCodec + */ + private function buildUuidBuilder(bool $useGuids = \false) : \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface + { + if ($useGuids) { + return new \RayGlobalScoped\Ramsey\Uuid\Guid\GuidBuilder($this->numberConverter, $this->timeConverter); + } + /** @psalm-suppress ImpureArgument */ + return new \RayGlobalScoped\Ramsey\Uuid\Builder\FallbackBuilder(new \RayGlobalScoped\Ramsey\Uuid\Builder\BuilderCollection([new \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidBuilder($this->numberConverter, $this->timeConverter), new \RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidBuilder($this->numberConverter, $this->timeConverter)])); + } + /** + * Returns true if the PHP build is 64-bit + */ + private function is64BitSystem() : bool + { + return \PHP_INT_SIZE === 8 && !$this->disable64Bit; + } +} diff --git a/build/vendor/ramsey/uuid/src/Fields/FieldsInterface.php b/build/vendor/ramsey/uuid/src/Fields/FieldsInterface.php new file mode 100644 index 0000000..4365f38 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Fields/FieldsInterface.php @@ -0,0 +1,29 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Fields; + +use Serializable; +/** + * UUIDs are comprised of unsigned integers, the bytes of which are separated + * into fields and arranged in a particular layout defined by the specification + * for the variant + * + * @psalm-immutable + */ +interface FieldsInterface extends \Serializable +{ + /** + * Returns the bytes that comprise the fields + */ + public function getBytes() : string; +} diff --git a/build/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php b/build/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php new file mode 100644 index 0000000..e9ab654 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php @@ -0,0 +1,54 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Fields; + +use function base64_decode; +use function strlen; +/** + * Provides common serialization functionality to fields + * + * @psalm-immutable + */ +trait SerializableFieldsTrait +{ + /** + * @param string $bytes The bytes that comprise the fields + */ + public abstract function __construct(string $bytes); + /** + * Returns the bytes that comprise the fields + */ + public abstract function getBytes() : string; + /** + * Returns a string representation of object + */ + public function serialize() : string + { + return $this->getBytes(); + } + /** + * Constructs the object from a serialized string representation + * + * @param string $serialized The serialized string representation of the object + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + */ + public function unserialize($serialized) : void + { + if (\strlen($serialized) === 16) { + $this->__construct($serialized); + } else { + $this->__construct(\base64_decode($serialized)); + } + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/CombGenerator.php b/build/vendor/ramsey/uuid/src/Generator/CombGenerator.php new file mode 100644 index 0000000..b3e86e4 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/CombGenerator.php @@ -0,0 +1,97 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use function bin2hex; +use function explode; +use function hex2bin; +use function microtime; +use function str_pad; +use function substr; +use const STR_PAD_LEFT; +/** + * CombGenerator generates COMBs (combined UUID/timestamp) + * + * The CombGenerator, when used with the StringCodec (and, by proxy, the + * TimestampLastCombCodec) or the TimestampFirstCombCodec, combines the current + * timestamp with a UUID (hence the name "COMB"). The timestamp either appears + * as the first or last 48 bits of the COMB, depending on the codec used. + * + * By default, COMBs will have the timestamp set as the last 48 bits of the + * identifier. + * + * ``` php + * $factory = new UuidFactory(); + * + * $factory->setRandomGenerator(new CombGenerator( + * $factory->getRandomGenerator(), + * $factory->getNumberConverter() + * )); + * + * $comb = $factory->uuid4(); + * ``` + * + * To generate a COMB with the timestamp as the first 48 bits, set the + * TimestampFirstCombCodec as the codec. + * + * ``` php + * $factory->setCodec(new TimestampFirstCombCodec($factory->getUuidBuilder())); + * ``` + * + * @link https://www.informit.com/articles/printerfriendly/25862 The Cost of GUIDs as Primary Keys + */ +class CombGenerator implements \RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface +{ + public const TIMESTAMP_BYTES = 6; + /** + * @var RandomGeneratorInterface + */ + private $randomGenerator; + /** + * @var NumberConverterInterface + */ + private $converter; + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface $generator, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter) + { + $this->converter = $numberConverter; + $this->randomGenerator = $generator; + } + /** + * @throws InvalidArgumentException if $length is not a positive integer + * greater than or equal to CombGenerator::TIMESTAMP_BYTES + * + * @inheritDoc + */ + public function generate(int $length) : string + { + if ($length < self::TIMESTAMP_BYTES || $length < 0) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Length must be a positive integer greater than or equal to ' . self::TIMESTAMP_BYTES); + } + $hash = ''; + if (self::TIMESTAMP_BYTES > 0 && $length > self::TIMESTAMP_BYTES) { + $hash = $this->randomGenerator->generate($length - self::TIMESTAMP_BYTES); + } + $lsbTime = \str_pad($this->converter->toHex($this->timestamp()), self::TIMESTAMP_BYTES * 2, '0', \STR_PAD_LEFT); + return (string) \hex2bin(\str_pad(\bin2hex((string) $hash), $length - self::TIMESTAMP_BYTES, '0') . $lsbTime); + } + /** + * Returns current timestamp a string integer, precise to 0.00001 seconds + */ + private function timestamp() : string + { + $time = \explode(' ', \microtime(\false)); + return $time[1] . \substr($time[0], 2, 5); + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php b/build/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php new file mode 100644 index 0000000..86d6bb5 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php @@ -0,0 +1,114 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\DceSecurityException; +use RayGlobalScoped\Ramsey\Uuid\Provider\DceSecurityProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use function hex2bin; +use function in_array; +use function pack; +use function str_pad; +use function strlen; +use function substr_replace; +use const STR_PAD_LEFT; +/** + * DceSecurityGenerator generates strings of binary data based on a local + * domain, local identifier, node ID, clock sequence, and the current time + */ +class DceSecurityGenerator implements \RayGlobalScoped\Ramsey\Uuid\Generator\DceSecurityGeneratorInterface +{ + private const DOMAINS = [\RayGlobalScoped\Ramsey\Uuid\Uuid::DCE_DOMAIN_PERSON, \RayGlobalScoped\Ramsey\Uuid\Uuid::DCE_DOMAIN_GROUP, \RayGlobalScoped\Ramsey\Uuid\Uuid::DCE_DOMAIN_ORG]; + /** + * Upper bounds for the clock sequence in DCE Security UUIDs. + */ + private const CLOCK_SEQ_HIGH = 63; + /** + * Lower bounds for the clock sequence in DCE Security UUIDs. + */ + private const CLOCK_SEQ_LOW = 0; + /** + * @var NumberConverterInterface + */ + private $numberConverter; + /** + * @var TimeGeneratorInterface + */ + private $timeGenerator; + /** + * @var DceSecurityProviderInterface + */ + private $dceSecurityProvider; + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface $timeGenerator, \RayGlobalScoped\Ramsey\Uuid\Provider\DceSecurityProviderInterface $dceSecurityProvider) + { + $this->numberConverter = $numberConverter; + $this->timeGenerator = $timeGenerator; + $this->dceSecurityProvider = $dceSecurityProvider; + } + public function generate(int $localDomain, ?\RayGlobalScoped\Ramsey\Uuid\Type\Integer $localIdentifier = null, ?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : string + { + if (!\in_array($localDomain, self::DOMAINS)) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DceSecurityException('Local domain must be a valid DCE Security domain'); + } + if ($localIdentifier && $localIdentifier->isNegative()) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DceSecurityException('Local identifier out of bounds; it must be a value between 0 and 4294967295'); + } + if ($clockSeq > self::CLOCK_SEQ_HIGH || $clockSeq < self::CLOCK_SEQ_LOW) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DceSecurityException('Clock sequence out of bounds; it must be a value between 0 and 63'); + } + switch ($localDomain) { + case \RayGlobalScoped\Ramsey\Uuid\Uuid::DCE_DOMAIN_ORG: + if ($localIdentifier === null) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DceSecurityException('A local identifier must be provided for the org domain'); + } + break; + case \RayGlobalScoped\Ramsey\Uuid\Uuid::DCE_DOMAIN_PERSON: + if ($localIdentifier === null) { + $localIdentifier = $this->dceSecurityProvider->getUid(); + } + break; + case \RayGlobalScoped\Ramsey\Uuid\Uuid::DCE_DOMAIN_GROUP: + default: + if ($localIdentifier === null) { + $localIdentifier = $this->dceSecurityProvider->getGid(); + } + break; + } + $identifierHex = $this->numberConverter->toHex($localIdentifier->toString()); + // The maximum value for the local identifier is 0xffffffff, or + // 4294967295. This is 8 hexadecimal digits, so if the length of + // hexadecimal digits is greater than 8, we know the value is greater + // than 0xffffffff. + if (\strlen($identifierHex) > 8) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DceSecurityException('Local identifier out of bounds; it must be a value between 0 and 4294967295'); + } + $domainByte = \pack('n', $localDomain)[1]; + $identifierBytes = \hex2bin(\str_pad($identifierHex, 8, '0', \STR_PAD_LEFT)); + if ($node instanceof \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal) { + $node = $node->toString(); + } + // Shift the clock sequence 8 bits to the left, so it matches 0x3f00. + if ($clockSeq !== null) { + $clockSeq = $clockSeq << 8; + } + /** @var string $bytes */ + $bytes = $this->timeGenerator->generate($node, $clockSeq); + // Replace bytes in the time-based UUID with DCE Security values. + $bytes = \substr_replace($bytes, $identifierBytes, 0, 4); + $bytes = \substr_replace($bytes, $domainByte, 9, 1); + return $bytes; + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php b/build/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php new file mode 100644 index 0000000..16fd419 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php @@ -0,0 +1,45 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV2; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +/** + * A DCE Security generator generates strings of binary data based on a local + * domain, local identifier, node ID, clock sequence, and the current time + * + * @see UuidV2 + */ +interface DceSecurityGeneratorInterface +{ + /** + * Generate a binary string from a local domain, local identifier, node ID, + * clock sequence, and current time + * + * @param int $localDomain The local domain to use when generating bytes, + * according to DCE Security + * @param IntegerObject|null $localIdentifier The local identifier for the + * given domain; this may be a UID or GID on POSIX systems, if the local + * domain is person or group, or it may be a site-defined identifier + * if the local domain is org + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return string A binary string + */ + public function generate(int $localDomain, ?\RayGlobalScoped\Ramsey\Uuid\Type\Integer $localIdentifier = null, ?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : string; +} diff --git a/build/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php b/build/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php new file mode 100644 index 0000000..5cd46b6 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php @@ -0,0 +1,34 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\Exception\NameException; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use function hash; +/** + * DefaultNameGenerator generates strings of binary data based on a namespace, + * name, and hashing algorithm + */ +class DefaultNameGenerator implements \RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorInterface +{ + /** @psalm-pure */ + public function generate(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $ns, string $name, string $hashAlgorithm) : string + { + /** @var string|bool $bytes */ + $bytes = @\hash($hashAlgorithm, $ns->getBytes() . $name, \true); + if ($bytes === \false) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\NameException(\sprintf('Unable to hash namespace and name with algorithm \'%s\'', $hashAlgorithm)); + } + return (string) $bytes; + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php b/build/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php new file mode 100644 index 0000000..c9299fc --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php @@ -0,0 +1,109 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Exception\RandomSourceException; +use RayGlobalScoped\Ramsey\Uuid\Exception\TimeSourceException; +use RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use Throwable; +use function ctype_xdigit; +use function dechex; +use function hex2bin; +use function is_int; +use function pack; +use function sprintf; +use function str_pad; +use function strlen; +use const STR_PAD_LEFT; +/** + * DefaultTimeGenerator generates strings of binary data based on a node ID, + * clock sequence, and the current time + */ +class DefaultTimeGenerator implements \RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface +{ + /** + * @var NodeProviderInterface + */ + private $nodeProvider; + /** + * @var TimeConverterInterface + */ + private $timeConverter; + /** + * @var TimeProviderInterface + */ + private $timeProvider; + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface $nodeProvider, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter, \RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface $timeProvider) + { + $this->nodeProvider = $nodeProvider; + $this->timeConverter = $timeConverter; + $this->timeProvider = $timeProvider; + } + /** + * @throws InvalidArgumentException if the parameters contain invalid values + * @throws RandomSourceException if random_int() throws an exception/error + * + * @inheritDoc + */ + public function generate($node = null, ?int $clockSeq = null) : string + { + if ($node instanceof \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal) { + $node = $node->toString(); + } + $node = $this->getValidNode($node); + if ($clockSeq === null) { + try { + // This does not use "stable storage"; see RFC 4122, Section 4.2.1.1. + $clockSeq = \random_int(0, 0x3fff); + } catch (\Throwable $exception) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\RandomSourceException($exception->getMessage(), (int) $exception->getCode(), $exception); + } + } + $time = $this->timeProvider->getTime(); + $uuidTime = $this->timeConverter->calculateTime($time->getSeconds()->toString(), $time->getMicroseconds()->toString()); + $timeHex = \str_pad($uuidTime->toString(), 16, '0', \STR_PAD_LEFT); + if (\strlen($timeHex) !== 16) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\TimeSourceException(\sprintf('The generated time of \'%s\' is larger than expected', $timeHex)); + } + $timeBytes = (string) \hex2bin($timeHex); + return $timeBytes[4] . $timeBytes[5] . $timeBytes[6] . $timeBytes[7] . $timeBytes[2] . $timeBytes[3] . $timeBytes[0] . $timeBytes[1] . \pack('n*', $clockSeq) . $node; + } + /** + * Uses the node provider given when constructing this instance to get + * the node ID (usually a MAC address) + * + * @param string|int|null $node A node value that may be used to override the node provider + * + * @return string 6-byte binary string representation of the node + * + * @throws InvalidArgumentException + */ + private function getValidNode($node) : string + { + if ($node === null) { + $node = $this->nodeProvider->getNode(); + } + // Convert the node to hex, if it is still an integer. + if (\is_int($node)) { + $node = \dechex($node); + } + if (!\ctype_xdigit((string) $node) || \strlen((string) $node) > 12) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Invalid node value'); + } + return (string) \hex2bin(\str_pad((string) $node, 12, '0', \STR_PAD_LEFT)); + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php b/build/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php new file mode 100644 index 0000000..41838d1 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php @@ -0,0 +1,28 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +/** + * NameGeneratorFactory retrieves a default name generator, based on the + * environment + */ +class NameGeneratorFactory +{ + /** + * Returns a default name generator, based on the current environment + */ + public function getGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorInterface + { + return new \RayGlobalScoped\Ramsey\Uuid\Generator\DefaultNameGenerator(); + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php b/build/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php new file mode 100644 index 0000000..8e5ca1f --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php @@ -0,0 +1,35 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +/** + * A name generator generates strings of binary data created by hashing together + * a namespace with a name, according to a hashing algorithm + */ +interface NameGeneratorInterface +{ + /** + * Generate a binary string from a namespace and name hashed together with + * the specified hashing algorithm + * + * @param UuidInterface $ns The namespace + * @param string $name The name to use for creating a UUID + * @param string $hashAlgorithm The hashing algorithm to use + * + * @return string A binary string + * + * @psalm-pure + */ + public function generate(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $ns, string $name, string $hashAlgorithm) : string; +} diff --git a/build/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php b/build/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php new file mode 100644 index 0000000..3e9da14 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php @@ -0,0 +1,44 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\Exception\NameException; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use function sprintf; +use function uuid_generate_md5; +use function uuid_generate_sha1; +use function uuid_parse; +/** + * PeclUuidNameGenerator generates strings of binary data from a namespace and a + * name, using ext-uuid + * + * @link https://pecl.php.net/package/uuid ext-uuid + */ +class PeclUuidNameGenerator implements \RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorInterface +{ + /** @psalm-pure */ + public function generate(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $ns, string $name, string $hashAlgorithm) : string + { + switch ($hashAlgorithm) { + case 'md5': + $uuid = (string) \uuid_generate_md5($ns->toString(), $name); + break; + case 'sha1': + $uuid = (string) \uuid_generate_sha1($ns->toString(), $name); + break; + default: + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\NameException(\sprintf('Unable to hash namespace and name with algorithm \'%s\'', $hashAlgorithm)); + } + return (string) \uuid_parse($uuid); + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php b/build/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php new file mode 100644 index 0000000..f2e825c --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php @@ -0,0 +1,28 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use const UUID_TYPE_RANDOM; +/** + * PeclUuidRandomGenerator generates strings of random binary data using ext-uuid + * + * @link https://pecl.php.net/package/uuid ext-uuid + */ +class PeclUuidRandomGenerator implements \RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface +{ + public function generate(int $length) : string + { + $uuid = \uuid_create(\UUID_TYPE_RANDOM); + return \uuid_parse($uuid); + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php b/build/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php new file mode 100644 index 0000000..627da51 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php @@ -0,0 +1,32 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use const UUID_TYPE_TIME; +/** + * PeclUuidTimeGenerator generates strings of binary data for time-base UUIDs, + * using ext-uuid + * + * @link https://pecl.php.net/package/uuid ext-uuid + */ +class PeclUuidTimeGenerator implements \RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface +{ + /** + * @inheritDoc + */ + public function generate($node = null, ?int $clockSeq = null) : string + { + $uuid = \uuid_create(\UUID_TYPE_TIME); + return \uuid_parse($uuid); + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php b/build/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php new file mode 100644 index 0000000..1060ab7 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php @@ -0,0 +1,37 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\Exception\RandomSourceException; +/** + * RandomBytesGenerator generates strings of random binary data using the + * built-in `random_bytes()` PHP function + * + * @link http://php.net/random_bytes random_bytes() + */ +class RandomBytesGenerator implements \RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface +{ + /** + * @throws RandomSourceException if random_bytes() throws an exception/error + * + * @inheritDoc + */ + public function generate(int $length) : string + { + try { + return \random_bytes($length); + } catch (\Throwable $exception) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\RandomSourceException($exception->getMessage(), (int) $exception->getCode(), $exception); + } + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php b/build/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php new file mode 100644 index 0000000..281867a --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php @@ -0,0 +1,28 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +/** + * RandomGeneratorFactory retrieves a default random generator, based on the + * environment + */ +class RandomGeneratorFactory +{ + /** + * Returns a default random generator, based on the current environment + */ + public function getGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface + { + return new \RayGlobalScoped\Ramsey\Uuid\Generator\RandomBytesGenerator(); + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php b/build/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php new file mode 100644 index 0000000..0cb6c1d --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php @@ -0,0 +1,28 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +/** + * A random generator generates strings of random binary data + */ +interface RandomGeneratorInterface +{ + /** + * Generates a string of randomized binary data + * + * @param int $length The number of bytes of random binary data to generate + * + * @return string A binary string + */ + public function generate(int $length) : string; +} diff --git a/build/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php b/build/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php new file mode 100644 index 0000000..f57ce4a --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php @@ -0,0 +1,49 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\RandomLib\Factory; +use RayGlobalScoped\RandomLib\Generator; +/** + * RandomLibAdapter generates strings of random binary data using the + * paragonie/random-lib library + * + * @link https://packagist.org/packages/paragonie/random-lib paragonie/random-lib + */ +class RandomLibAdapter implements \RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface +{ + /** + * @var Generator + */ + private $generator; + /** + * Constructs a RandomLibAdapter + * + * By default, if no Generator is passed in, this creates a high-strength + * generator to use when generating random binary data. + * + * @param Generator|null $generator The generator to use when generating binary data + */ + public function __construct(?\RayGlobalScoped\RandomLib\Generator $generator = null) + { + if ($generator === null) { + $factory = new \RayGlobalScoped\RandomLib\Factory(); + $generator = $factory->getHighStrengthGenerator(); + } + $this->generator = $generator; + } + public function generate(int $length) : string + { + return $this->generator->generate($length); + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php b/build/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php new file mode 100644 index 0000000..1f1bfd4 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php @@ -0,0 +1,49 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface; +/** + * TimeGeneratorFactory retrieves a default time generator, based on the + * environment + */ +class TimeGeneratorFactory +{ + /** + * @var NodeProviderInterface + */ + private $nodeProvider; + /** + * @var TimeConverterInterface + */ + private $timeConverter; + /** + * @var TimeProviderInterface + */ + private $timeProvider; + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface $nodeProvider, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter, \RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface $timeProvider) + { + $this->nodeProvider = $nodeProvider; + $this->timeConverter = $timeConverter; + $this->timeProvider = $timeProvider; + } + /** + * Returns a default time generator, based on the current environment + */ + public function getGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface + { + return new \RayGlobalScoped\Ramsey\Uuid\Generator\DefaultTimeGenerator($this->nodeProvider, $this->timeConverter, $this->timeProvider); + } +} diff --git a/build/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php b/build/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php new file mode 100644 index 0000000..f2bdc9b --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php @@ -0,0 +1,35 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Generator; + +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +/** + * A time generator generates strings of binary data based on a node ID, + * clock sequence, and the current time + */ +interface TimeGeneratorInterface +{ + /** + * Generate a binary string from a node ID, clock sequence, and current time + * + * @param Hexadecimal|int|string|null $node A 48-bit number representing the + * hardware address; this number may be represented as an integer or a + * hexadecimal string + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return string A binary string + */ + public function generate($node = null, ?int $clockSeq = null) : string; +} diff --git a/build/vendor/ramsey/uuid/src/Guid/Fields.php b/build/vendor/ramsey/uuid/src/Guid/Fields.php new file mode 100644 index 0000000..f66687e --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Guid/Fields.php @@ -0,0 +1,129 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Guid; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Fields\SerializableFieldsTrait; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\NilTrait; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\VariantTrait; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\VersionTrait; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use function bin2hex; +use function dechex; +use function hexdec; +use function pack; +use function sprintf; +use function str_pad; +use function strlen; +use function substr; +use function unpack; +use const STR_PAD_LEFT; +/** + * GUIDs are comprised of a set of named fields, according to RFC 4122 + * + * @see Guid + * + * @psalm-immutable + */ +final class Fields implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface +{ + use NilTrait; + use SerializableFieldsTrait; + use VariantTrait; + use VersionTrait; + /** + * @var string + */ + private $bytes; + /** + * @param string $bytes A 16-byte binary string representation of a UUID + * + * @throws InvalidArgumentException if the byte string is not exactly 16 bytes + * @throws InvalidArgumentException if the byte string does not represent a GUID + * @throws InvalidArgumentException if the byte string does not contain a valid version + */ + public function __construct(string $bytes) + { + if (\strlen($bytes) !== 16) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('The byte string must be 16 bytes long; ' . 'received ' . \strlen($bytes) . ' bytes'); + } + $this->bytes = $bytes; + if (!$this->isCorrectVariant()) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('The byte string received does not conform to the RFC ' . '4122 or Microsoft Corporation variants'); + } + if (!$this->isCorrectVersion()) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('The byte string received does not contain a valid version'); + } + } + public function getBytes() : string + { + return $this->bytes; + } + public function getTimeLow() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + // Swap the bytes from little endian to network byte order. + $hex = \unpack('H*', \pack('v*', \hexdec(\bin2hex(\substr($this->bytes, 2, 2))), \hexdec(\bin2hex(\substr($this->bytes, 0, 2))))); + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal((string) ($hex[1] ?? '')); + } + public function getTimeMid() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + // Swap the bytes from little endian to network byte order. + $hex = \unpack('H*', \pack('v', \hexdec(\bin2hex(\substr($this->bytes, 4, 2))))); + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal((string) ($hex[1] ?? '')); + } + public function getTimeHiAndVersion() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + // Swap the bytes from little endian to network byte order. + $hex = \unpack('H*', \pack('v', \hexdec(\bin2hex(\substr($this->bytes, 6, 2))))); + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal((string) ($hex[1] ?? '')); + } + public function getTimestamp() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\sprintf('%03x%04s%08s', \hexdec($this->getTimeHiAndVersion()->toString()) & 0xfff, $this->getTimeMid()->toString(), $this->getTimeLow()->toString())); + } + public function getClockSeq() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + $clockSeq = \hexdec(\bin2hex(\substr($this->bytes, 8, 2))) & 0x3fff; + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\str_pad(\dechex($clockSeq), 4, '0', \STR_PAD_LEFT)); + } + public function getClockSeqHiAndReserved() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 8, 1))); + } + public function getClockSeqLow() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 9, 1))); + } + public function getNode() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 10))); + } + public function getVersion() : ?int + { + if ($this->isNil()) { + return null; + } + $parts = \unpack('n*', $this->bytes); + return (int) $parts[4] >> 4 & 0xf; + } + private function isCorrectVariant() : bool + { + if ($this->isNil()) { + return \true; + } + $variant = $this->getVariant(); + return $variant === \RayGlobalScoped\Ramsey\Uuid\Uuid::RFC_4122 || $variant === \RayGlobalScoped\Ramsey\Uuid\Uuid::RESERVED_MICROSOFT; + } +} diff --git a/build/vendor/ramsey/uuid/src/Guid/Guid.php b/build/vendor/ramsey/uuid/src/Guid/Guid.php new file mode 100644 index 0000000..fba6513 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Guid/Guid.php @@ -0,0 +1,55 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Guid; + +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +/** + * Guid represents a UUID with "native" (little-endian) byte order + * + * From Wikipedia: + * + * > The first three fields are unsigned 32- and 16-bit integers and are subject + * > to swapping, while the last two fields consist of uninterpreted bytes, not + * > subject to swapping. This byte swapping applies even for versions 3, 4, and + * > 5, where the canonical fields do not correspond to the content of the UUID. + * + * The first three fields of a GUID are encoded in little-endian byte order, + * while the last three fields are in network (big-endian) byte order. This is + * according to the history of the Microsoft definition of a GUID. + * + * According to the .NET Guid.ToByteArray method documentation: + * + * > Note that the order of bytes in the returned byte array is different from + * > the string representation of a Guid value. The order of the beginning + * > four-byte group and the next two two-byte groups is reversed, whereas the + * > order of the last two-byte group and the closing six-byte group is the + * > same. + * + * @link https://en.wikipedia.org/wiki/Universally_unique_identifier#Variants UUID Variants on Wikipedia + * @link https://docs.microsoft.com/en-us/windows/win32/api/guiddef/ns-guiddef-guid Windows GUID structure + * @link https://docs.microsoft.com/en-us/dotnet/api/system.guid .NET Guid Struct + * @link https://docs.microsoft.com/en-us/dotnet/api/system.guid.tobytearray .NET Guid.ToByteArray Method + * + * @psalm-immutable + */ +final class Guid extends \RayGlobalScoped\Ramsey\Uuid\Uuid implements \RayGlobalScoped\Ramsey\Uuid\UuidInterface +{ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Guid\Fields $fields, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/build/vendor/ramsey/uuid/src/Guid/GuidBuilder.php b/build/vendor/ramsey/uuid/src/Guid/GuidBuilder.php new file mode 100644 index 0000000..0c57e27 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Guid/GuidBuilder.php @@ -0,0 +1,75 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Guid; + +use RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\UnableToBuildUuidException; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use Throwable; +/** + * GuidBuilder builds instances of Guid + * + * @see Guid + * + * @psalm-immutable + */ +class GuidBuilder implements \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface +{ + /** + * @var NumberConverterInterface + */ + private $numberConverter; + /** + * @var TimeConverterInterface + */ + private $timeConverter; + /** + * @param NumberConverterInterface $numberConverter The number converter to + * use when constructing the Guid + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to Unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + $this->numberConverter = $numberConverter; + $this->timeConverter = $timeConverter; + } + /** + * Builds and returns a Guid + * + * @param CodecInterface $codec The codec to use for building this Guid instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return Guid The GuidBuilder returns an instance of Ramsey\Uuid\Guid\Guid + * + * @psalm-pure + */ + public function build(\RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + try { + return new \RayGlobalScoped\Ramsey\Uuid\Guid\Guid($this->buildFields($bytes), $this->numberConverter, $codec, $this->timeConverter); + } catch (\Throwable $e) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnableToBuildUuidException($e->getMessage(), (int) $e->getCode(), $e); + } + } + /** + * Proxy method to allow injecting a mock, for testing + */ + protected function buildFields(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\Guid\Fields + { + return new \RayGlobalScoped\Ramsey\Uuid\Guid\Fields($bytes); + } +} diff --git a/build/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php b/build/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php new file mode 100644 index 0000000..a84b687 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php @@ -0,0 +1,413 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Lazy; + +use DateTimeInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException; +use RayGlobalScoped\Ramsey\Uuid\Fields\FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidV6; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV1; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\UuidFactory; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use function assert; +use function bin2hex; +use function hex2bin; +use function str_replace; +use function substr; +/** + * Lazy version of a UUID: its format has not been determined yet, so it is mostly only usable for string/bytes + * conversion. This object optimizes instantiation, serialization and string conversion time, at the cost of + * increased overhead for more advanced UUID operations. + * + * @internal this type is used internally for performance reasons, and is not supposed to be directly referenced + * in consumer libraries. + * + * @psalm-immutable + * + * Note: the {@see FieldsInterface} does not declare methods that deprecated API + * relies upon: the API has been ported from the {@see \Ramsey\Uuid\Uuid} definition, + * and is deprecated anyway. + * Note: the deprecated API from {@see \Ramsey\Uuid\Uuid} is in use here (on purpose): it will be removed + * once the deprecated API is gone from this class too. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + */ +final class LazyUuidFromString implements \RayGlobalScoped\Ramsey\Uuid\UuidInterface +{ + public const VALID_REGEX = '/\\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\z/ms'; + /** + * @var string + * @psalm-var non-empty-string + */ + private $uuid; + /** @var UuidInterface|null */ + private $unwrapped; + /** @psalm-param non-empty-string $uuid */ + public function __construct(string $uuid) + { + $this->uuid = $uuid; + } + /** @psalm-pure */ + public static function fromBytes(string $bytes) : self + { + $base16Uuid = \bin2hex($bytes); + return new self(\substr($base16Uuid, 0, 8) . '-' . \substr($base16Uuid, 8, 4) . '-' . \substr($base16Uuid, 12, 4) . '-' . \substr($base16Uuid, 16, 4) . '-' . \substr($base16Uuid, 20, 12)); + } + public function serialize() : string + { + return $this->uuid; + } + /** + * {@inheritDoc} + * + * @param string $serialized + * + * @psalm-param non-empty-string $serialized + */ + public function unserialize($serialized) : void + { + $this->uuid = $serialized; + } + /** @psalm-suppress DeprecatedMethod */ + public function getNumberConverter() : \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface + { + return ($this->unwrapped ?? $this->unwrap())->getNumberConverter(); + } + /** + * {@inheritDoc} + * + * @psalm-suppress DeprecatedMethod + */ + public function getFieldsHex() : array + { + return ($this->unwrapped ?? $this->unwrap())->getFieldsHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getClockSeqHiAndReservedHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getClockSeqHiAndReservedHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getClockSeqLowHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getClockSeqLowHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getClockSequenceHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getClockSequenceHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getDateTime() : \DateTimeInterface + { + return ($this->unwrapped ?? $this->unwrap())->getDateTime(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getLeastSignificantBitsHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getLeastSignificantBitsHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getMostSignificantBitsHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getMostSignificantBitsHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getNodeHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getNodeHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getTimeHiAndVersionHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getTimeHiAndVersionHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getTimeLowHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getTimeLowHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getTimeMidHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getTimeMidHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getTimestampHex() : string + { + return ($this->unwrapped ?? $this->unwrap())->getTimestampHex(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getUrn() : string + { + return ($this->unwrapped ?? $this->unwrap())->getUrn(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getVariant() : ?int + { + return ($this->unwrapped ?? $this->unwrap())->getVariant(); + } + /** @psalm-suppress DeprecatedMethod */ + public function getVersion() : ?int + { + return ($this->unwrapped ?? $this->unwrap())->getVersion(); + } + public function compareTo(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $other) : int + { + return ($this->unwrapped ?? $this->unwrap())->compareTo($other); + } + public function equals(?object $other) : bool + { + if (!$other instanceof \RayGlobalScoped\Ramsey\Uuid\UuidInterface) { + return \false; + } + return $this->uuid === $other->toString(); + } + /** + * {@inheritDoc} + * + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement we know that {@see self::$uuid} is a non-empty string, so + * we know that {@see hex2bin} will retrieve a non-empty string too. + */ + public function getBytes() : string + { + return (string) \hex2bin(\str_replace('-', '', $this->uuid)); + } + public function getFields() : \RayGlobalScoped\Ramsey\Uuid\Fields\FieldsInterface + { + return ($this->unwrapped ?? $this->unwrap())->getFields(); + } + public function getHex() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return ($this->unwrapped ?? $this->unwrap())->getHex(); + } + public function getInteger() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer + { + return ($this->unwrapped ?? $this->unwrap())->getInteger(); + } + public function toString() : string + { + return $this->uuid; + } + public function __toString() : string + { + return $this->uuid; + } + public function jsonSerialize() : string + { + return $this->uuid; + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqHiAndReserved()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getClockSeqHiAndReserved() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + return $instance->getNumberConverter()->fromHex($instance->getFields()->getClockSeqHiAndReserved()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqLow()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getClockSeqLow() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + return $instance->getNumberConverter()->fromHex($instance->getFields()->getClockSeqLow()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeq()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getClockSequence() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + return $instance->getNumberConverter()->fromHex($instance->getFields()->getClockSeq()->toString()); + } + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getLeastSignificantBits() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + return $instance->getNumberConverter()->fromHex(\substr($instance->getHex()->toString(), 16)); + } + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getMostSignificantBits() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + return $instance->getNumberConverter()->fromHex(\substr($instance->getHex()->toString(), 0, 16)); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getNode()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getNode() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + return $instance->getNumberConverter()->fromHex($instance->getFields()->getNode()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeHiAndVersion()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getTimeHiAndVersion() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + return $instance->getNumberConverter()->fromHex($instance->getFields()->getTimeHiAndVersion()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeLow()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getTimeLow() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + return $instance->getNumberConverter()->fromHex($instance->getFields()->getTimeLow()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeMid()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getTimeMid() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + return $instance->getNumberConverter()->fromHex($instance->getFields()->getTimeMid()->toString()); + } + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimestamp()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getTimestamp() : string + { + $instance = $this->unwrapped ?? $this->unwrap(); + $fields = $instance->getFields(); + if ($fields->getVersion() !== 1) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException('Not a time-based UUID'); + } + return $instance->getNumberConverter()->fromHex($fields->getTimestamp()->toString()); + } + public function toUuidV1() : \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV1 + { + $instance = $this->unwrapped ?? $this->unwrap(); + if ($instance instanceof \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV1) { + return $instance; + } + \assert($instance instanceof \RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidV6); + return $instance->toUuidV1(); + } + public function toUuidV6() : \RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidV6 + { + $instance = $this->unwrapped ?? $this->unwrap(); + \assert($instance instanceof \RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidV6); + return $instance; + } + /** + * @psalm-suppress ImpureMethodCall the retrieval of the factory is a clear violation of purity here: this is a + * known pitfall of the design of this library, where a value object contains + * a mutable reference to a factory. We use a fixed factory here, so the violation + * will not have real-world effects, as this object is only instantiated with the + * default factory settings/features. + * @psalm-suppress InaccessibleProperty property {@see $unwrapped} is used as a cache: we don't expose it to the + * outside world, so we should be fine here. + */ + private function unwrap() : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return $this->unwrapped = (new \RayGlobalScoped\Ramsey\Uuid\UuidFactory())->fromString($this->uuid); + } +} diff --git a/build/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php b/build/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php new file mode 100644 index 0000000..b8016eb --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php @@ -0,0 +1,99 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Math; + +use RayGlobalScoped\Brick\Math\BigDecimal; +use RayGlobalScoped\Brick\Math\BigInteger; +use RayGlobalScoped\Brick\Math\Exception\MathException; +use RayGlobalScoped\Brick\Math\RoundingMode as BrickMathRounding; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Type\Decimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface; +/** + * A calculator using the brick/math library for arbitrary-precision arithmetic + * + * @psalm-immutable + */ +final class BrickMathCalculator implements \RayGlobalScoped\Ramsey\Uuid\Math\CalculatorInterface +{ + private const ROUNDING_MODE_MAP = [\RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::UNNECESSARY => \RayGlobalScoped\Brick\Math\RoundingMode::UNNECESSARY, \RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::UP => \RayGlobalScoped\Brick\Math\RoundingMode::UP, \RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::DOWN => \RayGlobalScoped\Brick\Math\RoundingMode::DOWN, \RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::CEILING => \RayGlobalScoped\Brick\Math\RoundingMode::CEILING, \RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::FLOOR => \RayGlobalScoped\Brick\Math\RoundingMode::FLOOR, \RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::HALF_UP => \RayGlobalScoped\Brick\Math\RoundingMode::HALF_UP, \RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::HALF_DOWN => \RayGlobalScoped\Brick\Math\RoundingMode::HALF_DOWN, \RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::HALF_CEILING => \RayGlobalScoped\Brick\Math\RoundingMode::HALF_CEILING, \RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::HALF_FLOOR => \RayGlobalScoped\Brick\Math\RoundingMode::HALF_FLOOR, \RayGlobalScoped\Ramsey\Uuid\Math\RoundingMode::HALF_EVEN => \RayGlobalScoped\Brick\Math\RoundingMode::HALF_EVEN]; + public function add(\RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface $augend, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface ...$addends) : \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface + { + $sum = \RayGlobalScoped\Brick\Math\BigInteger::of($augend->toString()); + foreach ($addends as $addend) { + $sum = $sum->plus($addend->toString()); + } + return new \RayGlobalScoped\Ramsey\Uuid\Type\Integer((string) $sum); + } + public function subtract(\RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface $minuend, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface ...$subtrahends) : \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface + { + $difference = \RayGlobalScoped\Brick\Math\BigInteger::of($minuend->toString()); + foreach ($subtrahends as $subtrahend) { + $difference = $difference->minus($subtrahend->toString()); + } + return new \RayGlobalScoped\Ramsey\Uuid\Type\Integer((string) $difference); + } + public function multiply(\RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface $multiplicand, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface ...$multipliers) : \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface + { + $product = \RayGlobalScoped\Brick\Math\BigInteger::of($multiplicand->toString()); + foreach ($multipliers as $multiplier) { + $product = $product->multipliedBy($multiplier->toString()); + } + return new \RayGlobalScoped\Ramsey\Uuid\Type\Integer((string) $product); + } + public function divide(int $roundingMode, int $scale, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface $dividend, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface ...$divisors) : \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface + { + $brickRounding = $this->getBrickRoundingMode($roundingMode); + $quotient = \RayGlobalScoped\Brick\Math\BigDecimal::of($dividend->toString()); + foreach ($divisors as $divisor) { + $quotient = $quotient->dividedBy($divisor->toString(), $scale, $brickRounding); + } + if ($scale === 0) { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Integer((string) $quotient->toBigInteger()); + } + return new \RayGlobalScoped\Ramsey\Uuid\Type\Decimal((string) $quotient); + } + public function fromBase(string $value, int $base) : \RayGlobalScoped\Ramsey\Uuid\Type\Integer + { + try { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Integer((string) \RayGlobalScoped\Brick\Math\BigInteger::fromBase($value, $base)); + } catch (\RayGlobalScoped\Brick\Math\Exception\MathException|\InvalidArgumentException $exception) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException($exception->getMessage(), (int) $exception->getCode(), $exception); + } + } + public function toBase(\RayGlobalScoped\Ramsey\Uuid\Type\Integer $value, int $base) : string + { + try { + return \RayGlobalScoped\Brick\Math\BigInteger::of($value->toString())->toBase($base); + } catch (\RayGlobalScoped\Brick\Math\Exception\MathException|\InvalidArgumentException $exception) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException($exception->getMessage(), (int) $exception->getCode(), $exception); + } + } + public function toHexadecimal(\RayGlobalScoped\Ramsey\Uuid\Type\Integer $value) : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal($this->toBase($value, 16)); + } + public function toInteger(\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $value) : \RayGlobalScoped\Ramsey\Uuid\Type\Integer + { + return $this->fromBase($value->toString(), 16); + } + /** + * Maps ramsey/uuid rounding modes to those used by brick/math + */ + private function getBrickRoundingMode(int $roundingMode) : int + { + return self::ROUNDING_MODE_MAP[$roundingMode] ?? 0; + } +} diff --git a/build/vendor/ramsey/uuid/src/Math/CalculatorInterface.php b/build/vendor/ramsey/uuid/src/Math/CalculatorInterface.php new file mode 100644 index 0000000..f79c39e --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Math/CalculatorInterface.php @@ -0,0 +1,91 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Math; + +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface; +/** + * A calculator performs arithmetic operations on numbers + * + * @psalm-immutable + */ +interface CalculatorInterface +{ + /** + * Returns the sum of all the provided parameters + * + * @param NumberInterface $augend The first addend (the integer being added to) + * @param NumberInterface ...$addends The additional integers to a add to the augend + * + * @return NumberInterface The sum of all the parameters + */ + public function add(\RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface $augend, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface ...$addends) : \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface; + /** + * Returns the difference of all the provided parameters + * + * @param NumberInterface $minuend The integer being subtracted from + * @param NumberInterface ...$subtrahends The integers to subtract from the minuend + * + * @return NumberInterface The difference after subtracting all parameters + */ + public function subtract(\RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface $minuend, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface ...$subtrahends) : \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface; + /** + * Returns the product of all the provided parameters + * + * @param NumberInterface $multiplicand The integer to be multiplied + * @param NumberInterface ...$multipliers The factors by which to multiply the multiplicand + * + * @return NumberInterface The product of multiplying all the provided parameters + */ + public function multiply(\RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface $multiplicand, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface ...$multipliers) : \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface; + /** + * Returns the quotient of the provided parameters divided left-to-right + * + * @param int $roundingMode The RoundingMode constant to use for this operation + * @param int $scale The scale to use for this operation + * @param NumberInterface $dividend The integer to be divided + * @param NumberInterface ...$divisors The integers to divide $dividend by, in + * the order in which the division operations should take place + * (left-to-right) + * + * @return NumberInterface The quotient of dividing the provided parameters left-to-right + */ + public function divide(int $roundingMode, int $scale, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface $dividend, \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface ...$divisors) : \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface; + /** + * Converts a value from an arbitrary base to a base-10 integer value + * + * @param string $value The value to convert + * @param int $base The base to convert from (i.e., 2, 16, 32, etc.) + * + * @return IntegerObject The base-10 integer value of the converted value + */ + public function fromBase(string $value, int $base) : \RayGlobalScoped\Ramsey\Uuid\Type\Integer; + /** + * Converts a base-10 integer value to an arbitrary base + * + * @param IntegerObject $value The integer value to convert + * @param int $base The base to convert to (i.e., 2, 16, 32, etc.) + * + * @return string The value represented in the specified base + */ + public function toBase(\RayGlobalScoped\Ramsey\Uuid\Type\Integer $value, int $base) : string; + /** + * Converts an Integer instance to a Hexadecimal instance + */ + public function toHexadecimal(\RayGlobalScoped\Ramsey\Uuid\Type\Integer $value) : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Converts a Hexadecimal instance to an Integer instance + */ + public function toInteger(\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $value) : \RayGlobalScoped\Ramsey\Uuid\Type\Integer; +} diff --git a/build/vendor/ramsey/uuid/src/Math/RoundingMode.php b/build/vendor/ramsey/uuid/src/Math/RoundingMode.php new file mode 100644 index 0000000..9114495 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Math/RoundingMode.php @@ -0,0 +1,134 @@ += 0.5; otherwise, behaves + * as for DOWN. Note that this is the rounding mode commonly taught at + * school. + */ + public const HALF_UP = 5; + /** + * Rounds towards "nearest neighbor" unless both neighbors are equidistant, + * in which case round down. + * + * Behaves as for UP if the discarded fraction is > 0.5; otherwise, behaves + * as for DOWN. + */ + public const HALF_DOWN = 6; + /** + * Rounds towards "nearest neighbor" unless both neighbors are equidistant, + * in which case round towards positive infinity. + * + * If the result is positive, behaves as for HALF_UP; if negative, behaves + * as for HALF_DOWN. + */ + public const HALF_CEILING = 7; + /** + * Rounds towards "nearest neighbor" unless both neighbors are equidistant, + * in which case round towards negative infinity. + * + * If the result is positive, behaves as for HALF_DOWN; if negative, behaves + * as for HALF_UP. + */ + public const HALF_FLOOR = 8; + /** + * Rounds towards the "nearest neighbor" unless both neighbors are + * equidistant, in which case rounds towards the even neighbor. + * + * Behaves as for HALF_UP if the digit to the left of the discarded fraction + * is odd; behaves as for HALF_DOWN if it's even. + * + * Note that this is the rounding mode that statistically minimizes + * cumulative error when applied repeatedly over a sequence of calculations. + * It is sometimes known as "Banker's rounding", and is chiefly used in the + * USA. + */ + public const HALF_EVEN = 9; +} diff --git a/build/vendor/ramsey/uuid/src/Nonstandard/Fields.php b/build/vendor/ramsey/uuid/src/Nonstandard/Fields.php new file mode 100644 index 0000000..d5a9727 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Nonstandard/Fields.php @@ -0,0 +1,105 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Nonstandard; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Fields\SerializableFieldsTrait; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\VariantTrait; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use function bin2hex; +use function dechex; +use function hexdec; +use function sprintf; +use function str_pad; +use function strlen; +use function substr; +use const STR_PAD_LEFT; +/** + * Nonstandard UUID fields do not conform to the RFC 4122 standard + * + * Since some systems may create nonstandard UUIDs, this implements the + * Rfc4122\FieldsInterface, so that functionality of a nonstandard UUID is not + * degraded, in the event these UUIDs are expected to contain RFC 4122 fields. + * + * Internally, this class represents the fields together as a 16-byte binary + * string. + * + * @psalm-immutable + */ +final class Fields implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface +{ + use SerializableFieldsTrait; + use VariantTrait; + /** + * @var string + */ + private $bytes; + /** + * @param string $bytes A 16-byte binary string representation of a UUID + * + * @throws InvalidArgumentException if the byte string is not exactly 16 bytes + */ + public function __construct(string $bytes) + { + if (\strlen($bytes) !== 16) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('The byte string must be 16 bytes long; ' . 'received ' . \strlen($bytes) . ' bytes'); + } + $this->bytes = $bytes; + } + public function getBytes() : string + { + return $this->bytes; + } + public function getClockSeq() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + $clockSeq = \hexdec(\bin2hex(\substr($this->bytes, 8, 2))) & 0x3fff; + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\str_pad(\dechex($clockSeq), 4, '0', \STR_PAD_LEFT)); + } + public function getClockSeqHiAndReserved() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 8, 1))); + } + public function getClockSeqLow() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 9, 1))); + } + public function getNode() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 10))); + } + public function getTimeHiAndVersion() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 6, 2))); + } + public function getTimeLow() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 0, 4))); + } + public function getTimeMid() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 4, 2))); + } + public function getTimestamp() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\sprintf('%03x%04s%08s', \hexdec($this->getTimeHiAndVersion()->toString()) & 0xfff, $this->getTimeMid()->toString(), $this->getTimeLow()->toString())); + } + public function getVersion() : ?int + { + return null; + } + public function isNil() : bool + { + return \false; + } +} diff --git a/build/vendor/ramsey/uuid/src/Nonstandard/Uuid.php b/build/vendor/ramsey/uuid/src/Nonstandard/Uuid.php new file mode 100644 index 0000000..c039881 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Nonstandard/Uuid.php @@ -0,0 +1,31 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Nonstandard; + +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Uuid as BaseUuid; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +/** + * Nonstandard\Uuid is a UUID that doesn't conform to RFC 4122 + * + * @psalm-immutable + */ +final class Uuid extends \RayGlobalScoped\Ramsey\Uuid\Uuid implements \RayGlobalScoped\Ramsey\Uuid\UuidInterface +{ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Nonstandard\Fields $fields, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/build/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php b/build/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php new file mode 100644 index 0000000..efae568 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php @@ -0,0 +1,74 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Nonstandard; + +use RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\UnableToBuildUuidException; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use Throwable; +/** + * Nonstandard\UuidBuilder builds instances of Nonstandard\Uuid + * + * @psalm-immutable + */ +class UuidBuilder implements \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface +{ + /** + * @var NumberConverterInterface + */ + private $numberConverter; + /** + * @var TimeConverterInterface + */ + private $timeConverter; + /** + * @param NumberConverterInterface $numberConverter The number converter to + * use when constructing the Nonstandard\Uuid + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to Unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + $this->numberConverter = $numberConverter; + $this->timeConverter = $timeConverter; + } + /** + * Builds and returns a Nonstandard\Uuid + * + * @param CodecInterface $codec The codec to use for building this instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return Uuid The Nonstandard\UuidBuilder returns an instance of + * Nonstandard\Uuid + * + * @psalm-pure + */ + public function build(\RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + try { + return new \RayGlobalScoped\Ramsey\Uuid\Nonstandard\Uuid($this->buildFields($bytes), $this->numberConverter, $codec, $this->timeConverter); + } catch (\Throwable $e) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnableToBuildUuidException($e->getMessage(), (int) $e->getCode(), $e); + } + } + /** + * Proxy method to allow injecting a mock, for testing + */ + protected function buildFields(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\Nonstandard\Fields + { + return new \RayGlobalScoped\Ramsey\Uuid\Nonstandard\Fields($bytes); + } +} diff --git a/build/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php b/build/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php new file mode 100644 index 0000000..3979742 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php @@ -0,0 +1,99 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Nonstandard; + +use DateTimeImmutable; +use DateTimeInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\DateTimeException; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Lazy\LazyUuidFromString; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidInterface; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV1; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use Throwable; +use function hex2bin; +use function str_pad; +use function substr; +use const STR_PAD_LEFT; +/** + * Ordered-time, or version 6, UUIDs include timestamp, clock sequence, and node + * values that are combined into a 128-bit unsigned integer + * + * @link https://github.com/uuid6/uuid6-ietf-draft UUID version 6 IETF draft + * @link http://gh.peabody.io/uuidv6/ "Version 6" UUIDs + * + * @psalm-immutable + */ +final class UuidV6 extends \RayGlobalScoped\Ramsey\Uuid\Uuid implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidInterface +{ + /** + * Creates a version 6 (time-based) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface $fields, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + if ($fields->getVersion() !== \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_PEABODY) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Fields used to create a UuidV6 must represent a ' . 'version 6 (ordered-time) UUID'); + } + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } + /** + * Returns a DateTimeInterface object representing the timestamp associated + * with the UUID + * + * @return DateTimeImmutable A PHP DateTimeImmutable instance representing + * the timestamp of a version 6 UUID + */ + public function getDateTime() : \DateTimeInterface + { + $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); + try { + return new \DateTimeImmutable('@' . $time->getSeconds()->toString() . '.' . \str_pad($time->getMicroseconds()->toString(), 6, '0', \STR_PAD_LEFT)); + } catch (\Throwable $e) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DateTimeException($e->getMessage(), (int) $e->getCode(), $e); + } + } + /** + * Converts this UUID into an instance of a version 1 UUID + */ + public function toUuidV1() : \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV1 + { + $hex = $this->getHex()->toString(); + $hex = \substr($hex, 7, 5) . \substr($hex, 13, 3) . \substr($hex, 3, 4) . '1' . \substr($hex, 0, 3) . \substr($hex, 16); + /** @var LazyUuidFromString $uuid */ + $uuid = \RayGlobalScoped\Ramsey\Uuid\Uuid::fromBytes((string) \hex2bin($hex)); + return $uuid->toUuidV1(); + } + /** + * Converts a version 1 UUID into an instance of a version 6 UUID + */ + public static function fromUuidV1(\RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV1 $uuidV1) : \RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidV6 + { + $hex = $uuidV1->getHex()->toString(); + $hex = \substr($hex, 13, 3) . \substr($hex, 8, 4) . \substr($hex, 0, 5) . '6' . \substr($hex, 5, 3) . \substr($hex, 16); + /** @var LazyUuidFromString $uuid */ + $uuid = \RayGlobalScoped\Ramsey\Uuid\Uuid::fromBytes((string) \hex2bin($hex)); + return $uuid->toUuidV6(); + } +} diff --git a/build/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php b/build/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php new file mode 100644 index 0000000..f92b076 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php @@ -0,0 +1,188 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider\Dce; + +use RayGlobalScoped\Ramsey\Uuid\Exception\DceSecurityException; +use RayGlobalScoped\Ramsey\Uuid\Provider\DceSecurityProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use function escapeshellarg; +use function preg_split; +use function str_getcsv; +use function strpos; +use function strrpos; +use function strtolower; +use function strtoupper; +use function substr; +use function trim; +use const PREG_SPLIT_NO_EMPTY; +/** + * SystemDceSecurityProvider retrieves the user or group identifiers from the system + */ +class SystemDceSecurityProvider implements \RayGlobalScoped\Ramsey\Uuid\Provider\DceSecurityProviderInterface +{ + /** + * @throws DceSecurityException if unable to get a user identifier + * + * @inheritDoc + */ + public function getUid() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer + { + static $uid = null; + if ($uid instanceof \RayGlobalScoped\Ramsey\Uuid\Type\Integer) { + return $uid; + } + if ($uid === null) { + $uid = $this->getSystemUid(); + } + if ($uid === '') { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DceSecurityException('Unable to get a user identifier using the system DCE ' . 'Security provider; please provide a custom identifier or ' . 'use a different provider'); + } + $uid = new \RayGlobalScoped\Ramsey\Uuid\Type\Integer($uid); + return $uid; + } + /** + * @throws DceSecurityException if unable to get a group identifier + * + * @inheritDoc + */ + public function getGid() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer + { + static $gid = null; + if ($gid instanceof \RayGlobalScoped\Ramsey\Uuid\Type\Integer) { + return $gid; + } + if ($gid === null) { + $gid = $this->getSystemGid(); + } + if ($gid === '') { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DceSecurityException('Unable to get a group identifier using the system DCE ' . 'Security provider; please provide a custom identifier or ' . 'use a different provider'); + } + $gid = new \RayGlobalScoped\Ramsey\Uuid\Type\Integer($gid); + return $gid; + } + /** + * Returns the UID from the system + */ + private function getSystemUid() : string + { + if (!$this->hasShellExec()) { + return ''; + } + switch ($this->getOs()) { + case 'WIN': + return $this->getWindowsUid(); + case 'DAR': + case 'FRE': + case 'LIN': + default: + return \trim((string) \shell_exec('id -u')); + } + } + /** + * Returns the GID from the system + */ + private function getSystemGid() : string + { + if (!$this->hasShellExec()) { + return ''; + } + switch ($this->getOs()) { + case 'WIN': + return $this->getWindowsGid(); + case 'DAR': + case 'FRE': + case 'LIN': + default: + return \trim((string) \shell_exec('id -g')); + } + } + /** + * Returns true if shell_exec() is available for use + */ + private function hasShellExec() : bool + { + $disabledFunctions = \strtolower((string) \ini_get('disable_functions')); + return \strpos($disabledFunctions, 'shell_exec') === \false; + } + /** + * Returns the PHP_OS string + */ + private function getOs() : string + { + return \strtoupper(\substr(\constant('PHP_OS'), 0, 3)); + } + /** + * Returns the user identifier for a user on a Windows system + * + * Windows does not have the same concept as an effective POSIX UID for the + * running script. Instead, each user is uniquely identified by an SID + * (security identifier). The SID includes three 32-bit unsigned integers + * that make up a unique domain identifier, followed by an RID (relative + * identifier) that we will use as the UID. The primary caveat is that this + * UID may not be unique to the system, since it is, instead, unique to the + * domain. + * + * @link https://www.lifewire.com/what-is-an-sid-number-2626005 What Is an SID Number? + * @link https://bit.ly/30vE7NM Well-known SID Structures + * @link https://bit.ly/2FWcYKJ Well-known security identifiers in Windows operating systems + * @link https://www.windows-commandline.com/get-sid-of-user/ Get SID of user + */ + private function getWindowsUid() : string + { + $response = \shell_exec('whoami /user /fo csv /nh'); + if ($response === null) { + return ''; + } + /** @var string $sid */ + $sid = \str_getcsv(\trim($response))[1] ?? ''; + if (($lastHyphen = \strrpos($sid, '-')) === \false) { + return ''; + } + return \trim(\substr($sid, $lastHyphen + 1)); + } + /** + * Returns a group identifier for a user on a Windows system + * + * Since Windows does not have the same concept as an effective POSIX GID + * for the running script, we will get the local group memberships for the + * user running the script. Then, we will get the SID (security identifier) + * for the first group that appears in that list. Finally, we will return + * the RID (relative identifier) for the group and use that as the GID. + * + * @link https://www.windows-commandline.com/list-of-user-groups-command-line/ List of user groups command line + */ + private function getWindowsGid() : string + { + $response = \shell_exec('net user %username% | findstr /b /i "Local Group Memberships"'); + if ($response === null) { + return ''; + } + /** @var string[] $userGroups */ + $userGroups = \preg_split('/\\s{2,}/', $response, -1, \PREG_SPLIT_NO_EMPTY); + $firstGroup = \trim($userGroups[1] ?? '', "* \t\n\r\0\v"); + if ($firstGroup === '') { + return ''; + } + $response = \shell_exec('wmic group get name,sid | findstr /b /i ' . \escapeshellarg($firstGroup)); + if ($response === null) { + return ''; + } + /** @var string[] $userGroup */ + $userGroup = \preg_split('/\\s{2,}/', $response, -1, \PREG_SPLIT_NO_EMPTY); + $sid = $userGroup[1] ?? ''; + if (($lastHyphen = \strrpos($sid, '-')) === \false) { + return ''; + } + return \trim((string) \substr($sid, $lastHyphen + 1)); + } +} diff --git a/build/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php b/build/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php new file mode 100644 index 0000000..780350f --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php @@ -0,0 +1,37 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider; + +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV2; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +/** + * A DCE provider provides access to local domain identifiers for version 2, + * DCE Security, UUIDs + * + * @see UuidV2 + */ +interface DceSecurityProviderInterface +{ + /** + * Returns a user identifier for the system + * + * @link https://en.wikipedia.org/wiki/User_identifier User identifier + */ + public function getUid() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer; + /** + * Returns a group identifier for the system + * + * @link https://en.wikipedia.org/wiki/Group_identifier Group identifier + */ + public function getGid() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer; +} diff --git a/build/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php b/build/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php new file mode 100644 index 0000000..667ce51 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php @@ -0,0 +1,49 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider\Node; + +use RayGlobalScoped\Ramsey\Uuid\Exception\NodeException; +use RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +/** + * FallbackNodeProvider retrieves the system node ID by stepping through a list + * of providers until a node ID can be obtained + */ +class FallbackNodeProvider implements \RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface +{ + /** + * @var NodeProviderCollection + */ + private $nodeProviders; + /** + * @param NodeProviderCollection $providers Array of node providers + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Provider\Node\NodeProviderCollection $providers) + { + $this->nodeProviders = $providers; + } + public function getNode() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + $lastProviderException = null; + /** @var NodeProviderInterface $provider */ + foreach ($this->nodeProviders as $provider) { + try { + return $provider->getNode(); + } catch (\RayGlobalScoped\Ramsey\Uuid\Exception\NodeException $exception) { + $lastProviderException = $exception; + continue; + } + } + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\NodeException('Unable to find a suitable node provider', 0, $lastProviderException); + } +} diff --git a/build/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php b/build/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php new file mode 100644 index 0000000..4547def --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php @@ -0,0 +1,42 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider\Node; + +use RayGlobalScoped\Ramsey\Collection\AbstractCollection; +use RayGlobalScoped\Ramsey\Collection\CollectionInterface; +use RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +/** + * A collection of NodeProviderInterface objects + */ +class NodeProviderCollection extends \RayGlobalScoped\Ramsey\Collection\AbstractCollection implements \RayGlobalScoped\Ramsey\Collection\CollectionInterface +{ + public function getType() : string + { + return \RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface::class; + } + /** + * Re-constructs the object from its serialized form + * + * @param string $serialized The serialized PHP string to unserialize into + * a UuidInterface instance + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + */ + public function unserialize($serialized) : void + { + /** @var mixed[] $data */ + $data = \unserialize($serialized, ['allowed_classes' => [\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal::class, \RayGlobalScoped\Ramsey\Uuid\Provider\Node\RandomNodeProvider::class, \RayGlobalScoped\Ramsey\Uuid\Provider\Node\StaticNodeProvider::class, \RayGlobalScoped\Ramsey\Uuid\Provider\Node\SystemNodeProvider::class]]); + $this->data = $data; + } +} diff --git a/build/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php b/build/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php new file mode 100644 index 0000000..0c40ed2 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php @@ -0,0 +1,48 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider\Node; + +use RayGlobalScoped\Ramsey\Uuid\Exception\RandomSourceException; +use RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use function bin2hex; +use function dechex; +use function hex2bin; +use function hexdec; +use function str_pad; +use function substr; +use const STR_PAD_LEFT; +/** + * RandomNodeProvider generates a random node ID + * + * @link http://tools.ietf.org/html/rfc4122#section-4.5 RFC 4122, § 4.5: Node IDs that Do Not Identify the Host + */ +class RandomNodeProvider implements \RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface +{ + public function getNode() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + try { + $nodeBytes = \random_bytes(6); + } catch (\Throwable $exception) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\RandomSourceException($exception->getMessage(), (int) $exception->getCode(), $exception); + } + // Split the node bytes for math on 32-bit systems. + $nodeMsb = \substr($nodeBytes, 0, 3); + $nodeLsb = \substr($nodeBytes, 3); + // Set the multicast bit; see RFC 4122, section 4.5. + $nodeMsb = \hex2bin(\str_pad(\dechex(\hexdec(\bin2hex($nodeMsb)) | 0x10000), 6, '0', \STR_PAD_LEFT)); + // Recombine the node bytes. + $node = $nodeMsb . $nodeLsb; + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\str_pad(\bin2hex($node), 12, '0', \STR_PAD_LEFT)); + } +} diff --git a/build/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php b/build/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php new file mode 100644 index 0000000..47ffa45 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php @@ -0,0 +1,58 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider\Node; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use function dechex; +use function hexdec; +use function str_pad; +use function substr; +use const STR_PAD_LEFT; +/** + * StaticNodeProvider provides a static node value with the multicast bit set + * + * @link http://tools.ietf.org/html/rfc4122#section-4.5 RFC 4122, § 4.5: Node IDs that Do Not Identify the Host + */ +class StaticNodeProvider implements \RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface +{ + /** + * @var Hexadecimal + */ + private $node; + /** + * @param Hexadecimal $node The static node value to use + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node) + { + if (\strlen($node->toString()) > 12) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Static node value cannot be greater than 12 hexadecimal characters'); + } + $this->node = $this->setMulticastBit($node); + } + public function getNode() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return $this->node; + } + /** + * Set the multicast bit for the static node value + */ + private function setMulticastBit(\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node) : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + $nodeHex = \str_pad($node->toString(), 12, '0', \STR_PAD_LEFT); + $firstOctet = \substr($nodeHex, 0, 2); + $firstOctet = \str_pad(\dechex(\hexdec($firstOctet) | 0x1), 2, '0', \STR_PAD_LEFT); + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal($firstOctet . \substr($nodeHex, 2)); + } +} diff --git a/build/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php b/build/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php new file mode 100644 index 0000000..a221164 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php @@ -0,0 +1,136 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider\Node; + +use RayGlobalScoped\Ramsey\Uuid\Exception\NodeException; +use RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use function array_filter; +use function array_map; +use function array_walk; +use function count; +use function ob_get_clean; +use function ob_start; +use function preg_match; +use function preg_match_all; +use function reset; +use function str_replace; +use function strpos; +use function strtolower; +use function strtoupper; +use function substr; +use const GLOB_NOSORT; +use const PREG_PATTERN_ORDER; +/** + * SystemNodeProvider retrieves the system node ID, if possible + * + * The system node ID, or host ID, is often the same as the MAC address for a + * network interface on the host. + */ +class SystemNodeProvider implements \RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface +{ + /** + * Pattern to match nodes in ifconfig and ipconfig output. + */ + private const IFCONFIG_PATTERN = '/[^:]([0-9a-f]{2}([:-])[0-9a-f]{2}(\\2[0-9a-f]{2}){4})[^:]/i'; + /** + * Pattern to match nodes in sysfs stream output. + */ + private const SYSFS_PATTERN = '/^([0-9a-f]{2}:){5}[0-9a-f]{2}$/i'; + public function getNode() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + $node = $this->getNodeFromSystem(); + if ($node === '') { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\NodeException('Unable to fetch a node for this system'); + } + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal($node); + } + /** + * Returns the system node, if it can find it + */ + protected function getNodeFromSystem() : string + { + static $node = null; + if ($node !== null) { + return (string) $node; + } + // First, try a Linux-specific approach. + $node = $this->getSysfs(); + if ($node === '') { + // Search ifconfig output for MAC addresses & return the first one. + $node = $this->getIfconfig(); + } + $node = \str_replace([':', '-'], '', $node); + return $node; + } + /** + * Returns the network interface configuration for the system + * + * @codeCoverageIgnore + */ + protected function getIfconfig() : string + { + $disabledFunctions = \strtolower((string) \ini_get('disable_functions')); + if (\strpos($disabledFunctions, 'passthru') !== \false) { + return ''; + } + \ob_start(); + switch (\strtoupper(\substr(\constant('PHP_OS'), 0, 3))) { + case 'WIN': + \passthru('ipconfig /all 2>&1'); + break; + case 'DAR': + \passthru('ifconfig 2>&1'); + break; + case 'FRE': + \passthru('netstat -i -f link 2>&1'); + break; + case 'LIN': + default: + \passthru('netstat -ie 2>&1'); + break; + } + $ifconfig = (string) \ob_get_clean(); + $node = ''; + if (\preg_match_all(self::IFCONFIG_PATTERN, $ifconfig, $matches, \PREG_PATTERN_ORDER)) { + $node = $matches[1][0] ?? ''; + } + return (string) $node; + } + /** + * Returns MAC address from the first system interface via the sysfs interface + */ + protected function getSysfs() : string + { + $mac = ''; + if (\strtoupper(\constant('PHP_OS')) === 'LINUX') { + $addressPaths = \glob('/sys/class/net/*/address', \GLOB_NOSORT); + if ($addressPaths === \false || \count($addressPaths) === 0) { + return ''; + } + $macs = []; + \array_walk($addressPaths, function (string $addressPath) use(&$macs) : void { + if (\is_readable($addressPath)) { + $macs[] = \file_get_contents($addressPath); + } + }); + $macs = \array_map('trim', $macs); + // Remove invalid entries. + $macs = \array_filter($macs, function (string $address) { + return $address !== '00:00:00:00:00:00' && \preg_match(self::SYSFS_PATTERN, $address); + }); + $mac = \reset($macs); + } + return (string) $mac; + } +} diff --git a/build/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php b/build/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php new file mode 100644 index 0000000..369a9e1 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php @@ -0,0 +1,27 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider; + +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +/** + * A node provider retrieves or generates a node ID + */ +interface NodeProviderInterface +{ + /** + * Returns a node ID + * + * @return Hexadecimal The node ID as a hexadecimal string + */ + public function getNode() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +} diff --git a/build/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php b/build/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php new file mode 100644 index 0000000..427ddda --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php @@ -0,0 +1,56 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider\Time; + +use RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\Type\Time; +/** + * FixedTimeProvider uses an known time to provide the time + * + * This provider allows the use of a previously-generated, or known, time + * when generating time-based UUIDs. + */ +class FixedTimeProvider implements \RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface +{ + /** + * @var Time + */ + private $fixedTime; + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Type\Time $time) + { + $this->fixedTime = $time; + } + /** + * Sets the `usec` component of the time + * + * @param int|string|IntegerObject $value The `usec` value to set + */ + public function setUsec($value) : void + { + $this->fixedTime = new \RayGlobalScoped\Ramsey\Uuid\Type\Time($this->fixedTime->getSeconds(), $value); + } + /** + * Sets the `sec` component of the time + * + * @param int|string|IntegerObject $value The `sec` value to set + */ + public function setSec($value) : void + { + $this->fixedTime = new \RayGlobalScoped\Ramsey\Uuid\Type\Time($value, $this->fixedTime->getMicroseconds()); + } + public function getTime() : \RayGlobalScoped\Ramsey\Uuid\Type\Time + { + return $this->fixedTime; + } +} diff --git a/build/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php b/build/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php new file mode 100644 index 0000000..d34a8ea --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php @@ -0,0 +1,28 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider\Time; + +use RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Time; +use function gettimeofday; +/** + * SystemTimeProvider retrieves the current time using built-in PHP functions + */ +class SystemTimeProvider implements \RayGlobalScoped\Ramsey\Uuid\Provider\TimeProviderInterface +{ + public function getTime() : \RayGlobalScoped\Ramsey\Uuid\Type\Time + { + $time = \gettimeofday(); + return new \RayGlobalScoped\Ramsey\Uuid\Type\Time($time['sec'], $time['usec']); + } +} diff --git a/build/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php b/build/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php new file mode 100644 index 0000000..bcb0f9b --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php @@ -0,0 +1,25 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Provider; + +use RayGlobalScoped\Ramsey\Uuid\Type\Time; +/** + * A time provider retrieves the current time + */ +interface TimeProviderInterface +{ + /** + * Returns a time object + */ + public function getTime() : \RayGlobalScoped\Ramsey\Uuid\Type\Time; +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/Fields.php b/build/vendor/ramsey/uuid/src/Rfc4122/Fields.php new file mode 100644 index 0000000..151ee9e --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/Fields.php @@ -0,0 +1,143 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Fields\SerializableFieldsTrait; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use function bin2hex; +use function dechex; +use function hexdec; +use function sprintf; +use function str_pad; +use function strlen; +use function substr; +use function unpack; +use const STR_PAD_LEFT; +/** + * RFC 4122 variant UUIDs are comprised of a set of named fields + * + * Internally, this class represents the fields together as a 16-byte binary + * string. + * + * @psalm-immutable + */ +final class Fields implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface +{ + use NilTrait; + use SerializableFieldsTrait; + use VariantTrait; + use VersionTrait; + /** + * @var string + */ + private $bytes; + /** + * @param string $bytes A 16-byte binary string representation of a UUID + * + * @throws InvalidArgumentException if the byte string is not exactly 16 bytes + * @throws InvalidArgumentException if the byte string does not represent an RFC 4122 UUID + * @throws InvalidArgumentException if the byte string does not contain a valid version + */ + public function __construct(string $bytes) + { + if (\strlen($bytes) !== 16) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('The byte string must be 16 bytes long; ' . 'received ' . \strlen($bytes) . ' bytes'); + } + $this->bytes = $bytes; + if (!$this->isCorrectVariant()) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('The byte string received does not conform to the RFC 4122 variant'); + } + if (!$this->isCorrectVersion()) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('The byte string received does not contain a valid RFC 4122 version'); + } + } + public function getBytes() : string + { + return $this->bytes; + } + public function getClockSeq() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + $clockSeq = \hexdec(\bin2hex(\substr($this->bytes, 8, 2))) & 0x3fff; + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\str_pad(\dechex($clockSeq), 4, '0', \STR_PAD_LEFT)); + } + public function getClockSeqHiAndReserved() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 8, 1))); + } + public function getClockSeqLow() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 9, 1))); + } + public function getNode() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 10))); + } + public function getTimeHiAndVersion() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 6, 2))); + } + public function getTimeLow() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 0, 4))); + } + public function getTimeMid() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\bin2hex(\substr($this->bytes, 4, 2))); + } + /** + * Returns the full 60-bit timestamp, without the version + * + * For version 2 UUIDs, the time_low field is the local identifier and + * should not be returned as part of the time. For this reason, we set the + * bottom 32 bits of the timestamp to 0's. As a result, there is some loss + * of fidelity of the timestamp, for version 2 UUIDs. The timestamp can be + * off by a range of 0 to 429.4967295 seconds (or 7 minutes, 9 seconds, and + * 496730 microseconds). + * + * For version 6 UUIDs, the timestamp order is reversed from the typical RFC + * 4122 order (the time bits are in the correct bit order, so that it is + * monotonically increasing). In returning the timestamp value, we put the + * bits in the order: time_low + time_mid + time_hi. + */ + public function getTimestamp() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + switch ($this->getVersion()) { + case \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_DCE_SECURITY: + $timestamp = \sprintf('%03x%04s%08s', \hexdec($this->getTimeHiAndVersion()->toString()) & 0xfff, $this->getTimeMid()->toString(), ''); + break; + case \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_PEABODY: + $timestamp = \sprintf('%08s%04s%03x', $this->getTimeLow()->toString(), $this->getTimeMid()->toString(), \hexdec($this->getTimeHiAndVersion()->toString()) & 0xfff); + break; + default: + $timestamp = \sprintf('%03x%04s%08s', \hexdec($this->getTimeHiAndVersion()->toString()) & 0xfff, $this->getTimeMid()->toString(), $this->getTimeLow()->toString()); + } + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal($timestamp); + } + public function getVersion() : ?int + { + if ($this->isNil()) { + return null; + } + $parts = \unpack('n*', $this->bytes); + return (int) $parts[4] >> 12; + } + private function isCorrectVariant() : bool + { + if ($this->isNil()) { + return \true; + } + return $this->getVariant() === \RayGlobalScoped\Ramsey\Uuid\Uuid::RFC_4122; + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php b/build/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php new file mode 100644 index 0000000..b4f6ba5 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php @@ -0,0 +1,113 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\Fields\FieldsInterface as BaseFieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +/** + * RFC 4122 defines fields for a specific variant of UUID + * + * The fields of an RFC 4122 variant UUID are: + * + * * **time_low**: The low field of the timestamp, an unsigned 32-bit integer + * * **time_mid**: The middle field of the timestamp, an unsigned 16-bit integer + * * **time_hi_and_version**: The high field of the timestamp multiplexed with + * the version number, an unsigned 16-bit integer + * * **clock_seq_hi_and_reserved**: The high field of the clock sequence + * multiplexed with the variant, an unsigned 8-bit integer + * * **clock_seq_low**: The low field of the clock sequence, an unsigned + * 8-bit integer + * * **node**: The spatially unique node identifier, an unsigned 48-bit + * integer + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1 RFC 4122, § 4.1: Format + * + * @psalm-immutable + */ +interface FieldsInterface extends \RayGlobalScoped\Ramsey\Uuid\Fields\FieldsInterface +{ + /** + * Returns the full 16-bit clock sequence, with the variant bits (two most + * significant bits) masked out + */ + public function getClockSeq() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Returns the high field of the clock sequence multiplexed with the variant + */ + public function getClockSeqHiAndReserved() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Returns the low field of the clock sequence + */ + public function getClockSeqLow() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Returns the node field + */ + public function getNode() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Returns the high field of the timestamp multiplexed with the version + */ + public function getTimeHiAndVersion() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Returns the low field of the timestamp + */ + public function getTimeLow() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Returns the middle field of the timestamp + */ + public function getTimeMid() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Returns the full 60-bit timestamp, without the version + */ + public function getTimestamp() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Returns the variant + * + * The variant number describes the layout of the UUID. The variant + * number has the following meaning: + * + * - 0 - Reserved for NCS backward compatibility + * - 2 - The RFC 4122 variant + * - 6 - Reserved, Microsoft Corporation backward compatibility + * - 7 - Reserved for future definition + * + * For RFC 4122 variant UUIDs, this value should always be the integer `2`. + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, § 4.1.1: Variant + */ + public function getVariant() : int; + /** + * Returns the version + * + * The version number describes how the UUID was generated and has the + * following meaning: + * + * 1. Time-based UUID + * 2. DCE security UUID + * 3. Name-based UUID hashed with MD5 + * 4. Randomly generated UUID + * 5. Name-based UUID hashed with SHA-1 + * + * This returns `null` if the UUID is not an RFC 4122 variant, since version + * is only meaningful for this variant. + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version + */ + public function getVersion() : ?int; + /** + * Returns true if these fields represent a nil UUID + * + * The nil UUID is special form of UUID that is specified to have all 128 + * bits set to zero. + */ + public function isNil() : bool; +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php b/build/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php new file mode 100644 index 0000000..e67ab57 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php @@ -0,0 +1,38 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +/** + * Provides common functionality for nil UUIDs + * + * The nil UUID is special form of UUID that is specified to have all 128 bits + * set to zero. + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.7 RFC 4122, § 4.1.7: Nil UUID + * + * @psalm-immutable + */ +trait NilTrait +{ + /** + * Returns the bytes that comprise the fields + */ + public abstract function getBytes() : string; + /** + * Returns true if the byte string represents a nil UUID + */ + public function isNil() : bool + { + return $this->getBytes() === "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php b/build/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php new file mode 100644 index 0000000..ba6ec1a --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\Uuid; +/** + * The nil UUID is special form of UUID that is specified to have all 128 bits + * set to zero + * + * @psalm-immutable + */ +final class NilUuid extends \RayGlobalScoped\Ramsey\Uuid\Uuid implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidInterface +{ +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php b/build/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php new file mode 100644 index 0000000..940234f --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php @@ -0,0 +1,96 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\UnableToBuildUuidException; +use RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException; +use RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidV6; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidInterface as Rfc4122UuidInterface; +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use Throwable; +/** + * UuidBuilder builds instances of RFC 4122 UUIDs + * + * @psalm-immutable + */ +class UuidBuilder implements \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface +{ + /** + * @var NumberConverterInterface + */ + private $numberConverter; + /** + * @var TimeConverterInterface + */ + private $timeConverter; + /** + * Constructs the DefaultUuidBuilder + * + * @param NumberConverterInterface $numberConverter The number converter to + * use when constructing the Uuid + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to Unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + $this->numberConverter = $numberConverter; + $this->timeConverter = $timeConverter; + } + /** + * Builds and returns a Uuid + * + * @param CodecInterface $codec The codec to use for building this Uuid instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return Rfc4122UuidInterface UuidBuilder returns instances of Rfc4122UuidInterface + * + * @psalm-pure + */ + public function build(\RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + try { + $fields = $this->buildFields($bytes); + if ($fields->isNil()) { + return new \RayGlobalScoped\Ramsey\Uuid\Rfc4122\NilUuid($fields, $this->numberConverter, $codec, $this->timeConverter); + } + switch ($fields->getVersion()) { + case 1: + return new \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV1($fields, $this->numberConverter, $codec, $this->timeConverter); + case 2: + return new \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV2($fields, $this->numberConverter, $codec, $this->timeConverter); + case 3: + return new \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV3($fields, $this->numberConverter, $codec, $this->timeConverter); + case 4: + return new \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV4($fields, $this->numberConverter, $codec, $this->timeConverter); + case 5: + return new \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidV5($fields, $this->numberConverter, $codec, $this->timeConverter); + case 6: + return new \RayGlobalScoped\Ramsey\Uuid\Nonstandard\UuidV6($fields, $this->numberConverter, $codec, $this->timeConverter); + } + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException('The UUID version in the given fields is not supported ' . 'by this UUID builder'); + } catch (\Throwable $e) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnableToBuildUuidException($e->getMessage(), (int) $e->getCode(), $e); + } + } + /** + * Proxy method to allow injecting a mock, for testing + */ + protected function buildFields(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface + { + return new \RayGlobalScoped\Ramsey\Uuid\Rfc4122\Fields($bytes); + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php b/build/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php new file mode 100644 index 0000000..8abede5 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php @@ -0,0 +1,33 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\UuidInterface as BaseUuidInterface; +/** + * Also known as a Leach-Salz variant UUID, an RFC 4122 variant UUID is a + * universally unique identifier defined by RFC 4122 + * + * @link https://tools.ietf.org/html/rfc4122 RFC 4122 + * + * @psalm-immutable + */ +interface UuidInterface extends \RayGlobalScoped\Ramsey\Uuid\UuidInterface +{ + /** + * Returns the string standard representation of the UUID as a URN + * + * @link http://en.wikipedia.org/wiki/Uniform_Resource_Name Uniform Resource Name + * @link https://tools.ietf.org/html/rfc4122#section-3 RFC 4122, § 3: Namespace Registration Template + */ + public function getUrn() : string; +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php new file mode 100644 index 0000000..0f143f5 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php @@ -0,0 +1,72 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use DateTimeImmutable; +use DateTimeInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\DateTimeException; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use Throwable; +use function str_pad; +use const STR_PAD_LEFT; +/** + * Time-based, or version 1, UUIDs include timestamp, clock sequence, and node + * values that are combined into a 128-bit unsigned integer + * + * @psalm-immutable + */ +final class UuidV1 extends \RayGlobalScoped\Ramsey\Uuid\Uuid implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidInterface +{ + /** + * Creates a version 1 (time-based) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface $fields, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + if ($fields->getVersion() !== \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_TIME) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Fields used to create a UuidV1 must represent a ' . 'version 1 (time-based) UUID'); + } + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } + /** + * Returns a DateTimeInterface object representing the timestamp associated + * with the UUID + * + * The timestamp value is only meaningful in a time-based UUID, which + * has version type 1. + * + * @return DateTimeImmutable A PHP DateTimeImmutable instance representing + * the timestamp of a version 1 UUID + */ + public function getDateTime() : \DateTimeInterface + { + $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); + try { + return new \DateTimeImmutable('@' . $time->getSeconds()->toString() . '.' . \str_pad($time->getMicroseconds()->toString(), 6, '0', \STR_PAD_LEFT)); + } catch (\Throwable $e) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DateTimeException($e->getMessage(), (int) $e->getCode(), $e); + } + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php new file mode 100644 index 0000000..0354439 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php @@ -0,0 +1,116 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use DateTimeImmutable; +use DateTimeInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\DateTimeException; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use Throwable; +use function hexdec; +use function str_pad; +use const STR_PAD_LEFT; +/** + * DCE Security version, or version 2, UUIDs include local domain identifier, + * local ID for the specified domain, and node values that are combined into a + * 128-bit unsigned integer + * + * @link https://publications.opengroup.org/c311 DCE 1.1: Authentication and Security Services + * @link https://publications.opengroup.org/c706 DCE 1.1: Remote Procedure Call + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01 DCE 1.1: Auth & Sec, §5.2.1.1 + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1: Auth & Sec, §11.5.1.1 + * @link https://pubs.opengroup.org/onlinepubs/9629399/apdxa.htm DCE 1.1: RPC, Appendix A + * @link https://github.com/google/uuid Go package for UUIDs (includes DCE implementation) + * + * @psalm-immutable + */ +final class UuidV2 extends \RayGlobalScoped\Ramsey\Uuid\Uuid implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidInterface +{ + /** + * Creates a version 2 (DCE Security) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface $fields, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + if ($fields->getVersion() !== \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_DCE_SECURITY) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Fields used to create a UuidV2 must represent a ' . 'version 2 (DCE Security) UUID'); + } + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } + /** + * Returns a DateTimeInterface object representing the timestamp associated + * with the UUID + * + * It is important to note that a version 2 UUID suffers from some loss of + * fidelity of the timestamp, due to replacing the time_low field with the + * local identifier. When constructing the timestamp value for date + * purposes, we replace the local identifier bits with zeros. As a result, + * the timestamp can be off by a range of 0 to 429.4967295 seconds (or 7 + * minutes, 9 seconds, and 496730 microseconds). + * + * Astute observers might note this value directly corresponds to 2^32 - 1, + * or 0xffffffff. The local identifier is 32-bits, and we have set each of + * these bits to 0, so the maximum range of timestamp drift is 0x00000000 + * to 0xffffffff (counted in 100-nanosecond intervals). + * + * @return DateTimeImmutable A PHP DateTimeImmutable instance representing + * the timestamp of a version 2 UUID + */ + public function getDateTime() : \DateTimeInterface + { + $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); + try { + return new \DateTimeImmutable('@' . $time->getSeconds()->toString() . '.' . \str_pad($time->getMicroseconds()->toString(), 6, '0', \STR_PAD_LEFT)); + } catch (\Throwable $e) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\DateTimeException($e->getMessage(), (int) $e->getCode(), $e); + } + } + /** + * Returns the local domain used to create this version 2 UUID + */ + public function getLocalDomain() : int + { + /** @var Rfc4122FieldsInterface $fields */ + $fields = $this->getFields(); + return (int) \hexdec($fields->getClockSeqLow()->toString()); + } + /** + * Returns the string name of the local domain + */ + public function getLocalDomainName() : string + { + return \RayGlobalScoped\Ramsey\Uuid\Uuid::DCE_DOMAIN_NAMES[$this->getLocalDomain()]; + } + /** + * Returns the local identifier for the domain used to create this version 2 UUID + */ + public function getLocalIdentifier() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer + { + /** @var Rfc4122FieldsInterface $fields */ + $fields = $this->getFields(); + return new \RayGlobalScoped\Ramsey\Uuid\Type\Integer($this->numberConverter->fromHex($fields->getTimeLow()->toString())); + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php new file mode 100644 index 0000000..db51d20 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php @@ -0,0 +1,47 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +/** + * Version 3 UUIDs are named-based, using combination of a namespace and name + * that are hashed into a 128-bit unsigned integer using MD5 + * + * @psalm-immutable + */ +final class UuidV3 extends \RayGlobalScoped\Ramsey\Uuid\Uuid implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidInterface +{ + /** + * Creates a version 3 (name-based, MD5-hashed) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface $fields, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + if ($fields->getVersion() !== \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_HASH_MD5) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Fields used to create a UuidV3 must represent a ' . 'version 3 (name-based, MD5-hashed) UUID'); + } + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php new file mode 100644 index 0000000..75a99a1 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php @@ -0,0 +1,47 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +/** + * Random, or version 4, UUIDs are randomly or pseudo-randomly generated 128-bit + * integers + * + * @psalm-immutable + */ +final class UuidV4 extends \RayGlobalScoped\Ramsey\Uuid\Uuid implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidInterface +{ + /** + * Creates a version 4 (random) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface $fields, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + if ($fields->getVersion() !== \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_RANDOM) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Fields used to create a UuidV4 must represent a ' . 'version 4 (random) UUID'); + } + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php new file mode 100644 index 0000000..aaf44e0 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php @@ -0,0 +1,47 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +/** + * Version 5 UUIDs are named-based, using combination of a namespace and name + * that are hashed into a 128-bit unsigned integer using SHA1 + * + * @psalm-immutable + */ +final class UuidV5 extends \RayGlobalScoped\Ramsey\Uuid\Uuid implements \RayGlobalScoped\Ramsey\Uuid\Rfc4122\UuidInterface +{ + /** + * Creates a version 5 (name-based, SHA1-hashed) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface $fields, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + if ($fields->getVersion() !== \RayGlobalScoped\Ramsey\Uuid\Uuid::UUID_TYPE_HASH_SHA1) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Fields used to create a UuidV5 must represent a ' . 'version 5 (named-based, SHA1-hashed) UUID'); + } + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/Validator.php b/build/vendor/ramsey/uuid/src/Rfc4122/Validator.php new file mode 100644 index 0000000..0eb0799 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/Validator.php @@ -0,0 +1,41 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface; +use function preg_match; +use function str_replace; +/** + * Rfc4122\Validator validates strings as UUIDs of the RFC 4122 variant + * + * @psalm-immutable + */ +final class Validator implements \RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface +{ + private const VALID_PATTERN = '\\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-' . '[1-5]{1}[0-9A-Fa-f]{3}-[ABab89]{1}[0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}\\z'; + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function getPattern() : string + { + return self::VALID_PATTERN; + } + public function validate(string $uuid) : bool + { + $uuid = \str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid); + return $uuid === \RayGlobalScoped\Ramsey\Uuid\Uuid::NIL || \preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php b/build/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php new file mode 100644 index 0000000..0f09226 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php @@ -0,0 +1,73 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidBytesException; +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use function decbin; +use function str_pad; +use function strlen; +use function strpos; +use function substr; +use function unpack; +use const STR_PAD_LEFT; +/** + * Provides common functionality for handling the variant, as defined by RFC 4122 + * + * @psalm-immutable + */ +trait VariantTrait +{ + /** + * Returns the bytes that comprise the fields + */ + public abstract function getBytes() : string; + /** + * Returns the variant identifier, according to RFC 4122, for the given bytes + * + * The following values may be returned: + * + * - `0` -- Reserved, NCS backward compatibility. + * - `2` -- The variant specified in RFC 4122. + * - `6` -- Reserved, Microsoft Corporation backward compatibility. + * - `7` -- Reserved for future definition. + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, § 4.1.1: Variant + * + * @return int The variant identifier, according to RFC 4122 + */ + public function getVariant() : int + { + if (\strlen($this->getBytes()) !== 16) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidBytesException('Invalid number of bytes'); + } + $parts = \unpack('n*', $this->getBytes()); + // $parts[5] is a 16-bit, unsigned integer containing the variant bits + // of the UUID. We convert this integer into a string containing a + // binary representation, padded to 16 characters. We analyze the first + // three characters (three most-significant bits) to determine the + // variant. + $binary = \str_pad(\decbin((int) $parts[5]), 16, '0', \STR_PAD_LEFT); + $msb = \substr($binary, 0, 3); + if ($msb === '111') { + $variant = \RayGlobalScoped\Ramsey\Uuid\Uuid::RESERVED_FUTURE; + } elseif ($msb === '110') { + $variant = \RayGlobalScoped\Ramsey\Uuid\Uuid::RESERVED_MICROSOFT; + } elseif (\strpos($msb, '10') === 0) { + $variant = \RayGlobalScoped\Ramsey\Uuid\Uuid::RFC_4122; + } else { + $variant = \RayGlobalScoped\Ramsey\Uuid\Uuid::RESERVED_NCS; + } + return $variant; + } +} diff --git a/build/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php b/build/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php new file mode 100644 index 0000000..3117e3b --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php @@ -0,0 +1,51 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Rfc4122; + +/** + * Provides common functionality for handling the version, as defined by RFC 4122 + * + * @psalm-immutable + */ +trait VersionTrait +{ + /** + * Returns the version + */ + public abstract function getVersion() : ?int; + /** + * Returns true if these fields represent a nil UUID + */ + public abstract function isNil() : bool; + /** + * Returns true if the version matches one of those defined by RFC 4122 + * + * @return bool True if the UUID version is valid, false otherwise + */ + private function isCorrectVersion() : bool + { + if ($this->isNil()) { + return \true; + } + switch ($this->getVersion()) { + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + return \true; + } + return \false; + } +} diff --git a/build/vendor/ramsey/uuid/src/Type/Decimal.php b/build/vendor/ramsey/uuid/src/Type/Decimal.php new file mode 100644 index 0000000..56d54d2 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Type/Decimal.php @@ -0,0 +1,92 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Type; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use function is_numeric; +/** + * A value object representing a decimal + * + * This class exists for type-safety purposes, to ensure that decimals + * returned from ramsey/uuid methods as strings are truly decimals and not some + * other kind of string. + * + * To support values as true decimals and not as floats or doubles, we store the + * decimals as strings. + * + * @psalm-immutable + */ +final class Decimal implements \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface +{ + /** + * @var string + */ + private $value; + /** + * @var bool + */ + private $isNegative = \false; + /** + * @param mixed $value The decimal value to store + */ + public function __construct($value) + { + $value = (string) $value; + if (!\is_numeric($value)) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Value must be a signed decimal or a string containing only ' . 'digits 0-9 and, optionally, a decimal point or sign (+ or -)'); + } + // Remove the leading +-symbol. + if (\strpos($value, '+') === 0) { + $value = \substr($value, 1); + } + // For cases like `-0` or `-0.0000`, convert the value to `0`. + if (\abs((float) $value) === 0.0) { + $value = '0'; + } + if (\strpos($value, '-') === 0) { + $this->isNegative = \true; + } + $this->value = $value; + } + public function isNegative() : bool + { + return $this->isNegative; + } + public function toString() : string + { + return $this->value; + } + public function __toString() : string + { + return $this->toString(); + } + public function jsonSerialize() : string + { + return $this->toString(); + } + public function serialize() : string + { + return $this->toString(); + } + /** + * Constructs the object from a serialized string representation + * + * @param string $serialized The serialized string representation of the object + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + */ + public function unserialize($serialized) : void + { + $this->__construct($serialized); + } +} diff --git a/build/vendor/ramsey/uuid/src/Type/Hexadecimal.php b/build/vendor/ramsey/uuid/src/Type/Hexadecimal.php new file mode 100644 index 0000000..940ddde --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Type/Hexadecimal.php @@ -0,0 +1,76 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Type; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use function ctype_xdigit; +use function strpos; +use function strtolower; +use function substr; +/** + * A value object representing a hexadecimal number + * + * This class exists for type-safety purposes, to ensure that hexadecimal numbers + * returned from ramsey/uuid methods as strings are truly hexadecimal and not some + * other kind of string. + * + * @psalm-immutable + */ +final class Hexadecimal implements \RayGlobalScoped\Ramsey\Uuid\Type\TypeInterface +{ + /** + * @var string + */ + private $value; + /** + * @param string $value The hexadecimal value to store + */ + public function __construct(string $value) + { + $value = \strtolower($value); + if (\strpos($value, '0x') === 0) { + $value = \substr($value, 2); + } + if (!\ctype_xdigit($value)) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Value must be a hexadecimal number'); + } + $this->value = $value; + } + public function toString() : string + { + return $this->value; + } + public function __toString() : string + { + return $this->toString(); + } + public function jsonSerialize() : string + { + return $this->toString(); + } + public function serialize() : string + { + return $this->toString(); + } + /** + * Constructs the object from a serialized string representation + * + * @param string $serialized The serialized string representation of the object + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + */ + public function unserialize($serialized) : void + { + $this->__construct($serialized); + } +} diff --git a/build/vendor/ramsey/uuid/src/Type/Integer.php b/build/vendor/ramsey/uuid/src/Type/Integer.php new file mode 100644 index 0000000..e7e0556 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Type/Integer.php @@ -0,0 +1,101 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Type; + +use RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException; +use function ctype_digit; +use function ltrim; +use function strpos; +use function substr; +/** + * A value object representing an integer + * + * This class exists for type-safety purposes, to ensure that integers + * returned from ramsey/uuid methods as strings are truly integers and not some + * other kind of string. + * + * To support large integers beyond PHP_INT_MAX and PHP_INT_MIN on both 64-bit + * and 32-bit systems, we store the integers as strings. + * + * @psalm-immutable + */ +final class Integer implements \RayGlobalScoped\Ramsey\Uuid\Type\NumberInterface +{ + /** + * @var string + */ + private $value; + /** + * @var bool + */ + private $isNegative = \false; + /** + * @param mixed $value The integer value to store + */ + public function __construct($value) + { + $value = (string) $value; + $sign = '+'; + // If the value contains a sign, remove it for ctype_digit() check. + if (\strpos($value, '-') === 0 || \strpos($value, '+') === 0) { + $sign = \substr($value, 0, 1); + $value = \substr($value, 1); + } + if (!\ctype_digit($value)) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\InvalidArgumentException('Value must be a signed integer or a string containing only ' . 'digits 0-9 and, optionally, a sign (+ or -)'); + } + // Trim any leading zeros. + $value = \ltrim($value, '0'); + // Set to zero if the string is empty after trimming zeros. + if ($value === '') { + $value = '0'; + } + // Add the negative sign back to the value. + if ($sign === '-' && $value !== '0') { + $value = $sign . $value; + $this->isNegative = \true; + } + $this->value = $value; + } + public function isNegative() : bool + { + return $this->isNegative; + } + public function toString() : string + { + return $this->value; + } + public function __toString() : string + { + return $this->toString(); + } + public function jsonSerialize() : string + { + return $this->toString(); + } + public function serialize() : string + { + return $this->toString(); + } + /** + * Constructs the object from a serialized string representation + * + * @param string $serialized The serialized string representation of the object + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + */ + public function unserialize($serialized) : void + { + $this->__construct($serialized); + } +} diff --git a/build/vendor/ramsey/uuid/src/Type/NumberInterface.php b/build/vendor/ramsey/uuid/src/Type/NumberInterface.php new file mode 100644 index 0000000..0fe6dcf --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Type/NumberInterface.php @@ -0,0 +1,26 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Type; + +/** + * NumberInterface ensures consistency in numeric values returned by ramsey/uuid + * + * @psalm-immutable + */ +interface NumberInterface extends \RayGlobalScoped\Ramsey\Uuid\Type\TypeInterface +{ + /** + * Returns true if this number is less than zero + */ + public function isNegative() : bool; +} diff --git a/build/vendor/ramsey/uuid/src/Type/Time.php b/build/vendor/ramsey/uuid/src/Type/Time.php new file mode 100644 index 0000000..adfde4c --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Type/Time.php @@ -0,0 +1,91 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Type; + +use RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use stdClass; +use function json_decode; +use function json_encode; +/** + * A value object representing a timestamp + * + * This class exists for type-safety purposes, to ensure that timestamps used + * by ramsey/uuid are truly timestamp integers and not some other kind of string + * or integer. + * + * @psalm-immutable + */ +final class Time implements \RayGlobalScoped\Ramsey\Uuid\Type\TypeInterface +{ + /** + * @var IntegerObject + */ + private $seconds; + /** + * @var IntegerObject + */ + private $microseconds; + /** + * @param mixed $seconds + * @param mixed $microseconds + */ + public function __construct($seconds, $microseconds = 0) + { + $this->seconds = new \RayGlobalScoped\Ramsey\Uuid\Type\Integer($seconds); + $this->microseconds = new \RayGlobalScoped\Ramsey\Uuid\Type\Integer($microseconds); + } + public function getSeconds() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer + { + return $this->seconds; + } + public function getMicroseconds() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer + { + return $this->microseconds; + } + public function toString() : string + { + return $this->seconds->toString() . '.' . $this->microseconds->toString(); + } + public function __toString() : string + { + return $this->toString(); + } + /** + * @return string[] + */ + public function jsonSerialize() : array + { + return ['seconds' => $this->getSeconds()->toString(), 'microseconds' => $this->getMicroseconds()->toString()]; + } + public function serialize() : string + { + return (string) \json_encode($this); + } + /** + * Constructs the object from a serialized string representation + * + * @param string $serialized The serialized string representation of the object + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + */ + public function unserialize($serialized) : void + { + /** @var stdClass $time */ + $time = \json_decode($serialized); + if (!isset($time->seconds) || !isset($time->microseconds)) { + throw new \RayGlobalScoped\Ramsey\Uuid\Exception\UnsupportedOperationException('Attempted to unserialize an invalid value'); + } + $this->__construct($time->seconds, $time->microseconds); + } +} diff --git a/build/vendor/ramsey/uuid/src/Type/TypeInterface.php b/build/vendor/ramsey/uuid/src/Type/TypeInterface.php new file mode 100644 index 0000000..ebb3401 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Type/TypeInterface.php @@ -0,0 +1,26 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Type; + +use JsonSerializable; +use Serializable; +/** + * TypeInterface ensures consistency in typed values returned by ramsey/uuid + * + * @psalm-immutable + */ +interface TypeInterface extends \JsonSerializable, \Serializable +{ + public function toString() : string; + public function __toString() : string; +} diff --git a/build/vendor/ramsey/uuid/src/Uuid.php b/build/vendor/ramsey/uuid/src/Uuid.php new file mode 100644 index 0000000..ec28d99 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Uuid.php @@ -0,0 +1,544 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +use DateTimeInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Fields\FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Lazy\LazyUuidFromString; +use RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use function bin2hex; +use function preg_match; +use function str_replace; +use function strcmp; +use function strlen; +use function strtolower; +use function substr; +/** + * Uuid provides constants and static methods for working with and generating UUIDs + * + * @psalm-immutable + */ +class Uuid implements \RayGlobalScoped\Ramsey\Uuid\UuidInterface +{ + use DeprecatedUuidMethodsTrait; + /** + * When this namespace is specified, the name string is a fully-qualified + * domain name + * + * @link http://tools.ietf.org/html/rfc4122#appendix-C RFC 4122, Appendix C: Some Name Space IDs + */ + public const NAMESPACE_DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + /** + * When this namespace is specified, the name string is a URL + * + * @link http://tools.ietf.org/html/rfc4122#appendix-C RFC 4122, Appendix C: Some Name Space IDs + */ + public const NAMESPACE_URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + /** + * When this namespace is specified, the name string is an ISO OID + * + * @link http://tools.ietf.org/html/rfc4122#appendix-C RFC 4122, Appendix C: Some Name Space IDs + */ + public const NAMESPACE_OID = '6ba7b812-9dad-11d1-80b4-00c04fd430c8'; + /** + * When this namespace is specified, the name string is an X.500 DN in DER + * or a text output format + * + * @link http://tools.ietf.org/html/rfc4122#appendix-C RFC 4122, Appendix C: Some Name Space IDs + */ + public const NAMESPACE_X500 = '6ba7b814-9dad-11d1-80b4-00c04fd430c8'; + /** + * The nil UUID is a special form of UUID that is specified to have all 128 + * bits set to zero + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.7 RFC 4122, § 4.1.7: Nil UUID + */ + public const NIL = '00000000-0000-0000-0000-000000000000'; + /** + * Variant: reserved, NCS backward compatibility + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, § 4.1.1: Variant + */ + public const RESERVED_NCS = 0; + /** + * Variant: the UUID layout specified in RFC 4122 + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, § 4.1.1: Variant + */ + public const RFC_4122 = 2; + /** + * Variant: reserved, Microsoft Corporation backward compatibility + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, § 4.1.1: Variant + */ + public const RESERVED_MICROSOFT = 6; + /** + * Variant: reserved for future definition + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, § 4.1.1: Variant + */ + public const RESERVED_FUTURE = 7; + /** + * @deprecated Use {@see ValidatorInterface::getPattern()} instead. + */ + public const VALID_PATTERN = '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$'; + /** + * Version 1 (time-based) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version + */ + public const UUID_TYPE_TIME = 1; + /** + * Version 2 (DCE Security) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version + */ + public const UUID_TYPE_DCE_SECURITY = 2; + /** + * @deprecated Use {@see Uuid::UUID_TYPE_DCE_SECURITY} instead. + */ + public const UUID_TYPE_IDENTIFIER = 2; + /** + * Version 3 (name-based and hashed with MD5) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version + */ + public const UUID_TYPE_HASH_MD5 = 3; + /** + * Version 4 (random) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version + */ + public const UUID_TYPE_RANDOM = 4; + /** + * Version 5 (name-based and hashed with SHA1) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version + */ + public const UUID_TYPE_HASH_SHA1 = 5; + /** + * Version 6 (ordered-time) UUID + * + * This is named `UUID_TYPE_PEABODY`, since the specification is still in + * draft form, and the primary author/editor's name is Brad Peabody. + * + * @link https://github.com/uuid6/uuid6-ietf-draft UUID version 6 IETF draft + * @link http://gh.peabody.io/uuidv6/ "Version 6" UUIDs + */ + public const UUID_TYPE_PEABODY = 6; + /** + * DCE Security principal domain + * + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, §11.5.1.1 + */ + public const DCE_DOMAIN_PERSON = 0; + /** + * DCE Security group domain + * + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, §11.5.1.1 + */ + public const DCE_DOMAIN_GROUP = 1; + /** + * DCE Security organization domain + * + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, §11.5.1.1 + */ + public const DCE_DOMAIN_ORG = 2; + /** + * DCE Security domain string names + * + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, §11.5.1.1 + */ + public const DCE_DOMAIN_NAMES = [self::DCE_DOMAIN_PERSON => 'person', self::DCE_DOMAIN_GROUP => 'group', self::DCE_DOMAIN_ORG => 'org']; + /** + * @var UuidFactoryInterface|null + */ + private static $factory = null; + /** + * @var bool flag to detect if the UUID factory was replaced internally, which disables all optimizations + * for the default/happy path internal scenarios + */ + private static $factoryReplaced = \false; + /** + * @var CodecInterface + */ + protected $codec; + /** + * The fields that make up this UUID + * + * @var Rfc4122FieldsInterface + */ + protected $fields; + /** + * @var NumberConverterInterface + */ + protected $numberConverter; + /** + * @var TimeConverterInterface + */ + protected $timeConverter; + /** + * Creates a universally unique identifier (UUID) from an array of fields + * + * Unless you're making advanced use of this library to generate identifiers + * that deviate from RFC 4122, you probably do not want to instantiate a + * UUID directly. Use the static methods, instead: + * + * ``` + * use Ramsey\Uuid\Uuid; + * + * $timeBasedUuid = Uuid::uuid1(); + * $namespaceMd5Uuid = Uuid::uuid3(Uuid::NAMESPACE_URL, 'http://php.net/'); + * $randomUuid = Uuid::uuid4(); + * $namespaceSha1Uuid = Uuid::uuid5(Uuid::NAMESPACE_URL, 'http://php.net/'); + * ``` + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct(\RayGlobalScoped\Ramsey\Uuid\Rfc4122\FieldsInterface $fields, \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $numberConverter, \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec, \RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface $timeConverter) + { + $this->fields = $fields; + $this->codec = $codec; + $this->numberConverter = $numberConverter; + $this->timeConverter = $timeConverter; + } + /** + * @psalm-return non-empty-string + */ + public function __toString() : string + { + return $this->toString(); + } + /** + * Converts the UUID to a string for JSON serialization + */ + public function jsonSerialize() : string + { + return $this->toString(); + } + /** + * Converts the UUID to a string for PHP serialization + */ + public function serialize() : string + { + return $this->getBytes(); + } + /** + * Re-constructs the object from its serialized form + * + * @param string $serialized The serialized PHP string to unserialize into + * a UuidInterface instance + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + */ + public function unserialize($serialized) : void + { + if (\strlen($serialized) === 16) { + /** @var Uuid $uuid */ + $uuid = self::getFactory()->fromBytes($serialized); + } else { + /** @var Uuid $uuid */ + $uuid = self::getFactory()->fromString($serialized); + } + $this->codec = $uuid->codec; + $this->numberConverter = $uuid->numberConverter; + $this->fields = $uuid->fields; + $this->timeConverter = $uuid->timeConverter; + } + public function compareTo(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $other) : int + { + $compare = \strcmp($this->toString(), $other->toString()); + if ($compare < 0) { + return -1; + } + if ($compare > 0) { + return 1; + } + return 0; + } + public function equals(?object $other) : bool + { + if (!$other instanceof \RayGlobalScoped\Ramsey\Uuid\UuidInterface) { + return \false; + } + return $this->compareTo($other) === 0; + } + /** + * @psalm-return non-empty-string + */ + public function getBytes() : string + { + return $this->codec->encodeBinary($this); + } + public function getFields() : \RayGlobalScoped\Ramsey\Uuid\Fields\FieldsInterface + { + return $this->fields; + } + public function getHex() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal(\str_replace('-', '', $this->toString())); + } + public function getInteger() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer + { + return new \RayGlobalScoped\Ramsey\Uuid\Type\Integer($this->numberConverter->fromHex($this->getHex()->toString())); + } + /** + * @psalm-return non-empty-string + */ + public function toString() : string + { + return $this->codec->encode($this); + } + /** + * Returns the factory used to create UUIDs + */ + public static function getFactory() : \RayGlobalScoped\Ramsey\Uuid\UuidFactoryInterface + { + if (self::$factory === null) { + self::$factory = new \RayGlobalScoped\Ramsey\Uuid\UuidFactory(); + } + return self::$factory; + } + /** + * Sets the factory used to create UUIDs + * + * @param UuidFactoryInterface $factory A factory that will be used by this + * class to create UUIDs + */ + public static function setFactory(\RayGlobalScoped\Ramsey\Uuid\UuidFactoryInterface $factory) : void + { + // Note: non-strict equality is intentional here. If the factory is configured differently, every assumption + // around purity is broken, and we have to internally decide everything differently. + // phpcs:ignore SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedNotEqualOperator + self::$factoryReplaced = $factory != new \RayGlobalScoped\Ramsey\Uuid\UuidFactory(); + self::$factory = $factory; + } + /** + * Creates a UUID from a byte string + * + * @param string $bytes A binary string + * + * @return UuidInterface A UuidInterface instance created from a binary + * string representation + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + * + * @psalm-suppress ImpureStaticProperty we know that the factory being replaced can lead to massive + * havoc across all consumers: that should never happen, and + * is generally to be discouraged. Until the factory is kept + * un-replaced, this method is effectively pure. + */ + public static function fromBytes(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + if (!self::$factoryReplaced && \strlen($bytes) === 16) { + $base16Uuid = \bin2hex($bytes); + // Note: we are calling `fromString` internally because we don't know if the given `$bytes` is a valid UUID + return self::fromString(\substr($base16Uuid, 0, 8) . '-' . \substr($base16Uuid, 8, 4) . '-' . \substr($base16Uuid, 12, 4) . '-' . \substr($base16Uuid, 16, 4) . '-' . \substr($base16Uuid, 20, 12)); + } + return self::getFactory()->fromBytes($bytes); + } + /** + * Creates a UUID from the string standard representation + * + * @param string $uuid A hexadecimal string + * + * @return UuidInterface A UuidInterface instance created from a hexadecimal + * string representation + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + * + * @psalm-suppress ImpureStaticProperty we know that the factory being replaced can lead to massive + * havoc across all consumers: that should never happen, and + * is generally to be discouraged. Until the factory is kept + * un-replaced, this method is effectively pure. + */ + public static function fromString(string $uuid) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + if (!self::$factoryReplaced && \preg_match(\RayGlobalScoped\Ramsey\Uuid\Lazy\LazyUuidFromString::VALID_REGEX, $uuid) === 1) { + return new \RayGlobalScoped\Ramsey\Uuid\Lazy\LazyUuidFromString(\strtolower($uuid)); + } + return self::getFactory()->fromString($uuid); + } + /** + * Creates a UUID from a DateTimeInterface instance + * + * @param DateTimeInterface $dateTime The date and time + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 1 UUID created from a DateTimeInterface instance + */ + public static function fromDateTime(\DateTimeInterface $dateTime, ?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return self::getFactory()->fromDateTime($dateTime, $node, $clockSeq); + } + /** + * Creates a UUID from a 128-bit integer string + * + * @param string $integer String representation of 128-bit integer + * + * @return UuidInterface A UuidInterface instance created from the string + * representation of a 128-bit integer + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + */ + public static function fromInteger(string $integer) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return self::getFactory()->fromInteger($integer); + } + /** + * Returns true if the provided string is a valid UUID + * + * @param string $uuid A string to validate as a UUID + * + * @return bool True if the string is a valid UUID, false otherwise + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + */ + public static function isValid(string $uuid) : bool + { + return self::getFactory()->getValidator()->validate($uuid); + } + /** + * Returns a version 1 (time-based) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|int|string|null $node A 48-bit number representing the + * hardware address; this number may be represented as an integer or a + * hexadecimal string + * @param int $clockSeq A 14-bit number used to help avoid duplicates that + * could arise when the clock is set backwards in time or if the node ID + * changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 1 UUID + */ + public static function uuid1($node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return self::getFactory()->uuid1($node, $clockSeq); + } + /** + * Returns a version 2 (DCE Security) UUID from a local domain, local + * identifier, host ID, clock sequence, and the current time + * + * @param int $localDomain The local domain to use when generating bytes, + * according to DCE Security + * @param IntegerObject|null $localIdentifier The local identifier for the + * given domain; this may be a UID or GID on POSIX systems, if the local + * domain is person or group, or it may be a site-defined identifier + * if the local domain is org + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes (in a version 2 UUID, the lower 8 bits of this number + * are replaced with the domain). + * + * @return UuidInterface A UuidInterface instance that represents a + * version 2 UUID + */ + public static function uuid2(int $localDomain, ?\RayGlobalScoped\Ramsey\Uuid\Type\Integer $localIdentifier = null, ?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return self::getFactory()->uuid2($localDomain, $localIdentifier, $node, $clockSeq); + } + /** + * Returns a version 3 (name-based) UUID based on the MD5 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to use for creating a UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 3 UUID + * + * @psalm-suppress ImpureMethodCall we know that the factory being replaced can lead to massive + * havoc across all consumers: that should never happen, and + * is generally to be discouraged. Until the factory is kept + * un-replaced, this method is effectively pure. + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + */ + public static function uuid3($ns, string $name) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return self::getFactory()->uuid3($ns, $name); + } + /** + * Returns a version 4 (random) UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 4 UUID + */ + public static function uuid4() : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return self::getFactory()->uuid4(); + } + /** + * Returns a version 5 (name-based) UUID based on the SHA-1 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to use for creating a UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 5 UUID + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + * + * @psalm-suppress ImpureMethodCall we know that the factory being replaced can lead to massive + * havoc across all consumers: that should never happen, and + * is generally to be discouraged. Until the factory is kept + * un-replaced, this method is effectively pure. + */ + public static function uuid5($ns, string $name) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return self::getFactory()->uuid5($ns, $name); + } + /** + * Returns a version 6 (ordered-time) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int $clockSeq A 14-bit number used to help avoid duplicates that + * could arise when the clock is set backwards in time or if the node ID + * changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 6 UUID + */ + public static function uuid6(?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return self::getFactory()->uuid6($node, $clockSeq); + } +} diff --git a/build/vendor/ramsey/uuid/src/UuidFactory.php b/build/vendor/ramsey/uuid/src/UuidFactory.php new file mode 100644 index 0000000..1afd3e8 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/UuidFactory.php @@ -0,0 +1,396 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +use DateTimeInterface; +use RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface; +use RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Converter\TimeConverterInterface; +use RayGlobalScoped\Ramsey\Uuid\Generator\DceSecurityGeneratorInterface; +use RayGlobalScoped\Ramsey\Uuid\Generator\DefaultTimeGenerator; +use RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorInterface; +use RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface; +use RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface; +use RayGlobalScoped\Ramsey\Uuid\Lazy\LazyUuidFromString; +use RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface; +use RayGlobalScoped\Ramsey\Uuid\Provider\Time\FixedTimeProvider; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\Type\Time; +use RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface; +use function bin2hex; +use function hex2bin; +use function pack; +use function str_pad; +use function strtolower; +use function substr; +use function substr_replace; +use function unpack; +use const STR_PAD_LEFT; +class UuidFactory implements \RayGlobalScoped\Ramsey\Uuid\UuidFactoryInterface +{ + /** + * @var CodecInterface + */ + private $codec; + /** + * @var DceSecurityGeneratorInterface + */ + private $dceSecurityGenerator; + /** + * @var NameGeneratorInterface + */ + private $nameGenerator; + /** + * @var NodeProviderInterface + */ + private $nodeProvider; + /** + * @var NumberConverterInterface + */ + private $numberConverter; + /** + * @var RandomGeneratorInterface + */ + private $randomGenerator; + /** + * @var TimeConverterInterface + */ + private $timeConverter; + /** + * @var TimeGeneratorInterface + */ + private $timeGenerator; + /** + * @var UuidBuilderInterface + */ + private $uuidBuilder; + /** + * @var ValidatorInterface + */ + private $validator; + /** @var bool whether the feature set was provided from outside, or we can operate under "default" assumptions */ + private $isDefaultFeatureSet; + /** + * @param FeatureSet $features A set of available features in the current environment + */ + public function __construct(?\RayGlobalScoped\Ramsey\Uuid\FeatureSet $features = null) + { + $this->isDefaultFeatureSet = $features === null; + $features = $features ?: new \RayGlobalScoped\Ramsey\Uuid\FeatureSet(); + $this->codec = $features->getCodec(); + $this->dceSecurityGenerator = $features->getDceSecurityGenerator(); + $this->nameGenerator = $features->getNameGenerator(); + $this->nodeProvider = $features->getNodeProvider(); + $this->numberConverter = $features->getNumberConverter(); + $this->randomGenerator = $features->getRandomGenerator(); + $this->timeConverter = $features->getTimeConverter(); + $this->timeGenerator = $features->getTimeGenerator(); + $this->uuidBuilder = $features->getBuilder(); + $this->validator = $features->getValidator(); + } + /** + * Returns the codec used by this factory + */ + public function getCodec() : \RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface + { + return $this->codec; + } + /** + * Sets the codec to use for this factory + * + * @param CodecInterface $codec A UUID encoder-decoder + */ + public function setCodec(\RayGlobalScoped\Ramsey\Uuid\Codec\CodecInterface $codec) : void + { + $this->isDefaultFeatureSet = \false; + $this->codec = $codec; + } + /** + * Returns the name generator used by this factory + */ + public function getNameGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorInterface + { + return $this->nameGenerator; + } + /** + * Sets the name generator to use for this factory + * + * @param NameGeneratorInterface $nameGenerator A generator to generate + * binary data, based on a namespace and name + */ + public function setNameGenerator(\RayGlobalScoped\Ramsey\Uuid\Generator\NameGeneratorInterface $nameGenerator) : void + { + $this->isDefaultFeatureSet = \false; + $this->nameGenerator = $nameGenerator; + } + /** + * Returns the node provider used by this factory + */ + public function getNodeProvider() : \RayGlobalScoped\Ramsey\Uuid\Provider\NodeProviderInterface + { + return $this->nodeProvider; + } + /** + * Returns the random generator used by this factory + */ + public function getRandomGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface + { + return $this->randomGenerator; + } + /** + * Returns the time generator used by this factory + */ + public function getTimeGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface + { + return $this->timeGenerator; + } + /** + * Sets the time generator to use for this factory + * + * @param TimeGeneratorInterface $generator A generator to generate binary + * data, based on the time + */ + public function setTimeGenerator(\RayGlobalScoped\Ramsey\Uuid\Generator\TimeGeneratorInterface $generator) : void + { + $this->isDefaultFeatureSet = \false; + $this->timeGenerator = $generator; + } + /** + * Returns the DCE Security generator used by this factory + */ + public function getDceSecurityGenerator() : \RayGlobalScoped\Ramsey\Uuid\Generator\DceSecurityGeneratorInterface + { + return $this->dceSecurityGenerator; + } + /** + * Sets the DCE Security generator to use for this factory + * + * @param DceSecurityGeneratorInterface $generator A generator to generate + * binary data, based on a local domain and local identifier + */ + public function setDceSecurityGenerator(\RayGlobalScoped\Ramsey\Uuid\Generator\DceSecurityGeneratorInterface $generator) : void + { + $this->isDefaultFeatureSet = \false; + $this->dceSecurityGenerator = $generator; + } + /** + * Returns the number converter used by this factory + */ + public function getNumberConverter() : \RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface + { + return $this->numberConverter; + } + /** + * Sets the random generator to use for this factory + * + * @param RandomGeneratorInterface $generator A generator to generate binary + * data, based on some random input + */ + public function setRandomGenerator(\RayGlobalScoped\Ramsey\Uuid\Generator\RandomGeneratorInterface $generator) : void + { + $this->isDefaultFeatureSet = \false; + $this->randomGenerator = $generator; + } + /** + * Sets the number converter to use for this factory + * + * @param NumberConverterInterface $converter A converter to use for working + * with large integers (i.e. integers greater than PHP_INT_MAX) + */ + public function setNumberConverter(\RayGlobalScoped\Ramsey\Uuid\Converter\NumberConverterInterface $converter) : void + { + $this->isDefaultFeatureSet = \false; + $this->numberConverter = $converter; + } + /** + * Returns the UUID builder used by this factory + */ + public function getUuidBuilder() : \RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface + { + return $this->uuidBuilder; + } + /** + * Sets the UUID builder to use for this factory + * + * @param UuidBuilderInterface $builder A builder for constructing instances + * of UuidInterface + */ + public function setUuidBuilder(\RayGlobalScoped\Ramsey\Uuid\Builder\UuidBuilderInterface $builder) : void + { + $this->isDefaultFeatureSet = \false; + $this->uuidBuilder = $builder; + } + /** + * @psalm-mutation-free + */ + public function getValidator() : \RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface + { + return $this->validator; + } + /** + * Sets the validator to use for this factory + * + * @param ValidatorInterface $validator A validator to use for validating + * whether a string is a valid UUID + */ + public function setValidator(\RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface $validator) : void + { + $this->isDefaultFeatureSet = \false; + $this->validator = $validator; + } + /** + * @psalm-pure + */ + public function fromBytes(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return $this->codec->decodeBytes($bytes); + } + /** + * @psalm-pure + */ + public function fromString(string $uuid) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $uuid = \strtolower($uuid); + return $this->codec->decode($uuid); + } + /** + * @psalm-pure + */ + public function fromInteger(string $integer) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $hex = $this->numberConverter->toHex($integer); + $hex = \str_pad($hex, 32, '0', \STR_PAD_LEFT); + return $this->fromString($hex); + } + public function fromDateTime(\DateTimeInterface $dateTime, ?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $timeProvider = new \RayGlobalScoped\Ramsey\Uuid\Provider\Time\FixedTimeProvider(new \RayGlobalScoped\Ramsey\Uuid\Type\Time($dateTime->format('U'), $dateTime->format('u'))); + $timeGenerator = new \RayGlobalScoped\Ramsey\Uuid\Generator\DefaultTimeGenerator($this->nodeProvider, $this->timeConverter, $timeProvider); + $nodeHex = $node ? $node->toString() : null; + $bytes = $timeGenerator->generate($nodeHex, $clockSeq); + return $this->uuidFromBytesAndVersion($bytes, 1); + } + /** + * @inheritDoc + */ + public function uuid1($node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $bytes = $this->timeGenerator->generate($node, $clockSeq); + return $this->uuidFromBytesAndVersion($bytes, 1); + } + public function uuid2(int $localDomain, ?\RayGlobalScoped\Ramsey\Uuid\Type\Integer $localIdentifier = null, ?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $bytes = $this->dceSecurityGenerator->generate($localDomain, $localIdentifier, $node, $clockSeq); + return $this->uuidFromBytesAndVersion($bytes, 2); + } + /** + * @inheritDoc + * @psalm-pure + */ + public function uuid3($ns, string $name) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return $this->uuidFromNsAndName($ns, $name, 3, 'md5'); + } + public function uuid4() : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $bytes = $this->randomGenerator->generate(16); + return $this->uuidFromBytesAndVersion($bytes, 4); + } + /** + * @inheritDoc + * @psalm-pure + */ + public function uuid5($ns, string $name) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return $this->uuidFromNsAndName($ns, $name, 5, 'sha1'); + } + public function uuid6(?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $nodeHex = $node ? $node->toString() : null; + $bytes = $this->timeGenerator->generate($nodeHex, $clockSeq); + // Rearrange the bytes, according to the UUID version 6 specification. + $v6 = $bytes[6] . $bytes[7] . $bytes[4] . $bytes[5] . $bytes[0] . $bytes[1] . $bytes[2] . $bytes[3]; + $v6 = \bin2hex($v6); + // Drop the first four bits, while adding an empty four bits for the + // version field. This allows us to reconstruct the correct time from + // the bytes of this UUID. + $v6Bytes = \hex2bin(\substr($v6, 1, 12) . '0' . \substr($v6, -3)); + $v6Bytes .= \substr($bytes, 8); + return $this->uuidFromBytesAndVersion($v6Bytes, 6); + } + /** + * Returns a Uuid created from the provided byte string + * + * Uses the configured builder and codec and the provided byte string to + * construct a Uuid object. + * + * @param string $bytes The byte string from which to construct a UUID + * + * @return UuidInterface An instance of UuidInterface, created from the + * provided bytes + * + * @psalm-pure + */ + public function uuid(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + return $this->uuidBuilder->build($this->codec, $bytes); + } + /** + * Returns a version 3 or 5 namespaced Uuid + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to hash together with the namespace + * @param int $version The version of UUID to create (3 or 5) + * @param string $hashAlgorithm The hashing algorithm to use when hashing + * together the namespace and name + * + * @return UuidInterface An instance of UuidInterface, created by hashing + * together the provided namespace and name + * + * @psalm-pure + */ + private function uuidFromNsAndName($ns, string $name, int $version, string $hashAlgorithm) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + if (!$ns instanceof \RayGlobalScoped\Ramsey\Uuid\UuidInterface) { + $ns = $this->fromString($ns); + } + $bytes = $this->nameGenerator->generate($ns, $name, $hashAlgorithm); + return $this->uuidFromBytesAndVersion(\substr($bytes, 0, 16), $version); + } + /** + * Returns an RFC 4122 variant Uuid, created from the provided bytes and version + * + * @param string $bytes The byte string to convert to a UUID + * @param int $version The RFC 4122 version to apply to the UUID + * + * @return UuidInterface An instance of UuidInterface, created from the + * byte string and version + * + * @psalm-pure + */ + private function uuidFromBytesAndVersion(string $bytes, int $version) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface + { + $timeHi = (int) \unpack('n*', \substr($bytes, 6, 2))[1]; + $timeHiAndVersion = \pack('n*', \RayGlobalScoped\Ramsey\Uuid\BinaryUtils::applyVersion($timeHi, $version)); + $clockSeqHi = (int) \unpack('n*', \substr($bytes, 8, 2))[1]; + $clockSeqHiAndReserved = \pack('n*', \RayGlobalScoped\Ramsey\Uuid\BinaryUtils::applyVariant($clockSeqHi)); + $bytes = \substr_replace($bytes, $timeHiAndVersion, 6, 2); + $bytes = \substr_replace($bytes, $clockSeqHiAndReserved, 8, 2); + if ($this->isDefaultFeatureSet) { + return \RayGlobalScoped\Ramsey\Uuid\Lazy\LazyUuidFromString::fromBytes($bytes); + } + return $this->uuid($bytes); + } +} diff --git a/build/vendor/ramsey/uuid/src/UuidFactoryInterface.php b/build/vendor/ramsey/uuid/src/UuidFactoryInterface.php new file mode 100644 index 0000000..b4d95eb --- /dev/null +++ b/build/vendor/ramsey/uuid/src/UuidFactoryInterface.php @@ -0,0 +1,160 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +use DateTimeInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface; +/** + * UuidFactoryInterface defines common functionality all `UuidFactory` instances + * must implement + */ +interface UuidFactoryInterface +{ + /** + * Returns the validator to use for the factory + * + * @psalm-mutation-free + */ + public function getValidator() : \RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface; + /** + * Returns a version 1 (time-based) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|int|string|null $node A 48-bit number representing the + * hardware address; this number may be represented as an integer or a + * hexadecimal string + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 1 UUID + */ + public function uuid1($node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Returns a version 2 (DCE Security) UUID from a local domain, local + * identifier, host ID, clock sequence, and the current time + * + * @param int $localDomain The local domain to use when generating bytes, + * according to DCE Security + * @param IntegerObject|null $localIdentifier The local identifier for the + * given domain; this may be a UID or GID on POSIX systems, if the local + * domain is person or group, or it may be a site-defined identifier + * if the local domain is org + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 2 UUID + */ + public function uuid2(int $localDomain, ?\RayGlobalScoped\Ramsey\Uuid\Type\Integer $localIdentifier = null, ?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Returns a version 3 (name-based) UUID based on the MD5 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to use for creating a UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 3 UUID + * + * @psalm-pure + */ + public function uuid3($ns, string $name) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Returns a version 4 (random) UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 4 UUID + */ + public function uuid4() : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Returns a version 5 (name-based) UUID based on the SHA-1 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to use for creating a UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 5 UUID + * + * @psalm-pure + */ + public function uuid5($ns, string $name) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Returns a version 6 (ordered-time) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 6 UUID + */ + public function uuid6(?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Creates a UUID from a byte string + * + * @param string $bytes A binary string + * + * @return UuidInterface A UuidInterface instance created from a binary + * string representation + * + * @psalm-pure + */ + public function fromBytes(string $bytes) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Creates a UUID from the string standard representation + * + * @param string $uuid A hexadecimal string + * + * @return UuidInterface A UuidInterface instance created from a hexadecimal + * string representation + * + * @psalm-pure + */ + public function fromString(string $uuid) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Creates a UUID from a 128-bit integer string + * + * @param string $integer String representation of 128-bit integer + * + * @return UuidInterface A UuidInterface instance created from the string + * representation of a 128-bit integer + * + * @psalm-pure + */ + public function fromInteger(string $integer) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; + /** + * Creates a UUID from a DateTimeInterface instance + * + * @param DateTimeInterface $dateTime The date and time + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 1 UUID created from a DateTimeInterface instance + */ + public function fromDateTime(\DateTimeInterface $dateTime, ?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : \RayGlobalScoped\Ramsey\Uuid\UuidInterface; +} diff --git a/build/vendor/ramsey/uuid/src/UuidInterface.php b/build/vendor/ramsey/uuid/src/UuidInterface.php new file mode 100644 index 0000000..f129eb7 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/UuidInterface.php @@ -0,0 +1,86 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +use JsonSerializable; +use RayGlobalScoped\Ramsey\Uuid\Fields\FieldsInterface; +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +use Serializable; +/** + * A UUID is a universally unique identifier adhering to an agreed-upon + * representation format and standard for generation + * + * @psalm-immutable + */ +interface UuidInterface extends \RayGlobalScoped\Ramsey\Uuid\DeprecatedUuidInterface, \JsonSerializable, \Serializable +{ + /** + * Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than + * the other UUID + * + * The first of two UUIDs is greater than the second if the most + * significant field in which the UUIDs differ is greater for the first + * UUID. + * + * * Q. What's the value of being able to sort UUIDs? + * * A. Use them as keys in a B-Tree or similar mapping. + * + * @param UuidInterface $other The UUID to compare + * + * @return int -1, 0, or 1 if the UUID is less than, equal to, or greater than $other + */ + public function compareTo(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $other) : int; + /** + * Returns true if the UUID is equal to the provided object + * + * The result is true if and only if the argument is not null, is a UUID + * object, has the same variant, and contains the same value, bit for bit, + * as the UUID. + * + * @param object|null $other An object to test for equality with this UUID + * + * @return bool True if the other object is equal to this UUID + */ + public function equals(?object $other) : bool; + /** + * Returns the binary string representation of the UUID + * + * @psalm-return non-empty-string + */ + public function getBytes() : string; + /** + * Returns the fields that comprise this UUID + */ + public function getFields() : \RayGlobalScoped\Ramsey\Uuid\Fields\FieldsInterface; + /** + * Returns the hexadecimal representation of the UUID + */ + public function getHex() : \RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; + /** + * Returns the integer representation of the UUID + */ + public function getInteger() : \RayGlobalScoped\Ramsey\Uuid\Type\Integer; + /** + * Returns the string standard representation of the UUID + * + * @psalm-return non-empty-string + */ + public function toString() : string; + /** + * Casts the UUID to the string standard representation + * + * @psalm-return non-empty-string + */ + public function __toString() : string; +} diff --git a/build/vendor/ramsey/uuid/src/Validator/GenericValidator.php b/build/vendor/ramsey/uuid/src/Validator/GenericValidator.php new file mode 100644 index 0000000..5754e79 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Validator/GenericValidator.php @@ -0,0 +1,43 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Validator; + +use RayGlobalScoped\Ramsey\Uuid\Uuid; +use function preg_match; +use function str_replace; +/** + * GenericValidator validates strings as UUIDs of any variant + * + * @psalm-immutable + */ +final class GenericValidator implements \RayGlobalScoped\Ramsey\Uuid\Validator\ValidatorInterface +{ + /** + * Regular expression pattern for matching a UUID of any variant. + */ + private const VALID_PATTERN = '\\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\z'; + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function getPattern() : string + { + return self::VALID_PATTERN; + } + public function validate(string $uuid) : bool + { + $uuid = \str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid); + return $uuid === \RayGlobalScoped\Ramsey\Uuid\Uuid::NIL || \preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); + } +} diff --git a/build/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php b/build/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php new file mode 100644 index 0000000..7187da1 --- /dev/null +++ b/build/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php @@ -0,0 +1,38 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid\Validator; + +/** + * A validator validates a string as a proper UUID + * + * @psalm-immutable + */ +interface ValidatorInterface +{ + /** + * Returns the regular expression pattern used by this validator + * + * @return string The regular expression pattern this validator uses + * + * @psalm-return non-empty-string + */ + public function getPattern() : string; + /** + * Returns true if the provided string represents a UUID + * + * @param string $uuid The string to validate as a UUID + * + * @return bool True if the string is a valid UUID, false otherwise + */ + public function validate(string $uuid) : bool; +} diff --git a/build/vendor/ramsey/uuid/src/functions.php b/build/vendor/ramsey/uuid/src/functions.php new file mode 100644 index 0000000..5ac59ca --- /dev/null +++ b/build/vendor/ramsey/uuid/src/functions.php @@ -0,0 +1,105 @@ + + * @license http://opensource.org/licenses/MIT MIT + * phpcs:disable Squiz.Functions.GlobalFunction + */ +declare (strict_types=1); +namespace RayGlobalScoped\Ramsey\Uuid; + +use RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal; +use RayGlobalScoped\Ramsey\Uuid\Type\Integer as IntegerObject; +/** + * Returns a version 1 (time-based) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|int|string|null $node A 48-bit number representing the + * hardware address; this number may be represented as an integer or a + * hexadecimal string + * @param int $clockSeq A 14-bit number used to help avoid duplicates that + * could arise when the clock is set backwards in time or if the node ID + * changes + * + * @return string Version 1 UUID as a string + */ +function v1($node = null, ?int $clockSeq = null) : string +{ + return \RayGlobalScoped\Ramsey\Uuid\Uuid::uuid1($node, $clockSeq)->toString(); +} +/** + * Returns a version 2 (DCE Security) UUID from a local domain, local + * identifier, host ID, clock sequence, and the current time + * + * @param int $localDomain The local domain to use when generating bytes, + * according to DCE Security + * @param IntegerObject|null $localIdentifier The local identifier for the + * given domain; this may be a UID or GID on POSIX systems, if the local + * domain is person or group, or it may be a site-defined identifier + * if the local domain is org + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return string Version 2 UUID as a string + */ +function v2(int $localDomain, ?\RayGlobalScoped\Ramsey\Uuid\Type\Integer $localIdentifier = null, ?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : string +{ + return \RayGlobalScoped\Ramsey\Uuid\Uuid::uuid2($localDomain, $localIdentifier, $node, $clockSeq)->toString(); +} +/** + * Returns a version 3 (name-based) UUID based on the MD5 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * + * @return string Version 3 UUID as a string + */ +function v3($ns, string $name) : string +{ + return \RayGlobalScoped\Ramsey\Uuid\Uuid::uuid3($ns, $name)->toString(); +} +/** + * Returns a version 4 (random) UUID + * + * @return string Version 4 UUID as a string + */ +function v4() : string +{ + return \RayGlobalScoped\Ramsey\Uuid\Uuid::uuid4()->toString(); +} +/** + * Returns a version 5 (name-based) UUID based on the SHA-1 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * + * @return string Version 5 UUID as a string + */ +function v5($ns, string $name) : string +{ + return \RayGlobalScoped\Ramsey\Uuid\Uuid::uuid5($ns, $name)->toString(); +} +/** + * Returns a version 6 (ordered-time) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int $clockSeq A 14-bit number used to help avoid duplicates that + * could arise when the clock is set backwards in time or if the node ID + * changes + * + * @return string Version 6 UUID as a string + */ +function v6(?\RayGlobalScoped\Ramsey\Uuid\Type\Hexadecimal $node = null, ?int $clockSeq = null) : string +{ + return \RayGlobalScoped\Ramsey\Uuid\Uuid::uuid6($node, $clockSeq)->toString(); +} diff --git a/build/vendor/scoper-autoload.php b/build/vendor/scoper-autoload.php new file mode 100644 index 0000000..e42b5de --- /dev/null +++ b/build/vendor/scoper-autoload.php @@ -0,0 +1,20 @@ +forThrowable($throwable); + } + protected function forThrowable(\Throwable $throwable) : self + { + $this->throwable = $throwable; + return $this; + } + public function withArguments() : self + { + $this->withArguments = \true; + return $this; + } + public function withObject() : self + { + $this->withObject = \true; + return $this; + } + public function applicationPath(string $applicationPath) : self + { + $this->applicationPath = $applicationPath; + return $this; + } + public function offset(int $offset) : self + { + $this->offset = $offset; + return $this; + } + public function limit(int $limit) : self + { + $this->limit = $limit; + return $this; + } + public function startingFromFrame(\Closure $startingFromFrameClosure) + { + $this->startingFromFrameClosure = $startingFromFrameClosure; + return $this; + } + public function frames() : array + { + $rawFrames = $this->getRawFrames(); + return $this->toFrameObjects($rawFrames); + } + protected function getRawFrames() : array + { + if ($this->throwable) { + return $this->throwable->getTrace(); + } + $options = null; + if (!$this->withArguments) { + $options = $options | \DEBUG_BACKTRACE_IGNORE_ARGS; + } + if ($this->withObject()) { + $options = $options | \DEBUG_BACKTRACE_PROVIDE_OBJECT; + } + $limit = $this->limit; + if ($limit !== 0) { + $limit += 3; + } + return \debug_backtrace($options, $limit); + } + protected function toFrameObjects(array $rawFrames) : array + { + $currentFile = $this->throwable ? $this->throwable->getFile() : ''; + $currentLine = $this->throwable ? $this->throwable->getLine() : 0; + $frames = []; + foreach ($rawFrames as $rawFrame) { + $frames[] = new \RayGlobalScoped\Spatie\Backtrace\Frame($currentFile, $currentLine, $rawFrame['args'] ?? null, $rawFrame['function'] ?? null, $rawFrame['class'] ?? null, $this->isApplicationFrame($currentFile)); + $currentFile = $rawFrame['file'] ?? 'unknown'; + $currentLine = $rawFrame['line'] ?? 0; + } + $frames[] = new \RayGlobalScoped\Spatie\Backtrace\Frame($currentFile, $currentLine, [], '[top]'); + $frames = $this->removeBacktracePackageFrames($frames); + if ($closure = $this->startingFromFrameClosure) { + $frames = $this->startAtFrameFromClosure($frames, $closure); + } + $frames = \array_slice($frames, $this->offset, $this->limit === 0 ? \PHP_INT_MAX : $this->limit); + return \array_values($frames); + } + protected function isApplicationFrame(string $frameFilename) : bool + { + $relativeFile = \str_replace('\\', \DIRECTORY_SEPARATOR, $frameFilename); + if (!empty($this->applicationPath)) { + $relativeFile = \array_reverse(\explode($this->applicationPath ?? '', $frameFilename, 2))[0]; + } + if (\strpos($relativeFile, \DIRECTORY_SEPARATOR . 'vendor') === 0) { + return \false; + } + return \true; + } + protected function removeBacktracePackageFrames(array $frames) : array + { + return $this->startAtFrameFromClosure($frames, function (\RayGlobalScoped\Spatie\Backtrace\Frame $frame) { + return $frame->class !== static::class; + }); + } + /** + * @param \Spatie\Backtrace\Frame[] $frames + * @param \Closure $closure + * + * @return array + */ + protected function startAtFrameFromClosure(array $frames, \Closure $closure) : array + { + foreach ($frames as $i => $frame) { + $foundStartingFrame = $closure($frame); + if ($foundStartingFrame) { + return $frames; + } + unset($frames[$i]); + } + return $frames; + } +} diff --git a/build/vendor/spatie/backtrace/src/CodeSnippet.php b/build/vendor/spatie/backtrace/src/CodeSnippet.php new file mode 100644 index 0000000..a1f31c0 --- /dev/null +++ b/build/vendor/spatie/backtrace/src/CodeSnippet.php @@ -0,0 +1,53 @@ +surroundingLine = $surroundingLine; + return $this; + } + public function snippetLineCount(int $snippetLineCount) : self + { + $this->snippetLineCount = $snippetLineCount; + return $this; + } + public function get(string $fileName) : array + { + if (!\file_exists($fileName)) { + return []; + } + try { + $file = new \RayGlobalScoped\Spatie\Backtrace\File($fileName); + [$startLineNumber, $endLineNumber] = $this->getBounds($file->numberOfLines()); + $code = []; + $line = $file->getLine($startLineNumber); + $currentLineNumber = $startLineNumber; + while ($currentLineNumber <= $endLineNumber) { + $code[$currentLineNumber] = \rtrim(\substr($line, 0, 250)); + $line = $file->getNextLine(); + $currentLineNumber++; + } + return $code; + } catch (\RuntimeException $exception) { + return []; + } + } + protected function getBounds(int $totalNumberOfLineInFile) : array + { + $startLine = \max($this->surroundingLine - \floor($this->snippetLineCount / 2), 1); + $endLine = $startLine + ($this->snippetLineCount - 1); + if ($endLine > $totalNumberOfLineInFile) { + $endLine = $totalNumberOfLineInFile; + $startLine = \max($endLine - ($this->snippetLineCount - 1), 1); + } + return [$startLine, $endLine]; + } +} diff --git a/build/vendor/spatie/backtrace/src/File.php b/build/vendor/spatie/backtrace/src/File.php new file mode 100644 index 0000000..daad325 --- /dev/null +++ b/build/vendor/spatie/backtrace/src/File.php @@ -0,0 +1,32 @@ +file = new \SplFileObject($path); + } + public function numberOfLines() : int + { + $this->file->seek(\PHP_INT_MAX); + return $this->file->key() + 1; + } + public function getLine(int $lineNumber = null) : string + { + if (\is_null($lineNumber)) { + return $this->getNextLine(); + } + $this->file->seek($lineNumber - 1); + return $this->file->current(); + } + public function getNextLine() : string + { + $this->file->next(); + return $this->file->current(); + } +} diff --git a/build/vendor/spatie/backtrace/src/Frame.php b/build/vendor/spatie/backtrace/src/Frame.php new file mode 100644 index 0000000..0c7a1e6 --- /dev/null +++ b/build/vendor/spatie/backtrace/src/Frame.php @@ -0,0 +1,39 @@ +file = $file; + $this->lineNumber = $lineNumber; + $this->arguments = $arguments; + $this->method = $method; + $this->class = $class; + $this->applicationFrame = $isApplicationFrame; + } + public function getSnippet(int $lineCount) : array + { + return (new \RayGlobalScoped\Spatie\Backtrace\CodeSnippet())->surroundingLine($this->lineNumber)->snippetLineCount($lineCount)->get($this->file); + } + public function getSnippetProperties(int $lineCount) : array + { + $snippet = $this->getSnippet($lineCount); + return \array_map(function (int $lineNumber) use($snippet) { + return ['line_number' => $lineNumber, 'text' => $snippet[$lineNumber]]; + }, \array_keys($snippet)); + } +} diff --git a/build/vendor/spatie/macroable/src/Macroable.php b/build/vendor/spatie/macroable/src/Macroable.php new file mode 100644 index 0000000..7156a02 --- /dev/null +++ b/build/vendor/spatie/macroable/src/Macroable.php @@ -0,0 +1,61 @@ +getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED); + foreach ($methods as $method) { + $method->setAccessible(\true); + static::macro($method->name, $method->invoke($mixin)); + } + } + public static function hasMacro(string $name) : bool + { + return isset(static::$macros[$name]); + } + public static function __callStatic($method, $parameters) + { + if (!static::hasMacro($method)) { + throw new \BadMethodCallException("Method {$method} does not exist."); + } + $macro = static::$macros[$method]; + if ($macro instanceof \Closure) { + return \call_user_func_array(\Closure::bind($macro, null, static::class), $parameters); + } + return \call_user_func_array($macro, $parameters); + } + public function __call($method, $parameters) + { + if (!static::hasMacro($method)) { + throw new \BadMethodCallException("Method {$method} does not exist."); + } + $macro = static::$macros[$method]; + if ($macro instanceof \Closure) { + return \call_user_func_array($macro->bindTo($this, static::class), $parameters); + } + return \call_user_func_array($macro, $parameters); + } +} diff --git a/build/vendor/spatie/ray/rector.php b/build/vendor/spatie/ray/rector.php new file mode 100644 index 0000000..3ac5451 --- /dev/null +++ b/build/vendor/spatie/ray/rector.php @@ -0,0 +1,19 @@ +parameters(); + // Define what rule sets will be applied + $parameters->set(\RayGlobalScoped\Rector\Core\Configuration\Option::SETS, ['/../../../../config/set/downgrade-php73.php']); + // get services (needed for register a single rule) + // $services = $containerConfigurator->services(); + // register a single rule + // $services->set(TypedPropertyRector::class); +}; diff --git a/build/vendor/spatie/ray/src/ArgumentConverter.php b/build/vendor/spatie/ray/src/ArgumentConverter.php new file mode 100644 index 0000000..71ac850 --- /dev/null +++ b/build/vendor/spatie/ray/src/ArgumentConverter.php @@ -0,0 +1,28 @@ +cloneVar($argument); + return $dumper->dump($clonedArgument, \true); + } +} diff --git a/build/vendor/spatie/ray/src/Client.php b/build/vendor/spatie/ray/src/Client.php new file mode 100644 index 0000000..c9ec3b1 --- /dev/null +++ b/build/vendor/spatie/ray/src/Client.php @@ -0,0 +1,121 @@ +fingerprint = $host . ':' . $portNumber; + $this->portNumber = $portNumber; + $this->host = $host; + } + public function serverIsAvailable() : bool + { + // purge expired entries from the cache + static::$cache = \array_filter(static::$cache, function ($data) { + return \microtime(\true) < $data[1]; + }); + if (!isset(static::$cache[$this->fingerprint])) { + $this->performAvailabilityCheck(); + } + return static::$cache[$this->fingerprint][0] ?? \true; + } + public function performAvailabilityCheck() : bool + { + try { + $curlHandle = $this->getCurlHandleForUrl('get', '_availability_check'); + \curl_exec($curlHandle); + $success = \curl_errno($curlHandle) === \CURLE_HTTP_NOT_FOUND; + // expire the cache entry after 30 sec + $expiresAt = \microtime(\true) + 30.0; + static::$cache[$this->fingerprint] = [$success, $expiresAt]; + } finally { + \curl_close($curlHandle); + return $success; + } + } + public function send(\RayGlobalScoped\Spatie\Ray\Request $request) : void + { + if (!$this->serverIsAvailable()) { + return; + } + try { + $curlHandle = $this->getCurlHandleForUrl('get', ''); + $curlError = null; + \curl_setopt($curlHandle, \CURLOPT_POSTFIELDS, $request->toJson()); + \curl_exec($curlHandle); + if (\curl_errno($curlHandle)) { + $curlError = \curl_error($curlHandle); + } + if ($curlError) { + // do nothing for now + } + } finally { + \curl_close($curlHandle); + } + } + public function lockExists(string $lockName) : bool + { + if (!$this->serverIsAvailable()) { + return \false; + } + $curlHandle = $this->getCurlHandleForUrl('get', "locks/{$lockName}"); + $curlError = null; + try { + $curlResult = \curl_exec($curlHandle); + if (\curl_errno($curlHandle)) { + $curlError = \curl_error($curlHandle); + } + if ($curlError) { + throw new \Exception(); + } + if (!$curlResult) { + return \false; + } + $response = \json_decode($curlResult, \true); + if ($response['stop_execution'] ?? \false) { + throw \RayGlobalScoped\Spatie\Ray\Exceptions\StopExecutionRequested::make(); + } + return $response['active'] ?? \false; + } catch (\Exception $exception) { + if ($exception instanceof \RayGlobalScoped\Spatie\Ray\Exceptions\StopExecutionRequested) { + throw $exception; + } + } finally { + \curl_close($curlHandle); + } + return \false; + } + protected function getCurlHandleForUrl(string $method, string $url) + { + return $this->getCurlHandle($method, "http://{$this->host}:{$this->portNumber}/{$url}"); + } + protected function getCurlHandle(string $method, string $fullUrl) + { + $curlHandle = \curl_init(); + \curl_setopt($curlHandle, \CURLOPT_URL, $fullUrl); + \curl_setopt($curlHandle, \CURLOPT_HTTPHEADER, \array_merge(['Accept: application/json', 'Content-Type: application/json'])); + \curl_setopt($curlHandle, \CURLOPT_USERAGENT, 'Ray 1.0'); + \curl_setopt($curlHandle, \CURLOPT_RETURNTRANSFER, \true); + \curl_setopt($curlHandle, \CURLOPT_TIMEOUT, 2); + \curl_setopt($curlHandle, \CURLOPT_SSL_VERIFYPEER, \true); + \curl_setopt($curlHandle, \CURLOPT_HTTP_VERSION, \CURL_HTTP_VERSION_1_1); + \curl_setopt($curlHandle, \CURLOPT_ENCODING, ''); + \curl_setopt($curlHandle, \CURLINFO_HEADER_OUT, \true); + \curl_setopt($curlHandle, \CURLOPT_FAILONERROR, \true); + if ($method === 'post') { + \curl_setopt($curlHandle, \CURLOPT_POST, \true); + } + return $curlHandle; + } +} diff --git a/build/vendor/spatie/ray/src/Concerns/RayColors.php b/build/vendor/spatie/ray/src/Concerns/RayColors.php new file mode 100644 index 0000000..253f0ec --- /dev/null +++ b/build/vendor/spatie/ray/src/Concerns/RayColors.php @@ -0,0 +1,32 @@ +color('green'); + } + public function orange() : self + { + return $this->color('orange'); + } + public function red() : self + { + return $this->color('red'); + } + public function purple() : self + { + return $this->color('purple'); + } + public function blue() : self + { + return $this->color('blue'); + } + public function gray() : self + { + return $this->color('gray'); + } +} diff --git a/build/vendor/spatie/ray/src/Concerns/RaySizes.php b/build/vendor/spatie/ray/src/Concerns/RaySizes.php new file mode 100644 index 0000000..4e49aaa --- /dev/null +++ b/build/vendor/spatie/ray/src/Concerns/RaySizes.php @@ -0,0 +1,16 @@ +size('sm'); + } + public function large() : self + { + return $this->size('lg'); + } +} diff --git a/build/vendor/spatie/ray/src/Concerns/RemovesRayFrames.php b/build/vendor/spatie/ray/src/Concerns/RemovesRayFrames.php new file mode 100644 index 0000000..bcc7fce --- /dev/null +++ b/build/vendor/spatie/ray/src/Concerns/RemovesRayFrames.php @@ -0,0 +1,28 @@ +isRayFrame($frame); + }); + return \array_values($frames); + } + protected function isRayFrame(\RayGlobalScoped\Spatie\Backtrace\Frame $frame) : bool + { + foreach ($this->rayNamespaces() as $rayNamespace) { + if (\substr($frame->class, 0, \strlen($rayNamespace)) === $rayNamespace) { + return \true; + } + } + return \false; + } + protected function rayNamespaces() : array + { + return ['RayGlobalScoped\\Spatie\\Ray', 'RayGlobalScoped\\Spatie\\LaravelRay', 'RayGlobalScoped\\Spatie\\WordPressRay']; + } +} diff --git a/build/vendor/spatie/ray/src/Exceptions/CouldNotConnectToRay.php b/build/vendor/spatie/ray/src/Exceptions/CouldNotConnectToRay.php new file mode 100644 index 0000000..c200c8b --- /dev/null +++ b/build/vendor/spatie/ray/src/Exceptions/CouldNotConnectToRay.php @@ -0,0 +1,12 @@ +getFrame(); + return new \RayGlobalScoped\Spatie\Ray\Origin\Origin($frame ? $frame->file : null, $frame ? $frame->lineNumber : null, \RayGlobalScoped\Spatie\Ray\Origin\Hostname::get()); + } + /** + * @return \Spatie\Backtrace\Frame|null + */ + protected function getFrame() + { + $frames = $this->getAllFrames(); + $indexOfRay = $this->getIndexOfRayFrame($frames); + return $frames[$indexOfRay] ?? null; + } + protected function getAllFrames() : array + { + $frames = \RayGlobalScoped\Spatie\Backtrace\Backtrace::create()->frames(); + return \array_reverse($frames, \true); + } + /** + * @param array $frames + * + * @return int|null + */ + protected function getIndexOfRayFrame(array $frames) + { + $index = $this->search(function (\RayGlobalScoped\Spatie\Backtrace\Frame $frame) { + if ($frame->class === \RayGlobalScoped\Spatie\Ray\Ray::class) { + return \true; + } + if ($this->startsWith($frame->file, \dirname(__DIR__))) { + return \true; + } + return \false; + }, $frames); + return $index + 1; + } + public function startsWith(string $hayStack, string $needle) : bool + { + return \strpos($hayStack, $needle) === 0; + } + /** + * @param callable $callable + * @param array $items + * + * @return int|null + */ + protected function search(callable $callable, array $items) + { + foreach ($items as $key => $item) { + if ($callable($item, $key)) { + return $key; + } + } + return null; + } +} diff --git a/build/vendor/spatie/ray/src/Origin/Hostname.php b/build/vendor/spatie/ray/src/Origin/Hostname.php new file mode 100644 index 0000000..5b77e6c --- /dev/null +++ b/build/vendor/spatie/ray/src/Origin/Hostname.php @@ -0,0 +1,16 @@ +file = $file; + $this->lineNumber = $lineNumber; + $this->hostname = $hostname ?? \RayGlobalScoped\Spatie\Ray\Origin\Hostname::get(); + } + public function toArray() : array + { + return ['file' => $this->file, 'line_number' => $this->lineNumber, 'hostname' => $this->hostname]; + } + public function fingerPrint() : string + { + return \md5(\print_r($this->toArray(), \true)); + } +} diff --git a/build/vendor/spatie/ray/src/Origin/OriginFactory.php b/build/vendor/spatie/ray/src/Origin/OriginFactory.php new file mode 100644 index 0000000..48d0610 --- /dev/null +++ b/build/vendor/spatie/ray/src/Origin/OriginFactory.php @@ -0,0 +1,8 @@ +getPayloads(); + } + public static function registerPayloadFinder(callable $callable) + { + self::$payloadFinder = $callable; + } + public function __construct(array $values) + { + $this->values = $values; + } + public function getPayloads() : array + { + return \array_map(function ($value) { + return $this->getPayload($value); + }, $this->values); + } + protected function getPayload($value) : \RayGlobalScoped\Spatie\Ray\Payloads\Payload + { + if (self::$payloadFinder) { + if ($payload = (static::$payloadFinder)($value)) { + return $payload; + } + } + if (\is_bool($value)) { + return new \RayGlobalScoped\Spatie\Ray\Payloads\BoolPayload($value); + } + if (\is_null($value)) { + return new \RayGlobalScoped\Spatie\Ray\Payloads\NullPayload(); + } + if ($value instanceof \RayGlobalScoped\Carbon\CarbonInterface) { + return new \RayGlobalScoped\Spatie\Ray\Payloads\CarbonPayload($value); + } + $primitiveValue = \RayGlobalScoped\Spatie\Ray\ArgumentConverter::convertToPrimitive($value); + return new \RayGlobalScoped\Spatie\Ray\Payloads\LogPayload($primitiveValue); + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/ApplicationLogPayload.php b/build/vendor/spatie/ray/src/Payloads/ApplicationLogPayload.php new file mode 100644 index 0000000..8f244d7 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/ApplicationLogPayload.php @@ -0,0 +1,21 @@ +value = $value; + } + public function getType() : string + { + return 'application_log'; + } + public function getContent() : array + { + return ['value' => $this->value]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/BoolPayload.php b/build/vendor/spatie/ray/src/Payloads/BoolPayload.php new file mode 100644 index 0000000..54539b1 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/BoolPayload.php @@ -0,0 +1,21 @@ +bool = $bool; + } + public function getType() : string + { + return 'custom'; + } + public function getContent() : array + { + return ['content' => $this->bool, 'label' => 'Boolean']; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/CallerPayload.php b/build/vendor/spatie/ray/src/Payloads/CallerPayload.php new file mode 100644 index 0000000..27e12df --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/CallerPayload.php @@ -0,0 +1,27 @@ +frames = $this->removeRayFrames($frames); + } + public function getType() : string + { + return 'caller'; + } + public function getContent() : array + { + $frames = \array_slice($this->frames, 1, 1); + /** @var Frame $frame */ + $frame = \array_values($frames)[0]; + return ['frame' => ['file_name' => $this->replaceRemotePathWithLocalPath($frame->file), 'line_number' => $frame->lineNumber, 'class' => $frame->class, 'method' => $frame->method, 'vendor_frame' => !$frame->applicationFrame]]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/CarbonPayload.php b/build/vendor/spatie/ray/src/Payloads/CarbonPayload.php new file mode 100644 index 0000000..0ee1728 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/CarbonPayload.php @@ -0,0 +1,25 @@ +carbon = $carbon; + $this->format = $format; + } + public function getType() : string + { + return 'carbon'; + } + public function getContent() : array + { + return ['formatted' => $this->carbon ? $this->carbon->format($this->format) : null, 'timestamp' => $this->carbon ? $this->carbon->timestamp : null, 'timezone' => $this->carbon ? $this->carbon->timezone->getName() : null]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/ClearAllPayload.php b/build/vendor/spatie/ray/src/Payloads/ClearAllPayload.php new file mode 100644 index 0000000..978d099 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/ClearAllPayload.php @@ -0,0 +1,11 @@ +color = $color; + } + public function getType() : string + { + return 'color'; + } + public function getContent() : array + { + return ['color' => $this->color]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/CreateLockPayload.php b/build/vendor/spatie/ray/src/Payloads/CreateLockPayload.php new file mode 100644 index 0000000..6e22631 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/CreateLockPayload.php @@ -0,0 +1,21 @@ +name = $name; + } + public function getType() : string + { + return 'create_lock'; + } + public function getContent() : array + { + return ['name' => $this->name]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/CustomPayload.php b/build/vendor/spatie/ray/src/Payloads/CustomPayload.php new file mode 100644 index 0000000..97ec755 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/CustomPayload.php @@ -0,0 +1,24 @@ +content = $content; + $this->label = $label; + } + public function getType() : string + { + return 'custom'; + } + public function getContent() : array + { + return ['content' => $this->content, 'label' => $this->label]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/DecodedJsonPayload.php b/build/vendor/spatie/ray/src/Payloads/DecodedJsonPayload.php new file mode 100644 index 0000000..bcd9681 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/DecodedJsonPayload.php @@ -0,0 +1,23 @@ +value = $value; + } + public function getType() : string + { + return 'custom'; + } + public function getContent() : array + { + $decodedJson = \json_decode($this->value, \true); + return ['content' => \RayGlobalScoped\Spatie\Ray\ArgumentConverter::convertToPrimitive($decodedJson), 'label' => '']; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/ExceptionPayload.php b/build/vendor/spatie/ray/src/Payloads/ExceptionPayload.php new file mode 100644 index 0000000..baf7afa --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/ExceptionPayload.php @@ -0,0 +1,35 @@ +exception = $exception; + $this->meta = $meta; + } + public function getType() : string + { + return 'exception'; + } + public function getContent() : array + { + \RayGlobalScoped\Spatie\Backtrace\Backtrace::createForThrowable($this->exception); + return ['class' => \get_class($this->exception), 'message' => $this->exception->getMessage(), 'frames' => $this->getFrames(), 'meta' => $this->meta]; + } + protected function getFrames() : array + { + $frames = \RayGlobalScoped\Spatie\Backtrace\Backtrace::createForThrowable($this->exception)->frames(); + return \array_map(function (\RayGlobalScoped\Spatie\Backtrace\Frame $frame) { + return ['file_name' => $this->replaceRemotePathWithLocalPath($frame->file), 'line_number' => $frame->lineNumber, 'class' => $frame->class, 'method' => $frame->method, 'vendor_frame' => !$frame->applicationFrame, 'snippet' => $frame->getSnippetProperties(12)]; + }, $frames); + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/FileContentsPayload.php b/build/vendor/spatie/ray/src/Payloads/FileContentsPayload.php new file mode 100644 index 0000000..1000bee --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/FileContentsPayload.php @@ -0,0 +1,31 @@ +file = $file; + } + public function getType() : string + { + return 'custom'; + } + public function getContent() : array + { + if (!\file_exists($this->file)) { + return ['content' => "File not found: '{$this->file}'", 'label' => 'File']; + } + $contents = \file_get_contents($this->file); + return ['content' => $this->encodeContent($contents), 'label' => \basename($this->file)]; + } + protected function encodeContent(string $content) : string + { + $result = \htmlentities($content); + // using nl2br() causes tests to fail on windows, so use
only + return \str_replace(\PHP_EOL, '
', $result); + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/HideAppPayload.php b/build/vendor/spatie/ray/src/Payloads/HideAppPayload.php new file mode 100644 index 0000000..6bcebe4 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/HideAppPayload.php @@ -0,0 +1,11 @@ +html = $html; + } + public function getType() : string + { + return 'custom'; + } + public function getContent() : array + { + return ['content' => $this->html, 'label' => 'HTML']; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/ImagePayload.php b/build/vendor/spatie/ray/src/Payloads/ImagePayload.php new file mode 100644 index 0000000..5ef7df8 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/ImagePayload.php @@ -0,0 +1,25 @@ +location = $location; + } + public function getType() : string + { + return 'custom'; + } + public function getContent() : array + { + if (\file_exists($this->location)) { + $this->location = 'file://' . $this->location; + } + $location = \str_replace('"', '', $this->location); + return ['content' => "\"\"", 'label' => 'Image']; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/JsonStringPayload.php b/build/vendor/spatie/ray/src/Payloads/JsonStringPayload.php new file mode 100644 index 0000000..086715b --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/JsonStringPayload.php @@ -0,0 +1,21 @@ +value = $value; + } + public function getType() : string + { + return 'json_string'; + } + public function getContent() : array + { + return ['value' => \json_encode($this->value)]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/LogPayload.php b/build/vendor/spatie/ray/src/Payloads/LogPayload.php new file mode 100644 index 0000000..5f5db1f --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/LogPayload.php @@ -0,0 +1,32 @@ +values = $values; + } + public function getType() : string + { + return 'log'; + } + public function getContent() : array + { + return ['values' => $this->values]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/MeasurePayload.php b/build/vendor/spatie/ray/src/Payloads/MeasurePayload.php new file mode 100644 index 0000000..510ac7e --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/MeasurePayload.php @@ -0,0 +1,48 @@ +name = $name; + $this->totalTime = $stopwatchEvent->getDuration(); + $this->maxMemoryUsageDuringTotalTime = $stopwatchEvent->getMemory(); + $periods = $stopwatchEvent->getPeriods(); + if ($lastPeriod = \end($periods)) { + $this->timeSinceLastCall = $lastPeriod->getDuration(); + $this->maxMemoryUsageSinceLastCall = $lastPeriod->getMemory(); + } + } + public function concernsNewTimer() : self + { + $this->isNewTimer = \true; + $this->totalTime = 0; + $this->maxMemoryUsageDuringTotalTime = 0; + $this->timeSinceLastCall = 0; + $this->maxMemoryUsageSinceLastCall = 0; + return $this; + } + public function getType() : string + { + return 'measure'; + } + public function getContent() : array + { + return ['name' => $this->name, 'is_new_timer' => $this->isNewTimer, 'total_time' => $this->totalTime, 'max_memory_usage_during_total_time' => $this->maxMemoryUsageDuringTotalTime, 'time_since_last_call' => $this->timeSinceLastCall, 'max_memory_usage_since_last_call' => $this->maxMemoryUsageSinceLastCall]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/NewScreenPayload.php b/build/vendor/spatie/ray/src/Payloads/NewScreenPayload.php new file mode 100644 index 0000000..1a2b864 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/NewScreenPayload.php @@ -0,0 +1,21 @@ +name = $name; + } + public function getType() : string + { + return 'new_screen'; + } + public function getContent() : array + { + return ['name' => $this->name]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/NotifyPayload.php b/build/vendor/spatie/ray/src/Payloads/NotifyPayload.php new file mode 100644 index 0000000..8f1da73 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/NotifyPayload.php @@ -0,0 +1,21 @@ +text = $text; + } + public function getType() : string + { + return 'notify'; + } + public function getContent() : array + { + return ['value' => $this->text]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/NullPayload.php b/build/vendor/spatie/ray/src/Payloads/NullPayload.php new file mode 100644 index 0000000..010a491 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/NullPayload.php @@ -0,0 +1,17 @@ + null, 'label' => 'Null']; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/Payload.php b/build/vendor/spatie/ray/src/Payloads/Payload.php new file mode 100644 index 0000000..1966b65 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/Payload.php @@ -0,0 +1,44 @@ +remotePath) || \is_null($this->localPath)) { + return $filePath; + } + $pattern = '~^' . \preg_quote($this->remotePath, '~') . '~'; + return \preg_replace($pattern, $this->localPath, $filePath); + } + public function getContent() : array + { + return []; + } + public function toArray() : array + { + return ['type' => $this->getType(), 'content' => $this->getContent(), 'origin' => $this->getOrigin()->toArray()]; + } + public function toJson() : string + { + return \json_encode($this->toArray()); + } + protected function getOrigin() : \RayGlobalScoped\Spatie\Ray\Origin\Origin + { + /** @var \Spatie\Ray\Origin\OriginFactory $originFactory */ + $originFactory = new self::$originFactoryClass(); + $origin = $originFactory->getOrigin(); + $origin->file = $this->replaceRemotePathWithLocalPath($origin->file); + return $origin; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/RemovePayload.php b/build/vendor/spatie/ray/src/Payloads/RemovePayload.php new file mode 100644 index 0000000..8f40102 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/RemovePayload.php @@ -0,0 +1,11 @@ +size = $size; + } + public function getType() : string + { + return 'size'; + } + public function getContent() : array + { + return ['size' => $this->size]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/TablePayload.php b/build/vendor/spatie/ray/src/Payloads/TablePayload.php new file mode 100644 index 0000000..d8bf8af --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/TablePayload.php @@ -0,0 +1,28 @@ +values = $values; + $this->label = $label; + } + public function getType() : string + { + return 'table'; + } + public function getContent() : array + { + $values = \array_map(function ($value) { + return \RayGlobalScoped\Spatie\Ray\ArgumentConverter::convertToPrimitive($value); + }, $this->values); + return ['values' => $values, 'label' => $this->label]; + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/TracePayload.php b/build/vendor/spatie/ray/src/Payloads/TracePayload.php new file mode 100644 index 0000000..8cfcad7 --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/TracePayload.php @@ -0,0 +1,44 @@ +frames = $this->removeRayFrames($frames); + } + public function startFromIndex(int $index) : self + { + $this->startFromIndex = $index; + return $this; + } + public function limit(int $limit) : self + { + $this->limit = $limit; + return $this; + } + public function getType() : string + { + return 'trace'; + } + public function getContent() : array + { + $frames = \array_map(function (\RayGlobalScoped\Spatie\Backtrace\Frame $frame) { + return ['file_name' => $this->replaceRemotePathWithLocalPath($frame->file), 'line_number' => $frame->lineNumber, 'class' => $frame->class, 'method' => $frame->method, 'vendor_frame' => !$frame->applicationFrame]; + }, $this->frames); + if (!\is_null($this->limit)) { + $frames = \array_slice($frames, $this->startFromIndex ?? 0, $this->limit); + } + return \compact('frames'); + } +} diff --git a/build/vendor/spatie/ray/src/Payloads/XmlPayload.php b/build/vendor/spatie/ray/src/Payloads/XmlPayload.php new file mode 100644 index 0000000..976189a --- /dev/null +++ b/build/vendor/spatie/ray/src/Payloads/XmlPayload.php @@ -0,0 +1,46 @@ +value = $value; + } + public function getType() : string + { + return 'custom'; + } + public function getContent() : array + { + $content = $this->formatXmlForDisplay($this->value); + return ['content' => $content, 'label' => 'XML']; + } + protected function formatXmlForDisplay(string $xml) : string + { + $content = $this->formatAndIndentXml($xml); + return $this->encodeXml(\trim($content)); + } + protected function encodeXml(string $xml) : string + { + $result = \htmlentities($xml); + return \str_replace([\PHP_EOL, "\n", ' '], ['
', '
', ' '], $result); + } + protected function formatAndIndentXml(string $xml) : string + { + if (!\class_exists(\DOMDocument::class)) { + return $xml; + } + $dom = new \DOMDocument(); + $dom->preserveWhiteSpace = \false; + $dom->strictErrorChecking = \false; + $dom->formatOutput = \true; + if (!$dom->loadXML($xml, \LIBXML_NOERROR | \LIBXML_NOWARNING)) { + return $xml; + } + return $dom->saveXML(); + } +} diff --git a/build/vendor/spatie/ray/src/Ray.php b/build/vendor/spatie/ray/src/Ray.php new file mode 100644 index 0000000..3bb0fad --- /dev/null +++ b/build/vendor/spatie/ray/src/Ray.php @@ -0,0 +1,420 @@ +settings = $settings; + self::$client = $client ?? self::$client ?? new \RayGlobalScoped\Spatie\Ray\Client($settings->port, $settings->host); + self::$counters = self::$counters ?? new \RayGlobalScoped\Spatie\Ray\Support\Counters(); + $this->uuid = $uuid ?? static::$fakeUuid ?? \RayGlobalScoped\Ramsey\Uuid\Uuid::uuid4()->toString(); + static::$enabled = static::$enabled ?? $this->settings->enable ?? \true; + } + public function enable() : self + { + static::$enabled = \true; + return $this; + } + public function disable() : self + { + static::$enabled = \false; + return $this; + } + public function enabled() : bool + { + return static::$enabled || static::$enabled === null; + } + public function disabled() : bool + { + return static::$enabled === \false; + } + public static function useClient(\RayGlobalScoped\Spatie\Ray\Client $client) : void + { + self::$client = $client; + } + public function newScreen(string $name = '') : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\NewScreenPayload($name); + return $this->sendRequest($payload); + } + public function clearAll() : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\ClearAllPayload(); + return $this->sendRequest($payload); + } + public function clearScreen() : self + { + return $this->newScreen(); + } + public function color(string $color) : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\ColorPayload($color); + return $this->sendRequest($payload); + } + public function size(string $size) : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\SizePayload($size); + return $this->sendRequest($payload); + } + public function remove() : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\RemovePayload(); + return $this->sendRequest($payload); + } + public function hide() : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\HidePayload(); + return $this->sendRequest($payload); + } + /** + * @param string|callable $stopwatchName + * + * @return $this + */ + public function measure($stopwatchName = 'default') : self + { + if ($stopwatchName instanceof \Closure) { + return $this->measureClosure($stopwatchName); + } + if (!isset(static::$stopWatches[$stopwatchName])) { + $stopwatch = new \RayGlobalScoped\Symfony\Component\Stopwatch\Stopwatch(\true); + static::$stopWatches[$stopwatchName] = $stopwatch; + $event = $stopwatch->start($stopwatchName); + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\MeasurePayload($stopwatchName, $event); + $payload->concernsNewTimer(); + return $this->sendRequest($payload); + } + $stopwatch = static::$stopWatches[$stopwatchName]; + $event = $stopwatch->lap($stopwatchName); + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\MeasurePayload($stopwatchName, $event); + return $this->sendRequest($payload); + } + public function trace(?\Closure $startingFromFrame = null) : self + { + $backtrace = \RayGlobalScoped\Spatie\Backtrace\Backtrace::create(); + if (\class_exists(\RayGlobalScoped\Spatie\LaravelRay\Ray::class) && \function_exists('RayGlobalScoped\\base_path')) { + $backtrace->applicationPath(base_path()); + } + if ($startingFromFrame) { + $backtrace->startingFromFrame($startingFromFrame); + } + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\TracePayload($backtrace->frames()); + return $this->sendRequest($payload); + } + public function backtrace(?\Closure $startingFromFrame = null) : self + { + return $this->trace($startingFromFrame); + } + public function caller() : self + { + $backtrace = \RayGlobalScoped\Spatie\Backtrace\Backtrace::create(); + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\CallerPayload($backtrace->frames()); + return $this->sendRequest($payload); + } + protected function measureClosure(\Closure $closure) : self + { + $stopwatch = new \RayGlobalScoped\Symfony\Component\Stopwatch\Stopwatch(\true); + $stopwatch->start('closure'); + $closure(); + $event = $stopwatch->stop('closure'); + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\MeasurePayload('closure', $event); + return $this->sendRequest($payload); + } + public function stopTime(string $stopwatchName = '') : self + { + if ($stopwatchName === '') { + static::$stopWatches = []; + return $this; + } + if (isset(static::$stopWatches[$stopwatchName])) { + unset(static::$stopWatches[$stopwatchName]); + return $this; + } + return $this; + } + public function notify(string $text) : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\NotifyPayload($text); + return $this->sendRequest($payload); + } + /** + * Sends the provided value(s) encoded as a JSON string using json_encode(). + */ + public function toJson(...$values) : self + { + $payloads = \array_map(function ($value) { + return new \RayGlobalScoped\Spatie\Ray\Payloads\JsonStringPayload($value); + }, $values); + return $this->sendRequest($payloads); + } + /** + * Sends the provided JSON string(s) decoded using json_decode(). + */ + public function json(string ...$jsons) : self + { + $payloads = \array_map(function ($json) { + return new \RayGlobalScoped\Spatie\Ray\Payloads\DecodedJsonPayload($json); + }, $jsons); + return $this->sendRequest($payloads); + } + public function file(string $filename) : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\FileContentsPayload($filename); + return $this->sendRequest($payload); + } + public function image(string $location) : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\ImagePayload($location); + return $this->sendRequest($payload); + } + public function die($status = '') : void + { + die($status); + } + public function className(object $object) : self + { + return $this->send(\get_class($object)); + } + public function phpinfo(string ...$properties) : self + { + if (!\count($properties)) { + return $this->table(['PHP version' => \phpversion(), 'Memory limit' => \ini_get('memory_limit'), 'Max file upload size' => \ini_get('max_file_uploads'), 'Max post size' => \ini_get('post_max_size'), 'PHP ini file' => \php_ini_loaded_file(), "PHP scanned ini file" => \php_ini_scanned_files(), 'Extensions' => \implode(', ', \get_loaded_extensions())], 'PHPInfo'); + } + $properties = \array_flip($properties); + foreach ($properties as $property => $value) { + $properties[$property] = \ini_get($property); + } + return $this->table($properties, 'PHPInfo'); + } + public function showWhen($boolOrCallable) : self + { + if (\is_callable($boolOrCallable)) { + $boolOrCallable = (bool) $boolOrCallable(); + } + if (!$boolOrCallable) { + $this->remove(); + } + return $this; + } + public function showIf($boolOrCallable) : self + { + return $this->showWhen($boolOrCallable); + } + public function removeWhen($boolOrCallable) : self + { + if (\is_callable($boolOrCallable)) { + $boolOrCallable = (bool) $boolOrCallable(); + } + if ($boolOrCallable) { + $this->remove(); + } + return $this; + } + public function removeIf($boolOrCallable) : self + { + return $this->removeWhen($boolOrCallable); + } + public function carbon(?\RayGlobalScoped\Carbon\Carbon $carbon) : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\CarbonPayload($carbon); + $this->sendRequest($payload); + return $this; + } + public function ban() : self + { + return $this->send('🕶'); + } + public function charles() : self + { + return $this->send('🎶 🎹 🎷 🕺'); + } + public function table(array $values, $label = 'Table') : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\TablePayload($values, $label); + return $this->sendRequest($payload); + } + public function count(?string $name = null) : self + { + $fingerPrint = (new \RayGlobalScoped\Spatie\Ray\Origin\DefaultOriginFactory())->getOrigin()->fingerPrint(); + [$ray, $times] = self::$counters->increment($name ?? $fingerPrint); + $message = "Called "; + if ($name) { + $message .= "`{$name}` "; + } + $message .= "{$times} "; + $message .= $times === 1 ? 'time' : 'times'; + $message .= '.'; + $ray->sendCustom($message, 'Count'); + return $ray; + } + public function clearCounters() : self + { + self::$counters->clear(); + return $this; + } + public function pause() : self + { + $lockName = \md5(\time()); + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\CreateLockPayload($lockName); + $this->sendRequest($payload); + do { + \sleep(1); + } while (self::$client->lockExists($lockName)); + return $this; + } + public function html(string $html = '') : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\HtmlPayload($html); + return $this->sendRequest($payload); + } + public function exception(\Exception $exception, array $meta = []) : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\ExceptionPayload($exception, $meta); + $this->sendRequest($payload); + return $this; + } + public function xml(string $xml) : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\XmlPayload($xml); + return $this->sendRequest($payload); + } + public function raw(...$arguments) : self + { + if (!\count($arguments)) { + return $this; + } + $payloads = \array_map(function ($argument) { + return \RayGlobalScoped\Spatie\Ray\Payloads\LogPayload::createForArguments([$argument]); + }, $arguments); + return $this->sendRequest($payloads); + } + public function send(...$arguments) : self + { + if (!\count($arguments)) { + return $this; + } + if ($this->settings->always_send_raw_values) { + return $this->raw(...$arguments); + } + $payloads = \RayGlobalScoped\Spatie\Ray\PayloadFactory::createForValues($arguments); + return $this->sendRequest($payloads); + } + public function pass($argument) + { + $this->send($argument); + return $argument; + } + public function showApp() : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\ShowAppPayload(); + return $this->sendRequest($payload); + } + public function hideApp() : self + { + $payload = new \RayGlobalScoped\Spatie\Ray\Payloads\HideAppPayload(); + return $this->sendRequest($payload); + } + public function sendCustom(string $content, string $label = '') : self + { + $customPayload = new \RayGlobalScoped\Spatie\Ray\Payloads\CustomPayload($content, $label); + return $this->sendRequest($customPayload); + } + /** + * @param \Spatie\Ray\Payloads\Payload|\Spatie\Ray\Payloads\Payload[] $payloads + * @param array $meta + * + * @return $this + * @throws \Exception + */ + public function sendRequest($payloads, array $meta = []) : self + { + if (!$this->enabled()) { + return $this; + } + if (!\is_array($payloads)) { + $payloads = [$payloads]; + } + try { + if (\class_exists(\RayGlobalScoped\Composer\InstalledVersions::class)) { + $meta['ray_package_version'] = \RayGlobalScoped\Composer\InstalledVersions::getVersion('spatie/ray'); + } + } catch (\Exception $e) { + // In WordPress this entire package will be rewritten + } + $allMeta = \array_merge(['php_version' => \phpversion(), 'php_version_id' => \PHP_VERSION_ID], $meta); + foreach ($payloads as $payload) { + $payload->remotePath = $this->settings->remote_path; + $payload->localPath = $this->settings->local_path; + } + $request = new \RayGlobalScoped\Spatie\Ray\Request($this->uuid, $payloads, $allMeta); + self::$client->send($request); + return $this; + } + public static function makePathOsSafe(string $path) : string + { + return \str_replace('/', \DIRECTORY_SEPARATOR, $path); + } +} diff --git a/build/vendor/spatie/ray/src/Request.php b/build/vendor/spatie/ray/src/Request.php new file mode 100644 index 0000000..0428076 --- /dev/null +++ b/build/vendor/spatie/ray/src/Request.php @@ -0,0 +1,31 @@ +uuid = $uuid; + $this->payloads = $payloads; + $this->meta = $meta; + } + public function toArray() : array + { + $payloads = \array_map(function (\RayGlobalScoped\Spatie\Ray\Payloads\Payload $payload) { + return $payload->toArray(); + }, $this->payloads); + return ['uuid' => $this->uuid, 'payloads' => $payloads, 'meta' => $this->meta]; + } + public function toJson() : string + { + return \json_encode($this->toArray()); + } +} diff --git a/build/vendor/spatie/ray/src/Settings/Settings.php b/build/vendor/spatie/ray/src/Settings/Settings.php new file mode 100644 index 0000000..948ccdb --- /dev/null +++ b/build/vendor/spatie/ray/src/Settings/Settings.php @@ -0,0 +1,49 @@ + \true, 'host' => 'localhost', 'port' => 23517, 'remote_path' => null, 'local_path' => null, 'always_send_raw_values' => \false]; + public function __construct(array $settings) + { + $this->settings = \array_merge($this->defaultSettings, $settings); + } + public function markAsLoadedUsingSettingsFile() + { + $this->loadedUsingSettingsFile = \true; + return $this; + } + public function setDefaultSettings(array $defaults) + { + foreach ($defaults as $name => $value) { + if ($this->wasLoadedUsingConfigFile($name)) { + $this->settings[$name] = $value; + } + } + return $this; + } + protected function wasLoadedUsingConfigFile($name) + { + if (!\array_key_exists($name, $this->settings)) { + return \true; + } + if (!$this->loadedUsingSettingsFile) { + return \true; + } + return \false; + } + public function __set(string $name, $value) + { + $this->settings[$name] = $value; + } + public function __get(string $name) + { + return $this->settings[$name] ?? null; + } +} diff --git a/build/vendor/spatie/ray/src/Settings/SettingsFactory.php b/build/vendor/spatie/ray/src/Settings/SettingsFactory.php new file mode 100644 index 0000000..d5bbca9 --- /dev/null +++ b/build/vendor/spatie/ray/src/Settings/SettingsFactory.php @@ -0,0 +1,55 @@ +getSettingsFromConfigFile($configDirectory); + $settings = new \RayGlobalScoped\Spatie\Ray\Settings\Settings($settingValues); + if (\count($settingValues)) { + $settings->markAsLoadedUsingSettingsFile(); + } + return $settings; + } + public function getSettingsFromConfigFile(string $configDirectory = null) : array + { + $configFilePath = $this->searchConfigFiles($configDirectory); + if (!\file_exists($configFilePath)) { + return []; + } + $options = (include $configFilePath); + return $options ?? []; + } + protected function searchConfigFiles(string $configDirectory = null) : string + { + if (!isset(self::$cache[$configDirectory])) { + self::$cache[$configDirectory] = $this->searchConfigFilesOnDisk($configDirectory); + } + return self::$cache[$configDirectory]; + } + protected function searchConfigFilesOnDisk(string $configDirectory = null) : string + { + $configNames = ['ray.php']; + $configDirectory = $configDirectory ?? \getcwd(); + while (@\is_dir($configDirectory)) { + foreach ($configNames as $configName) { + $configFullPath = $configDirectory . \DIRECTORY_SEPARATOR . $configName; + if (\file_exists($configFullPath)) { + return $configFullPath; + } + } + $parentDirectory = \dirname($configDirectory); + // We do a direct comparison here since there's a difference between + // the root directories on windows / *nix systems which does not + // let us compare it against the DIRECTORY_SEPARATOR directly + if ($parentDirectory === $configDirectory) { + return ''; + } + $configDirectory = $parentDirectory; + } + return ''; + } +} diff --git a/build/vendor/spatie/ray/src/Support/Counters.php b/build/vendor/spatie/ray/src/Support/Counters.php new file mode 100644 index 0000000..dd834a6 --- /dev/null +++ b/build/vendor/spatie/ray/src/Support/Counters.php @@ -0,0 +1,35 @@ +counters[$name])) { + $this->counters[$name] = [ray(), 0]; + } + [$ray, $times] = $this->counters[$name]; + $newTimes = $times + 1; + $this->counters[$name] = [$ray, $newTimes]; + return [$ray, $newTimes]; + } + public function get(string $name) : int + { + if (!isset($this->counters[$name])) { + return 0; + } + return $this->counters[$name][1]; + } + public function clear() : void + { + $this->counters = []; + } + public function setRay(string $name, \RayGlobalScoped\Spatie\Ray\Ray $ray) : void + { + $this->counters[$name][0] = $ray; + } +} diff --git a/build/vendor/spatie/ray/src/helpers.php b/build/vendor/spatie/ray/src/helpers.php new file mode 100644 index 0000000..d614f7e --- /dev/null +++ b/build/vendor/spatie/ray/src/helpers.php @@ -0,0 +1,52 @@ +send(...$args); + } catch (\RayGlobalScoped\Illuminate\Contracts\Container\BindingResolutionException $exception) { + // this exception can occur when requiring spatie/ray in an Orchestra powered + // testsuite without spatie/laravel-ray's service provider being registered + // in `getPackageProviders` of the base test suite + } + } + if (\class_exists(\RayGlobalScoped\Spatie\CraftRay\Ray::class)) { + return \RayGlobalScoped\Yii::$container->get(\RayGlobalScoped\Spatie\CraftRay\Ray::class)->send(...$args); + } + if (\class_exists(\RayGlobalScoped\Spatie\YiiRay\Ray::class)) { + return \RayGlobalScoped\Yii::$container->get(\RayGlobalScoped\Spatie\YiiRay\Ray::class)->send(...$args); + } + $rayClass = \RayGlobalScoped\Spatie\Ray\Ray::class; + if (\class_exists(\RayGlobalScoped\Spatie\WordPressRay\Ray::class)) { + $rayClass = \RayGlobalScoped\Spatie\WordPressRay\Ray::class; + } + if (\class_exists(\RayGlobalScoped\Spatie\RayBundle\Ray::class)) { + $rayClass = \RayGlobalScoped\Spatie\RayBundle\Ray::class; + } + $settings = \RayGlobalScoped\Spatie\Ray\Settings\SettingsFactory::createFromConfigFile(); + return (new $rayClass($settings))->send(...$args); + } +} +if (!\function_exists('RayGlobalScoped\\rd')) { + function rd(...$args) + { + \RayGlobalScoped\ray(...$args)->die(); + } +} diff --git a/build/vendor/symfony/polyfill-ctype/Ctype.php b/build/vendor/symfony/polyfill-ctype/Ctype.php new file mode 100644 index 0000000..1120169 --- /dev/null +++ b/build/vendor/symfony/polyfill-ctype/Ctype.php @@ -0,0 +1,201 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Polyfill\Ctype; + +/** + * Ctype implementation through regex. + * + * @internal + * + * @author Gert de Pagter + */ +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 string|int $text + * + * @return bool + */ + public static function ctype_alnum($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_alpha($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_cntrl($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_digit($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_graph($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_lower($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_print($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_punct($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_space($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_upper($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $text + * + * @return bool + */ + public static function ctype_xdigit($text) + { + $text = self::convert_int_to_char_for_ctype($text); + 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 string|int $int + * + * @return mixed + */ + private static function convert_int_to_char_for_ctype($int) + { + if (!\is_int($int)) { + return $int; + } + if ($int < -128 || $int > 255) { + return (string) $int; + } + if ($int < 0) { + $int += 256; + } + return \chr($int); + } +} diff --git a/build/vendor/symfony/polyfill-ctype/LICENSE b/build/vendor/symfony/polyfill-ctype/LICENSE new file mode 100644 index 0000000..3f853aa --- /dev/null +++ b/build/vendor/symfony/polyfill-ctype/LICENSE @@ -0,0 +1,19 @@ +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. diff --git a/build/vendor/symfony/polyfill-ctype/bootstrap.php b/build/vendor/symfony/polyfill-ctype/bootstrap.php new file mode 100644 index 0000000..e59c52e --- /dev/null +++ b/build/vendor/symfony/polyfill-ctype/bootstrap.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use RayGlobalScoped\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 \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_alnum($text); + } +} +if (!\function_exists('ctype_alpha')) { + function ctype_alpha($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_alpha($text); + } +} +if (!\function_exists('ctype_cntrl')) { + function ctype_cntrl($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_cntrl($text); + } +} +if (!\function_exists('ctype_digit')) { + function ctype_digit($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_digit($text); + } +} +if (!\function_exists('ctype_graph')) { + function ctype_graph($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_graph($text); + } +} +if (!\function_exists('ctype_lower')) { + function ctype_lower($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_lower($text); + } +} +if (!\function_exists('ctype_print')) { + function ctype_print($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_print($text); + } +} +if (!\function_exists('ctype_punct')) { + function ctype_punct($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_punct($text); + } +} +if (!\function_exists('ctype_space')) { + function ctype_space($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_space($text); + } +} +if (!\function_exists('ctype_upper')) { + function ctype_upper($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_upper($text); + } +} +if (!\function_exists('ctype_xdigit')) { + function ctype_xdigit($text) + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_xdigit($text); + } +} diff --git a/build/vendor/symfony/polyfill-ctype/bootstrap80.php b/build/vendor/symfony/polyfill-ctype/bootstrap80.php new file mode 100644 index 0000000..438486c --- /dev/null +++ b/build/vendor/symfony/polyfill-ctype/bootstrap80.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use RayGlobalScoped\Symfony\Polyfill\Ctype as p; +if (!\function_exists('ctype_alnum')) { + function ctype_alnum(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_alnum($text); + } +} +if (!\function_exists('ctype_alpha')) { + function ctype_alpha(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_alpha($text); + } +} +if (!\function_exists('ctype_cntrl')) { + function ctype_cntrl(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_cntrl($text); + } +} +if (!\function_exists('ctype_digit')) { + function ctype_digit(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_digit($text); + } +} +if (!\function_exists('ctype_graph')) { + function ctype_graph(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_graph($text); + } +} +if (!\function_exists('ctype_lower')) { + function ctype_lower(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_lower($text); + } +} +if (!\function_exists('ctype_print')) { + function ctype_print(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_print($text); + } +} +if (!\function_exists('ctype_punct')) { + function ctype_punct(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_punct($text); + } +} +if (!\function_exists('ctype_space')) { + function ctype_space(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_space($text); + } +} +if (!\function_exists('ctype_upper')) { + function ctype_upper(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_upper($text); + } +} +if (!\function_exists('ctype_xdigit')) { + function ctype_xdigit(mixed $text) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Ctype\Ctype::ctype_xdigit($text); + } +} diff --git a/build/vendor/symfony/polyfill-mbstring/LICENSE b/build/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 0000000..4cd8bdd --- /dev/null +++ b/build/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +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. diff --git a/build/vendor/symfony/polyfill-mbstring/Mbstring.php b/build/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 0000000..7635bc8 --- /dev/null +++ b/build/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,695 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\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 + * + * @internal + */ +final class Mbstring +{ + public const MB_CASE_FOLD = \PHP_INT_MAX; + private static $encodingList = ['ASCII', 'UTF-8']; + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + private static $caseFold = [['µ', 'ſ', "ͅ", 'ς', "ϐ", "ϑ", "ϕ", "ϖ", "ϰ", "ϱ", "ϵ", "ẛ", "ι"], ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "ṡ", 'ι']]; + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($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 = ["" => 2, "" => 2, "" => 3, "" => 4]; + $cnt = \floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + while ($i < $len) { + $ulen = $s[$i] < "" ? 1 : $ulenMask[$s[$i] & ""]; + $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::$caseFold[0], self::$caseFold[1], $s); + } + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + static $ulenMask = ["" => 2, "" => 2, "" => 3, "" => 4]; + $i = 0; + $len = \strlen($s); + while ($i < $len) { + $ulen = $s[$i] < "" ? 1 : $ulenMask[$s[$i] & ""]; + $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, null, \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; + } + 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; + } +} diff --git a/build/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/build/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 0000000..43b7d56 --- /dev/null +++ b/build/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,5 @@ + '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', '𐐀' => '𐐨', '𐐁' => '𐐩', '𐐂' => '𐐪', '𐐃' => '𐐫', '𐐄' => '𐐬', '𐐅' => '𐐭', '𐐆' => '𐐮', '𐐇' => '𐐯', '𐐈' => '𐐰', '𐐉' => '𐐱', '𐐊' => '𐐲', '𐐋' => '𐐳', '𐐌' => '𐐴', '𐐍' => '𐐵', '𐐎' => '𐐶', '𐐏' => '𐐷', '𐐐' => '𐐸', '𐐑' => '𐐹', '𐐒' => '𐐺', '𐐓' => '𐐻', '𐐔' => '𐐼', '𐐕' => '𐐽', '𐐖' => '𐐾', '𐐗' => '𐐿', '𐐘' => '𐑀', '𐐙' => '𐑁', '𐐚' => '𐑂', '𐐛' => '𐑃', '𐐜' => '𐑄', '𐐝' => '𐑅', '𐐞' => '𐑆', '𐐟' => '𐑇', '𐐠' => '𐑈', '𐐡' => '𐑉', '𐐢' => '𐑊', '𐐣' => '𐑋', '𐐤' => '𐑌', '𐐥' => '𐑍', '𐐦' => '𐑎', '𐐧' => '𐑏', '𐒰' => '𐓘', '𐒱' => '𐓙', '𐒲' => '𐓚', '𐒳' => '𐓛', '𐒴' => '𐓜', '𐒵' => '𐓝', '𐒶' => '𐓞', '𐒷' => '𐓟', '𐒸' => '𐓠', '𐒹' => '𐓡', '𐒺' => '𐓢', '𐒻' => '𐓣', '𐒼' => '𐓤', '𐒽' => '𐓥', '𐒾' => '𐓦', '𐒿' => '𐓧', '𐓀' => '𐓨', '𐓁' => '𐓩', '𐓂' => '𐓪', '𐓃' => '𐓫', '𐓄' => '𐓬', '𐓅' => '𐓭', '𐓆' => '𐓮', '𐓇' => '𐓯', '𐓈' => '𐓰', '𐓉' => '𐓱', '𐓊' => '𐓲', '𐓋' => '𐓳', '𐓌' => '𐓴', '𐓍' => '𐓵', '𐓎' => '𐓶', '𐓏' => '𐓷', '𐓐' => '𐓸', '𐓑' => '𐓹', '𐓒' => '𐓺', '𐓓' => '𐓻', '𐲀' => '𐳀', '𐲁' => '𐳁', '𐲂' => '𐳂', '𐲃' => '𐳃', '𐲄' => '𐳄', '𐲅' => '𐳅', '𐲆' => '𐳆', '𐲇' => '𐳇', '𐲈' => '𐳈', '𐲉' => '𐳉', '𐲊' => '𐳊', '𐲋' => '𐳋', '𐲌' => '𐳌', '𐲍' => '𐳍', '𐲎' => '𐳎', '𐲏' => '𐳏', '𐲐' => '𐳐', '𐲑' => '𐳑', '𐲒' => '𐳒', '𐲓' => '𐳓', '𐲔' => '𐳔', '𐲕' => '𐳕', '𐲖' => '𐳖', '𐲗' => '𐳗', '𐲘' => '𐳘', '𐲙' => '𐳙', '𐲚' => '𐳚', '𐲛' => '𐳛', '𐲜' => '𐳜', '𐲝' => '𐳝', '𐲞' => '𐳞', '𐲟' => '𐳟', '𐲠' => '𐳠', '𐲡' => '𐳡', '𐲢' => '𐳢', '𐲣' => '𐳣', '𐲤' => '𐳤', '𐲥' => '𐳥', '𐲦' => '𐳦', '𐲧' => '𐳧', '𐲨' => '𐳨', '𐲩' => '𐳩', '𐲪' => '𐳪', '𐲫' => '𐳫', '𐲬' => '𐳬', '𐲭' => '𐳭', '𐲮' => '𐳮', '𐲯' => '𐳯', '𐲰' => '𐳰', '𐲱' => '𐳱', '𐲲' => '𐳲', '𑢠' => '𑣀', '𑢡' => '𑣁', '𑢢' => '𑣂', '𑢣' => '𑣃', '𑢤' => '𑣄', '𑢥' => '𑣅', '𑢦' => '𑣆', '𑢧' => '𑣇', '𑢨' => '𑣈', '𑢩' => '𑣉', '𑢪' => '𑣊', '𑢫' => '𑣋', '𑢬' => '𑣌', '𑢭' => '𑣍', '𑢮' => '𑣎', '𑢯' => '𑣏', '𑢰' => '𑣐', '𑢱' => '𑣑', '𑢲' => '𑣒', '𑢳' => '𑣓', '𑢴' => '𑣔', '𑢵' => '𑣕', '𑢶' => '𑣖', '𑢷' => '𑣗', '𑢸' => '𑣘', '𑢹' => '𑣙', '𑢺' => '𑣚', '𑢻' => '𑣛', '𑢼' => '𑣜', '𑢽' => '𑣝', '𑢾' => '𑣞', '𑢿' => '𑣟', '𖹀' => '𖹠', '𖹁' => '𖹡', '𖹂' => '𖹢', '𖹃' => '𖹣', '𖹄' => '𖹤', '𖹅' => '𖹥', '𖹆' => '𖹦', '𖹇' => '𖹧', '𖹈' => '𖹨', '𖹉' => '𖹩', '𖹊' => '𖹪', '𖹋' => '𖹫', '𖹌' => '𖹬', '𖹍' => '𖹭', '𖹎' => '𖹮', '𖹏' => '𖹯', '𖹐' => '𖹰', '𖹑' => '𖹱', '𖹒' => '𖹲', '𖹓' => '𖹳', '𖹔' => '𖹴', '𖹕' => '𖹵', '𖹖' => '𖹶', '𖹗' => '𖹷', '𖹘' => '𖹸', '𖹙' => '𖹹', '𖹚' => '𖹺', '𖹛' => '𖹻', '𖹜' => '𖹼', '𖹝' => '𖹽', '𖹞' => '𖹾', '𖹟' => '𖹿', '𞤀' => '𞤢', '𞤁' => '𞤣', '𞤂' => '𞤤', '𞤃' => '𞤥', '𞤄' => '𞤦', '𞤅' => '𞤧', '𞤆' => '𞤨', '𞤇' => '𞤩', '𞤈' => '𞤪', '𞤉' => '𞤫', '𞤊' => '𞤬', '𞤋' => '𞤭', '𞤌' => '𞤮', '𞤍' => '𞤯', '𞤎' => '𞤰', '𞤏' => '𞤱', '𞤐' => '𞤲', '𞤑' => '𞤳', '𞤒' => '𞤴', '𞤓' => '𞤵', '𞤔' => '𞤶', '𞤕' => '𞤷', '𞤖' => '𞤸', '𞤗' => '𞤹', '𞤘' => '𞤺', '𞤙' => '𞤻', '𞤚' => '𞤼', '𞤛' => '𞤽', '𞤜' => '𞤾', '𞤝' => '𞤿', '𞤞' => '𞥀', '𞤟' => '𞥁', '𞤠' => '𞥂', '𞤡' => '𞥃'); diff --git a/build/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/build/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 0000000..eb31a53 --- /dev/null +++ b/build/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,6 @@ + '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', '𐐨' => '𐐀', '𐐩' => '𐐁', '𐐪' => '𐐂', '𐐫' => '𐐃', '𐐬' => '𐐄', '𐐭' => '𐐅', '𐐮' => '𐐆', '𐐯' => '𐐇', '𐐰' => '𐐈', '𐐱' => '𐐉', '𐐲' => '𐐊', '𐐳' => '𐐋', '𐐴' => '𐐌', '𐐵' => '𐐍', '𐐶' => '𐐎', '𐐷' => '𐐏', '𐐸' => '𐐐', '𐐹' => '𐐑', '𐐺' => '𐐒', '𐐻' => '𐐓', '𐐼' => '𐐔', '𐐽' => '𐐕', '𐐾' => '𐐖', '𐐿' => '𐐗', '𐑀' => '𐐘', '𐑁' => '𐐙', '𐑂' => '𐐚', '𐑃' => '𐐛', '𐑄' => '𐐜', '𐑅' => '𐐝', '𐑆' => '𐐞', '𐑇' => '𐐟', '𐑈' => '𐐠', '𐑉' => '𐐡', '𐑊' => '𐐢', '𐑋' => '𐐣', '𐑌' => '𐐤', '𐑍' => '𐐥', '𐑎' => '𐐦', '𐑏' => '𐐧', '𐓘' => '𐒰', '𐓙' => '𐒱', '𐓚' => '𐒲', '𐓛' => '𐒳', '𐓜' => '𐒴', '𐓝' => '𐒵', '𐓞' => '𐒶', '𐓟' => '𐒷', '𐓠' => '𐒸', '𐓡' => '𐒹', '𐓢' => '𐒺', '𐓣' => '𐒻', '𐓤' => '𐒼', '𐓥' => '𐒽', '𐓦' => '𐒾', '𐓧' => '𐒿', '𐓨' => '𐓀', '𐓩' => '𐓁', '𐓪' => '𐓂', '𐓫' => '𐓃', '𐓬' => '𐓄', '𐓭' => '𐓅', '𐓮' => '𐓆', '𐓯' => '𐓇', '𐓰' => '𐓈', '𐓱' => '𐓉', '𐓲' => '𐓊', '𐓳' => '𐓋', '𐓴' => '𐓌', '𐓵' => '𐓍', '𐓶' => '𐓎', '𐓷' => '𐓏', '𐓸' => '𐓐', '𐓹' => '𐓑', '𐓺' => '𐓒', '𐓻' => '𐓓', '𐳀' => '𐲀', '𐳁' => '𐲁', '𐳂' => '𐲂', '𐳃' => '𐲃', '𐳄' => '𐲄', '𐳅' => '𐲅', '𐳆' => '𐲆', '𐳇' => '𐲇', '𐳈' => '𐲈', '𐳉' => '𐲉', '𐳊' => '𐲊', '𐳋' => '𐲋', '𐳌' => '𐲌', '𐳍' => '𐲍', '𐳎' => '𐲎', '𐳏' => '𐲏', '𐳐' => '𐲐', '𐳑' => '𐲑', '𐳒' => '𐲒', '𐳓' => '𐲓', '𐳔' => '𐲔', '𐳕' => '𐲕', '𐳖' => '𐲖', '𐳗' => '𐲗', '𐳘' => '𐲘', '𐳙' => '𐲙', '𐳚' => '𐲚', '𐳛' => '𐲛', '𐳜' => '𐲜', '𐳝' => '𐲝', '𐳞' => '𐲞', '𐳟' => '𐲟', '𐳠' => '𐲠', '𐳡' => '𐲡', '𐳢' => '𐲢', '𐳣' => '𐲣', '𐳤' => '𐲤', '𐳥' => '𐲥', '𐳦' => '𐲦', '𐳧' => '𐲧', '𐳨' => '𐲨', '𐳩' => '𐲩', '𐳪' => '𐲪', '𐳫' => '𐲫', '𐳬' => '𐲬', '𐳭' => '𐲭', '𐳮' => '𐲮', '𐳯' => '𐲯', '𐳰' => '𐲰', '𐳱' => '𐲱', '𐳲' => '𐲲', '𑣀' => '𑢠', '𑣁' => '𑢡', '𑣂' => '𑢢', '𑣃' => '𑢣', '𑣄' => '𑢤', '𑣅' => '𑢥', '𑣆' => '𑢦', '𑣇' => '𑢧', '𑣈' => '𑢨', '𑣉' => '𑢩', '𑣊' => '𑢪', '𑣋' => '𑢫', '𑣌' => '𑢬', '𑣍' => '𑢭', '𑣎' => '𑢮', '𑣏' => '𑢯', '𑣐' => '𑢰', '𑣑' => '𑢱', '𑣒' => '𑢲', '𑣓' => '𑢳', '𑣔' => '𑢴', '𑣕' => '𑢵', '𑣖' => '𑢶', '𑣗' => '𑢷', '𑣘' => '𑢸', '𑣙' => '𑢹', '𑣚' => '𑢺', '𑣛' => '𑢻', '𑣜' => '𑢼', '𑣝' => '𑢽', '𑣞' => '𑢾', '𑣟' => '𑢿', '𖹠' => '𖹀', '𖹡' => '𖹁', '𖹢' => '𖹂', '𖹣' => '𖹃', '𖹤' => '𖹄', '𖹥' => '𖹅', '𖹦' => '𖹆', '𖹧' => '𖹇', '𖹨' => '𖹈', '𖹩' => '𖹉', '𖹪' => '𖹊', '𖹫' => '𖹋', '𖹬' => '𖹌', '𖹭' => '𖹍', '𖹮' => '𖹎', '𖹯' => '𖹏', '𖹰' => '𖹐', '𖹱' => '𖹑', '𖹲' => '𖹒', '𖹳' => '𖹓', '𖹴' => '𖹔', '𖹵' => '𖹕', '𖹶' => '𖹖', '𖹷' => '𖹗', '𖹸' => '𖹘', '𖹹' => '𖹙', '𖹺' => '𖹚', '𖹻' => '𖹛', '𖹼' => '𖹜', '𖹽' => '𖹝', '𖹾' => '𖹞', '𖹿' => '𖹟', '𞤢' => '𞤀', '𞤣' => '𞤁', '𞤤' => '𞤂', '𞤥' => '𞤃', '𞤦' => '𞤄', '𞤧' => '𞤅', '𞤨' => '𞤆', '𞤩' => '𞤇', '𞤪' => '𞤈', '𞤫' => '𞤉', '𞤬' => '𞤊', '𞤭' => '𞤋', '𞤮' => '𞤌', '𞤯' => '𞤍', '𞤰' => '𞤎', '𞤱' => '𞤏', '𞤲' => '𞤐', '𞤳' => '𞤑', '𞤴' => '𞤒', '𞤵' => '𞤓', '𞤶' => '𞤔', '𞤷' => '𞤕', '𞤸' => '𞤖', '𞤹' => '𞤗', '𞤺' => '𞤘', '𞤻' => '𞤙', '𞤼' => '𞤚', '𞤽' => '𞤛', '𞤾' => '𞤜', '𞤿' => '𞤝', '𞥀' => '𞤞', '𞥁' => '𞤟', '𞥂' => '𞤠', '𞥃' => '𞤡'); diff --git a/build/vendor/symfony/polyfill-mbstring/bootstrap.php b/build/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 0000000..1a9452d --- /dev/null +++ b/build/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,257 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use RayGlobalScoped\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); + } +} +if (!\function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader($string) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_decode_numericentity($string, $map, $encoding); + } +} +if (!\function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity($string, $map, $encoding = null, $hex = \false) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); + } +} +if (!\function_exists('mb_convert_case')) { + function mb_convert_case($string, $mode, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_case($string, $mode, $encoding); + } +} +if (!\function_exists('mb_internal_encoding')) { + function mb_internal_encoding($encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_internal_encoding($encoding); + } +} +if (!\function_exists('mb_language')) { + function mb_language($language = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_language($language); + } +} +if (!\function_exists('mb_list_encodings')) { + function mb_list_encodings() + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_list_encodings(); + } +} +if (!\function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases($encoding) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_encoding_aliases($encoding); + } +} +if (!\function_exists('mb_check_encoding')) { + function mb_check_encoding($value = null, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_check_encoding($value, $encoding); + } +} +if (!\function_exists('mb_detect_encoding')) { + function mb_detect_encoding($string, $encodings = null, $strict = \false) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_detect_encoding($string, $encodings, $strict); + } +} +if (!\function_exists('mb_detect_order')) { + function mb_detect_order($encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_detect_order($encoding); + } +} +if (!\function_exists('mb_parse_str')) { + function mb_parse_str($string, &$result = []) + { + \parse_str($string, $result); + } +} +if (!\function_exists('mb_strlen')) { + function mb_strlen($string, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strlen($string, $encoding); + } +} +if (!\function_exists('mb_strpos')) { + function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); + } +} +if (!\function_exists('mb_strtolower')) { + function mb_strtolower($string, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strtolower($string, $encoding); + } +} +if (!\function_exists('mb_strtoupper')) { + function mb_strtoupper($string, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strtoupper($string, $encoding); + } +} +if (!\function_exists('mb_substitute_character')) { + function mb_substitute_character($substitute_character = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_substitute_character($substitute_character); + } +} +if (!\function_exists('mb_substr')) { + function mb_substr($string, $start, $length = 2147483647, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_substr($string, $start, $length, $encoding); + } +} +if (!\function_exists('mb_stripos')) { + function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); + } +} +if (!\function_exists('mb_stristr')) { + function mb_stristr($haystack, $needle, $before_needle = \false, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); + } +} +if (!\function_exists('mb_strrchr')) { + function mb_strrchr($haystack, $needle, $before_needle = \false, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); + } +} +if (!\function_exists('mb_strrichr')) { + function mb_strrichr($haystack, $needle, $before_needle = \false, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); + } +} +if (!\function_exists('mb_strripos')) { + function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); + } +} +if (!\function_exists('mb_strrpos')) { + function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); + } +} +if (!\function_exists('mb_strstr')) { + function mb_strstr($haystack, $needle, $before_needle = \false, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); + } +} +if (!\function_exists('mb_get_info')) { + function mb_get_info($type = 'all') + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_get_info($type); + } +} +if (!\function_exists('mb_http_output')) { + function mb_http_output($encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_http_output($encoding); + } +} +if (!\function_exists('mb_strwidth')) { + function mb_strwidth($string, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strwidth($string, $encoding); + } +} +if (!\function_exists('mb_substr_count')) { + function mb_substr_count($haystack, $needle, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_substr_count($haystack, $needle, $encoding); + } +} +if (!\function_exists('mb_output_handler')) { + function mb_output_handler($string, $status) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_output_handler($string, $status); + } +} +if (!\function_exists('mb_http_input')) { + function mb_http_input($type = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_http_input($type); + } +} +if (!\function_exists('mb_convert_variables')) { + function mb_convert_variables($to_encoding, $from_encoding, &...$vars) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); + } +} +if (!\function_exists('mb_ord')) { + function mb_ord($string, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_ord($string, $encoding); + } +} +if (!\function_exists('mb_chr')) { + function mb_chr($codepoint, $encoding = null) + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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); +} diff --git a/build/vendor/symfony/polyfill-mbstring/bootstrap80.php b/build/vendor/symfony/polyfill-mbstring/bootstrap80.php new file mode 100644 index 0000000..6747fc1 --- /dev/null +++ b/build/vendor/symfony/polyfill-mbstring/bootstrap80.php @@ -0,0 +1,254 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use RayGlobalScoped\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); + } +} +if (!\function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader(?string $string) : string + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_internal_encoding($encoding); + } +} +if (!\function_exists('mb_language')) { + function mb_language(?string $language = null) : string|bool + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_language($language); + } +} +if (!\function_exists('mb_list_encodings')) { + function mb_list_encodings() : array + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_list_encodings(); + } +} +if (!\function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases(?string $encoding) : array + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_detect_order((string) $encoding); + } +} +if (!\function_exists('mb_parse_str')) { + function mb_parse_str(?string $string, &$result = []) : bool + { + \parse_str((string) $string, $result); + } +} +if (!\function_exists('mb_strlen')) { + function mb_strlen(?string $string, ?string $encoding = null) : int + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strtolower((string) $string, $encoding); + } +} +if (!\function_exists('mb_strtoupper')) { + function mb_strtoupper(?string $string, ?string $encoding = null) : string + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_strrchr((string) $haystack, (string) $needle, $before_needle, (bool) $encoding); + } +} +if (!\function_exists('mb_strrichr')) { + function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = \false, ?string $encoding = null) : string|false + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_get_info((string) $type); + } +} +if (!\function_exists('mb_http_output')) { + function mb_http_output(?string $encoding = null) : string|bool + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_http_output($encoding); + } +} +if (!\function_exists('mb_strwidth')) { + function mb_strwidth(?string $string, ?string $encoding = null) : int + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\Mbstring::mb_ord((string) $string, $encoding); + } +} +if (!\function_exists('mb_chr')) { + function mb_chr(?int $codepoint, ?string $encoding = null) : string|false + { + return \RayGlobalScoped\Symfony\Polyfill\Mbstring\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 \RayGlobalScoped\Symfony\Polyfill\Mbstring\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); +} diff --git a/build/vendor/symfony/polyfill-php80/LICENSE b/build/vendor/symfony/polyfill-php80/LICENSE new file mode 100644 index 0000000..5593b1d --- /dev/null +++ b/build/vendor/symfony/polyfill-php80/LICENSE @@ -0,0 +1,19 @@ +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. diff --git a/build/vendor/symfony/polyfill-php80/Php80.php b/build/vendor/symfony/polyfill-php80/Php80.php new file mode 100644 index 0000000..1c64cbd --- /dev/null +++ b/build/vendor/symfony/polyfill-php80/Php80.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Polyfill\Php80; + +/** + * @author Ion Bazan + * @author Nico Oelgart + * @author Nicolas Grekas + * + * @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 + { + return '' === $needle || '' !== $haystack && 0 === \substr_compare($haystack, $needle, -\strlen($needle)); + } +} diff --git a/build/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/build/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php new file mode 100644 index 0000000..a3cd8ed --- /dev/null +++ b/build/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php @@ -0,0 +1,22 @@ +flags = $flags; + } +} diff --git a/build/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php b/build/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php new file mode 100644 index 0000000..213d9cb --- /dev/null +++ b/build/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use RayGlobalScoped\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 \RayGlobalScoped\Symfony\Polyfill\Php80\Php80::fdiv($num1, $num2); + } +} +if (!\function_exists('preg_last_error_msg')) { + function preg_last_error_msg() : string + { + return \RayGlobalScoped\Symfony\Polyfill\Php80\Php80::preg_last_error_msg(); + } +} +if (!\function_exists('str_contains')) { + function str_contains(string $haystack, string $needle) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Php80\Php80::str_contains($haystack, $needle); + } +} +if (!\function_exists('str_starts_with')) { + function str_starts_with(string $haystack, string $needle) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Php80\Php80::str_starts_with($haystack, $needle); + } +} +if (!\function_exists('str_ends_with')) { + function str_ends_with(string $haystack, string $needle) : bool + { + return \RayGlobalScoped\Symfony\Polyfill\Php80\Php80::str_ends_with($haystack, $needle); + } +} +if (!\function_exists('get_debug_type')) { + function get_debug_type($value) : string + { + return \RayGlobalScoped\Symfony\Polyfill\Php80\Php80::get_debug_type($value); + } +} +if (!\function_exists('get_resource_id')) { + function get_resource_id($resource) : int + { + return \RayGlobalScoped\Symfony\Polyfill\Php80\Php80::get_resource_id($resource); + } +} diff --git a/build/vendor/symfony/service-contracts/Attribute/Required.php b/build/vendor/symfony/service-contracts/Attribute/Required.php new file mode 100644 index 0000000..8138655 --- /dev/null +++ b/build/vendor/symfony/service-contracts/Attribute/Required.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Contracts\Service\Attribute; + +use 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 + */ +#[Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] +final class Required +{ +} diff --git a/build/vendor/symfony/service-contracts/LICENSE b/build/vendor/symfony/service-contracts/LICENSE new file mode 100644 index 0000000..69d925b --- /dev/null +++ b/build/vendor/symfony/service-contracts/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-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. diff --git a/build/vendor/symfony/service-contracts/ResetInterface.php b/build/vendor/symfony/service-contracts/ResetInterface.php new file mode 100644 index 0000000..129fa4f --- /dev/null +++ b/build/vendor/symfony/service-contracts/ResetInterface.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\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(); +} diff --git a/build/vendor/symfony/service-contracts/ServiceLocatorTrait.php b/build/vendor/symfony/service-contracts/ServiceLocatorTrait.php new file mode 100644 index 0000000..cc7074b --- /dev/null +++ b/build/vendor/symfony/service-contracts/ServiceLocatorTrait.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Contracts\Service; + +use RayGlobalScoped\Psr\Container\ContainerExceptionInterface; +use RayGlobalScoped\Psr\Container\NotFoundExceptionInterface; +// Help opcache.preload discover always-needed symbols +\class_exists(\RayGlobalScoped\Psr\Container\ContainerExceptionInterface::class); +\class_exists(\RayGlobalScoped\Psr\Container\NotFoundExceptionInterface::class); +/** + * A trait to help implement ServiceProviderInterface. + * + * @author Robin Chalas + * @author Nicolas Grekas + */ +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($id) + { + return isset($this->factories[$id]); + } + /** + * {@inheritdoc} + */ + public function get($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) : \RayGlobalScoped\Psr\Container\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 \RayGlobalScoped\Psr\Container\NotFoundExceptionInterface + { + }; + } + private function createCircularReferenceException(string $id, array $path) : \RayGlobalScoped\Psr\Container\ContainerExceptionInterface + { + return new class(\sprintf('Circular reference detected for service "%s", path: "%s".', $id, \implode(' -> ', $path))) extends \RuntimeException implements \RayGlobalScoped\Psr\Container\ContainerExceptionInterface + { + }; + } +} diff --git a/build/vendor/symfony/service-contracts/ServiceProviderInterface.php b/build/vendor/symfony/service-contracts/ServiceProviderInterface.php new file mode 100644 index 0000000..42f8eab --- /dev/null +++ b/build/vendor/symfony/service-contracts/ServiceProviderInterface.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Contracts\Service; + +use RayGlobalScoped\Psr\Container\ContainerInterface; +/** + * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container. + * + * @author Nicolas Grekas + * @author Mateusz Sip + */ +interface ServiceProviderInterface extends \RayGlobalScoped\Psr\Container\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; +} diff --git a/build/vendor/symfony/service-contracts/ServiceSubscriberInterface.php b/build/vendor/symfony/service-contracts/ServiceSubscriberInterface.php new file mode 100644 index 0000000..cd72e54 --- /dev/null +++ b/build/vendor/symfony/service-contracts/ServiceSubscriberInterface.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\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 + */ +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 array The required service types, optionally keyed by service names + */ + public static function getSubscribedServices(); +} diff --git a/build/vendor/symfony/service-contracts/ServiceSubscriberTrait.php b/build/vendor/symfony/service-contracts/ServiceSubscriberTrait.php new file mode 100644 index 0000000..3fce489 --- /dev/null +++ b/build/vendor/symfony/service-contracts/ServiceSubscriberTrait.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Contracts\Service; + +use RayGlobalScoped\Psr\Container\ContainerInterface; +/** + * Implementation of ServiceSubscriberInterface that determines subscribed services from + * private method return types. Service ids are available as "ClassName::methodName". + * + * @author Kevin Bond + */ +trait ServiceSubscriberTrait +{ + /** @var ContainerInterface */ + protected $container; + public static function getSubscribedServices() : array + { + static $services; + if (null !== $services) { + return $services; + } + $services = \is_callable(['parent', __FUNCTION__]) ? parent::getSubscribedServices() : []; + 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 && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) { + $services[self::class . '::' . $method->name] = '?' . ($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $type); + } + } + return $services; + } + /** + * @required + */ + public function setContainer(\RayGlobalScoped\Psr\Container\ContainerInterface $container) + { + $this->container = $container; + if (\is_callable(['parent', __FUNCTION__])) { + return parent::setContainer($container); + } + return null; + } +} diff --git a/build/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php b/build/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php new file mode 100644 index 0000000..1ed22b6 --- /dev/null +++ b/build/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Contracts\Service\Test; + +use RayGlobalScoped\PHPUnit\Framework\TestCase; +use RayGlobalScoped\Psr\Container\ContainerInterface; +use RayGlobalScoped\Symfony\Contracts\Service\ServiceLocatorTrait; +abstract class ServiceLocatorTest extends \RayGlobalScoped\PHPUnit\Framework\TestCase +{ + protected function getServiceLocator(array $factories) + { + return new class($factories) implements \RayGlobalScoped\Psr\Container\ContainerInterface + { + use ServiceLocatorTrait; + }; + } + public function testHas() + { + $locator = $this->getServiceLocator(['foo' => function () { + return 'bar'; + }, 'bar' => function () { + return 'baz'; + }, function () { + return 'dummy'; + }]); + $this->assertTrue($locator->has('foo')); + $this->assertTrue($locator->has('bar')); + $this->assertFalse($locator->has('dummy')); + } + public function testGet() + { + $locator = $this->getServiceLocator(['foo' => function () { + return 'bar'; + }, 'bar' => function () { + return 'baz'; + }]); + $this->assertSame('bar', $locator->get('foo')); + $this->assertSame('baz', $locator->get('bar')); + } + public function testGetDoesNotMemoize() + { + $i = 0; + $locator = $this->getServiceLocator(['foo' => function () use(&$i) { + ++$i; + return 'bar'; + }]); + $this->assertSame('bar', $locator->get('foo')); + $this->assertSame('bar', $locator->get('foo')); + $this->assertSame(2, $i); + } + public function testThrowsOnUndefinedInternalService() + { + if (!$this->getExpectedException()) { + $this->expectException('RayGlobalScoped\\Psr\\Container\\NotFoundExceptionInterface'); + $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.'); + } + $locator = $this->getServiceLocator(['foo' => function () use(&$locator) { + return $locator->get('bar'); + }]); + $locator->get('foo'); + } + public function testThrowsOnCircularReference() + { + $this->expectException('RayGlobalScoped\\Psr\\Container\\ContainerExceptionInterface'); + $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".'); + $locator = $this->getServiceLocator(['foo' => function () use(&$locator) { + return $locator->get('bar'); + }, 'bar' => function () use(&$locator) { + return $locator->get('baz'); + }, 'baz' => function () use(&$locator) { + return $locator->get('bar'); + }]); + $locator->get('foo'); + } +} diff --git a/build/vendor/symfony/stopwatch/LICENSE b/build/vendor/symfony/stopwatch/LICENSE new file mode 100644 index 0000000..9ff2d0d --- /dev/null +++ b/build/vendor/symfony/stopwatch/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2021 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. diff --git a/build/vendor/symfony/stopwatch/Section.php b/build/vendor/symfony/stopwatch/Section.php new file mode 100644 index 0000000..a90419a --- /dev/null +++ b/build/vendor/symfony/stopwatch/Section.php @@ -0,0 +1,163 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\Stopwatch; + +/** + * Stopwatch section. + * + * @author Fabien Potencier + */ +class Section +{ + /** + * @var StopwatchEvent[] + */ + private $events = []; + /** + * @var float|null + */ + private $origin; + /** + * @var bool + */ + private $morePrecision; + /** + * @var string + */ + private $id; + /** + * @var Section[] + */ + private $children = []; + /** + * @param float|null $origin Set the origin of the events in this section, use null to set their origin to their start time + * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision + */ + public function __construct(float $origin = null, bool $morePrecision = \false) + { + $this->origin = $origin; + $this->morePrecision = $morePrecision; + } + /** + * Returns the child section. + * + * @return self|null The child section or null when none found + */ + public function get(string $id) + { + foreach ($this->children as $child) { + if ($id === $child->getId()) { + return $child; + } + } + return null; + } + /** + * Creates or re-opens a child section. + * + * @param string|null $id Null to create a new section, the identifier to re-open an existing one + * + * @return self + */ + public function open(?string $id) + { + if (null === $id || null === ($session = $this->get($id))) { + $session = $this->children[] = new self(\microtime(\true) * 1000, $this->morePrecision); + } + return $session; + } + /** + * @return string The identifier of the section + */ + public function getId() + { + return $this->id; + } + /** + * Sets the session identifier. + * + * @return $this + */ + public function setId(string $id) + { + $this->id = $id; + return $this; + } + /** + * Starts an event. + * + * @return StopwatchEvent The event + */ + public function startEvent(string $name, ?string $category) + { + if (!isset($this->events[$name])) { + $this->events[$name] = new \RayGlobalScoped\Symfony\Component\Stopwatch\StopwatchEvent($this->origin ?: \microtime(\true) * 1000, $category, $this->morePrecision, $name); + } + return $this->events[$name]->start(); + } + /** + * Checks if the event was started. + * + * @return bool + */ + public function isEventStarted(string $name) + { + return isset($this->events[$name]) && $this->events[$name]->isStarted(); + } + /** + * Stops an event. + * + * @return StopwatchEvent The event + * + * @throws \LogicException When the event has not been started + */ + public function stopEvent(string $name) + { + if (!isset($this->events[$name])) { + throw new \LogicException(\sprintf('Event "%s" is not started.', $name)); + } + return $this->events[$name]->stop(); + } + /** + * Stops then restarts an event. + * + * @return StopwatchEvent The event + * + * @throws \LogicException When the event has not been started + */ + public function lap(string $name) + { + return $this->stopEvent($name)->start(); + } + /** + * Returns a specific event by name. + * + * @return StopwatchEvent The event + * + * @throws \LogicException When the event is not known + */ + public function getEvent(string $name) + { + if (!isset($this->events[$name])) { + throw new \LogicException(\sprintf('Event "%s" is not known.', $name)); + } + return $this->events[$name]; + } + /** + * Returns the events from this section. + * + * @return StopwatchEvent[] An array of StopwatchEvent instances + */ + public function getEvents() + { + return $this->events; + } +} diff --git a/build/vendor/symfony/stopwatch/Stopwatch.php b/build/vendor/symfony/stopwatch/Stopwatch.php new file mode 100644 index 0000000..26fa2e1 --- /dev/null +++ b/build/vendor/symfony/stopwatch/Stopwatch.php @@ -0,0 +1,146 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\Stopwatch; + +use RayGlobalScoped\Symfony\Contracts\Service\ResetInterface; +// Help opcache.preload discover always-needed symbols +\class_exists(\RayGlobalScoped\Symfony\Component\Stopwatch\Section::class); +/** + * Stopwatch provides a way to profile code. + * + * @author Fabien Potencier + */ +class Stopwatch implements \RayGlobalScoped\Symfony\Contracts\Service\ResetInterface +{ + /** + * @var bool + */ + private $morePrecision; + /** + * @var Section[] + */ + private $sections; + /** + * @var Section[] + */ + private $activeSections; + /** + * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision + */ + public function __construct(bool $morePrecision = \false) + { + $this->morePrecision = $morePrecision; + $this->reset(); + } + /** + * @return Section[] + */ + public function getSections() + { + return $this->sections; + } + /** + * Creates a new section or re-opens an existing section. + * + * @param string|null $id The id of the session to re-open, null to create a new one + * + * @throws \LogicException When the section to re-open is not reachable + */ + public function openSection(string $id = null) + { + $current = \end($this->activeSections); + if (null !== $id && null === $current->get($id)) { + throw new \LogicException(\sprintf('The section "%s" has been started at an other level and can not be opened.', $id)); + } + $this->start('__section__.child', 'section'); + $this->activeSections[] = $current->open($id); + $this->start('__section__'); + } + /** + * Stops the last started section. + * + * The id parameter is used to retrieve the events from this section. + * + * @see getSectionEvents() + * + * @throws \LogicException When there's no started section to be stopped + */ + public function stopSection(string $id) + { + $this->stop('__section__'); + if (1 == \count($this->activeSections)) { + throw new \LogicException('There is no started section to stop.'); + } + $this->sections[$id] = \array_pop($this->activeSections)->setId($id); + $this->stop('__section__.child'); + } + /** + * Starts an event. + * + * @return StopwatchEvent + */ + public function start(string $name, string $category = null) + { + return \end($this->activeSections)->startEvent($name, $category); + } + /** + * Checks if the event was started. + * + * @return bool + */ + public function isStarted(string $name) + { + return \end($this->activeSections)->isEventStarted($name); + } + /** + * Stops an event. + * + * @return StopwatchEvent + */ + public function stop(string $name) + { + return \end($this->activeSections)->stopEvent($name); + } + /** + * Stops then restarts an event. + * + * @return StopwatchEvent + */ + public function lap(string $name) + { + return \end($this->activeSections)->stopEvent($name)->start(); + } + /** + * Returns a specific event by name. + * + * @return StopwatchEvent + */ + public function getEvent(string $name) + { + return \end($this->activeSections)->getEvent($name); + } + /** + * Gets all events for a given section. + * + * @return StopwatchEvent[] + */ + public function getSectionEvents(string $id) + { + return isset($this->sections[$id]) ? $this->sections[$id]->getEvents() : []; + } + /** + * Resets the stopwatch to its original state. + */ + public function reset() + { + $this->sections = $this->activeSections = ['__root__' => new \RayGlobalScoped\Symfony\Component\Stopwatch\Section(null, $this->morePrecision)]; + } +} diff --git a/build/vendor/symfony/stopwatch/StopwatchEvent.php b/build/vendor/symfony/stopwatch/StopwatchEvent.php new file mode 100644 index 0000000..09bf0fd --- /dev/null +++ b/build/vendor/symfony/stopwatch/StopwatchEvent.php @@ -0,0 +1,225 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\Stopwatch; + +/** + * Represents an Event managed by Stopwatch. + * + * @author Fabien Potencier + */ +class StopwatchEvent +{ + /** + * @var StopwatchPeriod[] + */ + private $periods = []; + /** + * @var float + */ + private $origin; + /** + * @var string + */ + private $category; + /** + * @var bool + */ + private $morePrecision; + /** + * @var float[] + */ + private $started = []; + /** + * @var string + */ + private $name; + /** + * @param float $origin The origin time in milliseconds + * @param string|null $category The event category or null to use the default + * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision + * @param string|null $name The event name or null to define the name as default + * + * @throws \InvalidArgumentException When the raw time is not valid + */ + public function __construct(float $origin, string $category = null, bool $morePrecision = \false, string $name = null) + { + $this->origin = $this->formatTime($origin); + $this->category = \is_string($category) ? $category : 'default'; + $this->morePrecision = $morePrecision; + $this->name = $name ?? 'default'; + } + /** + * Gets the category. + * + * @return string The category + */ + public function getCategory() + { + return $this->category; + } + /** + * Gets the origin. + * + * @return float The origin in milliseconds + */ + public function getOrigin() + { + return $this->origin; + } + /** + * Starts a new event period. + * + * @return $this + */ + public function start() + { + $this->started[] = $this->getNow(); + return $this; + } + /** + * Stops the last started event period. + * + * @return $this + * + * @throws \LogicException When stop() is called without a matching call to start() + */ + public function stop() + { + if (!\count($this->started)) { + throw new \LogicException('stop() called but start() has not been called before.'); + } + $this->periods[] = new \RayGlobalScoped\Symfony\Component\Stopwatch\StopwatchPeriod(\array_pop($this->started), $this->getNow(), $this->morePrecision); + return $this; + } + /** + * Checks if the event was started. + * + * @return bool + */ + public function isStarted() + { + return !empty($this->started); + } + /** + * Stops the current period and then starts a new one. + * + * @return $this + */ + public function lap() + { + return $this->stop()->start(); + } + /** + * Stops all non already stopped periods. + */ + public function ensureStopped() + { + while (\count($this->started)) { + $this->stop(); + } + } + /** + * Gets all event periods. + * + * @return StopwatchPeriod[] An array of StopwatchPeriod instances + */ + public function getPeriods() + { + return $this->periods; + } + /** + * Gets the relative time of the start of the first period. + * + * @return int|float The time (in milliseconds) + */ + public function getStartTime() + { + if (isset($this->periods[0])) { + return $this->periods[0]->getStartTime(); + } + if ($this->started) { + return $this->started[0]; + } + return 0; + } + /** + * Gets the relative time of the end of the last period. + * + * @return int|float The time (in milliseconds) + */ + public function getEndTime() + { + $count = \count($this->periods); + return $count ? $this->periods[$count - 1]->getEndTime() : 0; + } + /** + * Gets the duration of the events (including all periods). + * + * @return int|float The duration (in milliseconds) + */ + public function getDuration() + { + $periods = $this->periods; + $left = \count($this->started); + for ($i = $left - 1; $i >= 0; --$i) { + $periods[] = new \RayGlobalScoped\Symfony\Component\Stopwatch\StopwatchPeriod($this->started[$i], $this->getNow(), $this->morePrecision); + } + $total = 0; + foreach ($periods as $period) { + $total += $period->getDuration(); + } + return $total; + } + /** + * Gets the max memory usage of all periods. + * + * @return int The memory usage (in bytes) + */ + public function getMemory() + { + $memory = 0; + foreach ($this->periods as $period) { + if ($period->getMemory() > $memory) { + $memory = $period->getMemory(); + } + } + return $memory; + } + /** + * Return the current time relative to origin. + * + * @return float Time in ms + */ + protected function getNow() + { + return $this->formatTime(\microtime(\true) * 1000 - $this->origin); + } + /** + * Formats a time. + * + * @throws \InvalidArgumentException When the raw time is not valid + */ + private function formatTime(float $time) : float + { + return \round($time, 1); + } + /** + * Gets the event name. + */ + public function getName() : string + { + return $this->name; + } + public function __toString() : string + { + return \sprintf('%s/%s: %.2F MiB - %d ms', $this->getCategory(), $this->getName(), $this->getMemory() / 1024 / 1024, $this->getDuration()); + } +} diff --git a/build/vendor/symfony/stopwatch/StopwatchPeriod.php b/build/vendor/symfony/stopwatch/StopwatchPeriod.php new file mode 100644 index 0000000..ae58936 --- /dev/null +++ b/build/vendor/symfony/stopwatch/StopwatchPeriod.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\Stopwatch; + +/** + * Represents an Period for an Event. + * + * @author Fabien Potencier + */ +class StopwatchPeriod +{ + private $start; + private $end; + private $memory; + /** + * @param int|float $start The relative time of the start of the period (in milliseconds) + * @param int|float $end The relative time of the end of the period (in milliseconds) + * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision + */ + public function __construct($start, $end, bool $morePrecision = \false) + { + $this->start = $morePrecision ? (float) $start : (int) $start; + $this->end = $morePrecision ? (float) $end : (int) $end; + $this->memory = \memory_get_usage(\true); + } + /** + * Gets the relative time of the start of the period. + * + * @return int|float The time (in milliseconds) + */ + public function getStartTime() + { + return $this->start; + } + /** + * Gets the relative time of the end of the period. + * + * @return int|float The time (in milliseconds) + */ + public function getEndTime() + { + return $this->end; + } + /** + * Gets the time spent in this period. + * + * @return int|float The period duration (in milliseconds) + */ + public function getDuration() + { + return $this->end - $this->start; + } + /** + * Gets the memory usage. + * + * @return int The memory usage (in bytes) + */ + public function getMemory() + { + return $this->memory; + } + public function __toString() : string + { + return \sprintf('%.2F MiB - %d ms', $this->getMemory() / 1024 / 1024, $this->getDuration()); + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/AmqpCaster.php b/build/vendor/symfony/var-dumper/Caster/AmqpCaster.php new file mode 100644 index 0000000..4cd5466 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/AmqpCaster.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts Amqp related classes to array representation. + * + * @author Grégoire Pineau + * + * @final + */ +class AmqpCaster +{ + private const FLAGS = [\AMQP_DURABLE => 'AMQP_DURABLE', \AMQP_PASSIVE => 'AMQP_PASSIVE', \AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', \AMQP_AUTODELETE => 'AMQP_AUTODELETE', \AMQP_INTERNAL => 'AMQP_INTERNAL', \AMQP_NOLOCAL => 'AMQP_NOLOCAL', \AMQP_AUTOACK => 'AMQP_AUTOACK', \AMQP_IFEMPTY => 'AMQP_IFEMPTY', \AMQP_IFUNUSED => 'AMQP_IFUNUSED', \AMQP_MANDATORY => 'AMQP_MANDATORY', \AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', \AMQP_MULTIPLE => 'AMQP_MULTIPLE', \AMQP_NOWAIT => 'AMQP_NOWAIT', \AMQP_REQUEUE => 'AMQP_REQUEUE']; + private const EXCHANGE_TYPES = [\AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', \AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', \AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', \AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS']; + public static function castConnection(\AMQPConnection $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'is_connected' => $c->isConnected()]; + // Recent version of the extension already expose private properties + if (isset($a["\0AMQPConnection\0login"])) { + return $a; + } + // BC layer in the amqp lib + if (\method_exists($c, 'getReadTimeout')) { + $timeout = $c->getReadTimeout(); + } else { + $timeout = $c->getTimeout(); + } + $a += [$prefix . 'is_connected' => $c->isConnected(), $prefix . 'login' => $c->getLogin(), $prefix . 'password' => $c->getPassword(), $prefix . 'host' => $c->getHost(), $prefix . 'vhost' => $c->getVhost(), $prefix . 'port' => $c->getPort(), $prefix . 'read_timeout' => $timeout]; + return $a; + } + public static function castChannel(\AMQPChannel $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'is_connected' => $c->isConnected(), $prefix . 'channel_id' => $c->getChannelId()]; + // Recent version of the extension already expose private properties + if (isset($a["\0AMQPChannel\0connection"])) { + return $a; + } + $a += [$prefix . 'connection' => $c->getConnection(), $prefix . 'prefetch_size' => $c->getPrefetchSize(), $prefix . 'prefetch_count' => $c->getPrefetchCount()]; + return $a; + } + public static function castQueue(\AMQPQueue $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'flags' => self::extractFlags($c->getFlags())]; + // Recent version of the extension already expose private properties + if (isset($a["\0AMQPQueue\0name"])) { + return $a; + } + $a += [$prefix . 'connection' => $c->getConnection(), $prefix . 'channel' => $c->getChannel(), $prefix . 'name' => $c->getName(), $prefix . 'arguments' => $c->getArguments()]; + return $a; + } + public static function castExchange(\AMQPExchange $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'flags' => self::extractFlags($c->getFlags())]; + $type = isset(self::EXCHANGE_TYPES[$c->getType()]) ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::EXCHANGE_TYPES[$c->getType()], $c->getType()) : $c->getType(); + // Recent version of the extension already expose private properties + if (isset($a["\0AMQPExchange\0name"])) { + $a["\0AMQPExchange\0type"] = $type; + return $a; + } + $a += [$prefix . 'connection' => $c->getConnection(), $prefix . 'channel' => $c->getChannel(), $prefix . 'name' => $c->getName(), $prefix . 'type' => $type, $prefix . 'arguments' => $c->getArguments()]; + return $a; + } + public static function castEnvelope(\AMQPEnvelope $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $deliveryMode = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($c->getDeliveryMode() . (2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()); + // Recent version of the extension already expose private properties + if (isset($a["\0AMQPEnvelope\0body"])) { + $a["\0AMQPEnvelope\0delivery_mode"] = $deliveryMode; + return $a; + } + if (!($filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE)) { + $a += [$prefix . 'body' => $c->getBody()]; + } + $a += [$prefix . 'delivery_tag' => $c->getDeliveryTag(), $prefix . 'is_redelivery' => $c->isRedelivery(), $prefix . 'exchange_name' => $c->getExchangeName(), $prefix . 'routing_key' => $c->getRoutingKey(), $prefix . 'content_type' => $c->getContentType(), $prefix . 'content_encoding' => $c->getContentEncoding(), $prefix . 'headers' => $c->getHeaders(), $prefix . 'delivery_mode' => $deliveryMode, $prefix . 'priority' => $c->getPriority(), $prefix . 'correlation_id' => $c->getCorrelationId(), $prefix . 'reply_to' => $c->getReplyTo(), $prefix . 'expiration' => $c->getExpiration(), $prefix . 'message_id' => $c->getMessageId(), $prefix . 'timestamp' => $c->getTimeStamp(), $prefix . 'type' => $c->getType(), $prefix . 'user_id' => $c->getUserId(), $prefix . 'app_id' => $c->getAppId()]; + return $a; + } + private static function extractFlags(int $flags) : \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub + { + $flagsArray = []; + foreach (self::FLAGS as $value => $name) { + if ($flags & $value) { + $flagsArray[] = $name; + } + } + if (!$flagsArray) { + $flagsArray = ['AMQP_NOPARAM']; + } + return new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\implode('|', $flagsArray), $flags); + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/ArgsStub.php b/build/vendor/symfony/var-dumper/Caster/ArgsStub.php new file mode 100644 index 0000000..c37f8f7 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/ArgsStub.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Represents a list of function arguments. + * + * @author Nicolas Grekas + */ +class ArgsStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub +{ + private static $parameters = []; + public function __construct(array $args, string $function, ?string $class) + { + [$variadic, $params] = self::getParameters($function, $class); + $values = []; + foreach ($args as $k => $v) { + $values[$k] = !\is_scalar($v) && !$v instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($v) : $v; + } + if (null === $params) { + parent::__construct($values, \false); + return; + } + if (\count($values) < \count($params)) { + $params = \array_slice($params, 0, \count($values)); + } elseif (\count($values) > \count($params)) { + $values[] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub(\array_splice($values, \count($params)), \false); + $params[] = $variadic; + } + if (['...'] === $params) { + $this->dumpKeys = \false; + $this->value = $values[0]->value; + } else { + $this->value = \array_combine($params, $values); + } + } + private static function getParameters(string $function, ?string $class) : array + { + if (isset(self::$parameters[$k = $class . '::' . $function])) { + return self::$parameters[$k]; + } + try { + $r = null !== $class ? new \ReflectionMethod($class, $function) : new \ReflectionFunction($function); + } catch (\ReflectionException $e) { + return [null, null]; + } + $variadic = '...'; + $params = []; + foreach ($r->getParameters() as $v) { + $k = '$' . $v->name; + if ($v->isPassedByReference()) { + $k = '&' . $k; + } + if ($v->isVariadic()) { + $variadic .= $k; + } else { + $params[] = $k; + } + } + return self::$parameters[$k] = [$variadic, $params]; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/Caster.php b/build/vendor/symfony/var-dumper/Caster/Caster.php new file mode 100644 index 0000000..c814640 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/Caster.php @@ -0,0 +1,155 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Helper for filtering out properties in casters. + * + * @author Nicolas Grekas + * + * @final + */ +class Caster +{ + public const EXCLUDE_VERBOSE = 1; + public const EXCLUDE_VIRTUAL = 2; + public const EXCLUDE_DYNAMIC = 4; + public const EXCLUDE_PUBLIC = 8; + public const EXCLUDE_PROTECTED = 16; + public const EXCLUDE_PRIVATE = 32; + public const EXCLUDE_NULL = 64; + public const EXCLUDE_EMPTY = 128; + public const EXCLUDE_NOT_IMPORTANT = 256; + public const EXCLUDE_STRICT = 512; + public const PREFIX_VIRTUAL = "\0~\0"; + public const PREFIX_DYNAMIC = "\0+\0"; + public const PREFIX_PROTECTED = "\0*\0"; + /** + * Casts objects to arrays and adds the dynamic property prefix. + * + * @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not + * + * @return array The array-cast of the object, with prefixed dynamic properties + */ + public static function castObject(object $obj, string $class, bool $hasDebugInfo = \false, string $debugClass = null) : array + { + if ($hasDebugInfo) { + try { + $debugInfo = $obj->__debugInfo(); + } catch (\Exception $e) { + // ignore failing __debugInfo() + $hasDebugInfo = \false; + } + } + $a = $obj instanceof \Closure ? [] : (array) $obj; + if ($obj instanceof \__PHP_Incomplete_Class) { + return $a; + } + if ($a) { + static $publicProperties = []; + $debugClass = $debugClass ?? \get_debug_type($obj); + $i = 0; + $prefixedKeys = []; + foreach ($a as $k => $v) { + if ("\0" !== ($k[0] ?? '')) { + if (!isset($publicProperties[$class])) { + foreach ((new \ReflectionClass($class))->getProperties(\ReflectionProperty::IS_PUBLIC) as $prop) { + $publicProperties[$class][$prop->name] = \true; + } + } + if (!isset($publicProperties[$class][$k])) { + $prefixedKeys[$i] = self::PREFIX_DYNAMIC . $k; + } + } elseif ($debugClass !== $class && 1 === \strpos($k, $class)) { + $prefixedKeys[$i] = "\0" . $debugClass . \strrchr($k, "\0"); + } + ++$i; + } + if ($prefixedKeys) { + $keys = \array_keys($a); + foreach ($prefixedKeys as $i => $k) { + $keys[$i] = $k; + } + $a = \array_combine($keys, $a); + } + } + if ($hasDebugInfo && \is_array($debugInfo)) { + foreach ($debugInfo as $k => $v) { + if (!isset($k[0]) || "\0" !== $k[0]) { + if (\array_key_exists(self::PREFIX_DYNAMIC . $k, $a)) { + continue; + } + $k = self::PREFIX_VIRTUAL . $k; + } + unset($a[$k]); + $a[$k] = $v; + } + } + return $a; + } + /** + * Filters out the specified properties. + * + * By default, a single match in the $filter bit field filters properties out, following an "or" logic. + * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. + * + * @param array $a The array containing the properties to filter + * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out + * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set + * @param int &$count Set to the number of removed properties + * + * @return array The filtered array + */ + public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0) : array + { + $count = 0; + foreach ($a as $k => $v) { + $type = self::EXCLUDE_STRICT & $filter; + if (null === $v) { + $type |= self::EXCLUDE_NULL & $filter; + $type |= self::EXCLUDE_EMPTY & $filter; + } elseif (\false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || [] === $v) { + $type |= self::EXCLUDE_EMPTY & $filter; + } + if (self::EXCLUDE_NOT_IMPORTANT & $filter && !\in_array($k, $listedProperties, \true)) { + $type |= self::EXCLUDE_NOT_IMPORTANT; + } + if (self::EXCLUDE_VERBOSE & $filter && \in_array($k, $listedProperties, \true)) { + $type |= self::EXCLUDE_VERBOSE; + } + if (!isset($k[1]) || "\0" !== $k[0]) { + $type |= self::EXCLUDE_PUBLIC & $filter; + } elseif ('~' === $k[1]) { + $type |= self::EXCLUDE_VIRTUAL & $filter; + } elseif ('+' === $k[1]) { + $type |= self::EXCLUDE_DYNAMIC & $filter; + } elseif ('*' === $k[1]) { + $type |= self::EXCLUDE_PROTECTED & $filter; + } else { + $type |= self::EXCLUDE_PRIVATE & $filter; + } + if (self::EXCLUDE_STRICT & $filter ? $type === $filter : $type) { + unset($a[$k]); + ++$count; + } + } + return $a; + } + public static function castPhpIncompleteClass(\__PHP_Incomplete_Class $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) : array + { + if (isset($a['__PHP_Incomplete_Class_Name'])) { + $stub->class .= '(' . $a['__PHP_Incomplete_Class_Name'] . ')'; + unset($a['__PHP_Incomplete_Class_Name']); + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/ClassStub.php b/build/vendor/symfony/var-dumper/Caster/ClassStub.php new file mode 100644 index 0000000..c1032c0 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/ClassStub.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Represents a PHP class identifier. + * + * @author Nicolas Grekas + */ +class ClassStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub +{ + /** + * @param string $identifier A PHP identifier, e.g. a class, method, interface, etc. name + * @param callable $callable The callable targeted by the identifier when it is ambiguous or not a real PHP identifier + */ + public function __construct(string $identifier, $callable = null) + { + $this->value = $identifier; + try { + if (null !== $callable) { + if ($callable instanceof \Closure) { + $r = new \ReflectionFunction($callable); + } elseif (\is_object($callable)) { + $r = [$callable, '__invoke']; + } elseif (\is_array($callable)) { + $r = $callable; + } elseif (\false !== ($i = \strpos($callable, '::'))) { + $r = [\substr($callable, 0, $i), \substr($callable, 2 + $i)]; + } else { + $r = new \ReflectionFunction($callable); + } + } elseif (0 < ($i = \strpos($identifier, '::') ?: \strpos($identifier, '->'))) { + $r = [\substr($identifier, 0, $i), \substr($identifier, 2 + $i)]; + } else { + $r = new \ReflectionClass($identifier); + } + if (\is_array($r)) { + try { + $r = new \ReflectionMethod($r[0], $r[1]); + } catch (\ReflectionException $e) { + $r = new \ReflectionClass($r[0]); + } + } + if (\false !== \strpos($identifier, "@anonymous\0")) { + $this->value = $identifier = \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]; + }, $identifier); + } + if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) { + $s = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ReflectionCaster::castFunctionAbstract($r, [], new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub(), \true, \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE); + $s = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ReflectionCaster::getSignature($s); + if ('()' === \substr($identifier, -2)) { + $this->value = \substr_replace($identifier, $s, -2); + } else { + $this->value .= $s; + } + } + } catch (\ReflectionException $e) { + return; + } finally { + if (0 < ($i = \strrpos($this->value, '\\'))) { + $this->attr['ellipsis'] = \strlen($this->value) - $i; + $this->attr['ellipsis-type'] = 'class'; + $this->attr['ellipsis-tail'] = 1; + } + } + if ($f = $r->getFileName()) { + $this->attr['file'] = $f; + $this->attr['line'] = $r->getStartLine(); + } + } + public static function wrapCallable($callable) + { + if (\is_object($callable) || !\is_callable($callable)) { + return $callable; + } + if (!\is_array($callable)) { + $callable = new static($callable, $callable); + } elseif (\is_string($callable[0])) { + $callable[0] = new static($callable[0], $callable); + } else { + $callable[1] = new static($callable[1], $callable); + } + return $callable; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/ConstStub.php b/build/vendor/symfony/var-dumper/Caster/ConstStub.php new file mode 100644 index 0000000..16f5923 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/ConstStub.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Represents a PHP constant and its value. + * + * @author Nicolas Grekas + */ +class ConstStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub +{ + public function __construct(string $name, $value = null) + { + $this->class = $name; + $this->value = 1 < \func_num_args() ? $value : $name; + } + /** + * @return string + */ + public function __toString() + { + return (string) $this->value; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/CutArrayStub.php b/build/vendor/symfony/var-dumper/Caster/CutArrayStub.php new file mode 100644 index 0000000..b09b92c --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/CutArrayStub.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +/** + * Represents a cut array. + * + * @author Nicolas Grekas + */ +class CutArrayStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub +{ + public $preservedSubset; + public function __construct(array $value, array $preservedKeys) + { + parent::__construct($value); + $this->preservedSubset = \array_intersect_key($value, \array_flip($preservedKeys)); + $this->cut -= \count($this->preservedSubset); + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/CutStub.php b/build/vendor/symfony/var-dumper/Caster/CutStub.php new file mode 100644 index 0000000..6ac0ce7 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/CutStub.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Represents the main properties of a PHP variable, pre-casted by a caster. + * + * @author Nicolas Grekas + */ +class CutStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub +{ + public function __construct($value) + { + $this->value = $value; + switch (\gettype($value)) { + case 'object': + $this->type = self::TYPE_OBJECT; + $this->class = \get_class($value); + if ($value instanceof \Closure) { + \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ReflectionCaster::castClosure($value, [], $this, \true, \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE); + } + $this->cut = -1; + break; + case 'array': + $this->type = self::TYPE_ARRAY; + $this->class = self::ARRAY_ASSOC; + $this->cut = $this->value = \count($value); + break; + case 'resource': + case 'unknown type': + case 'resource (closed)': + $this->type = self::TYPE_RESOURCE; + $this->handle = (int) $value; + if ('Unknown' === ($this->class = @\get_resource_type($value))) { + $this->class = 'Closed'; + } + $this->cut = -1; + break; + case 'string': + $this->type = self::TYPE_STRING; + $this->class = \preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; + $this->cut = self::STRING_BINARY === $this->class ? \strlen($value) : \mb_strlen($value, 'UTF-8'); + $this->value = ''; + break; + } + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/DOMCaster.php b/build/vendor/symfony/var-dumper/Caster/DOMCaster.php new file mode 100644 index 0000000..09a7c26 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/DOMCaster.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts DOM related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class DOMCaster +{ + private const ERROR_CODES = [\DOM_PHP_ERR => 'DOM_PHP_ERR', \DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', \DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', \DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', \DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', \DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', \DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', \DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', \DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', \DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', \DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', \DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', \DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', \DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', \DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', \DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', \DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR']; + private const NODE_TYPES = [\XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', \XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', \XML_TEXT_NODE => 'XML_TEXT_NODE', \XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', \XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', \XML_ENTITY_NODE => 'XML_ENTITY_NODE', \XML_PI_NODE => 'XML_PI_NODE', \XML_COMMENT_NODE => 'XML_COMMENT_NODE', \XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', \XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', \XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', \XML_NOTATION_NODE => 'XML_NOTATION_NODE', \XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', \XML_DTD_NODE => 'XML_DTD_NODE', \XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', \XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', \XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', \XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE']; + public static function castException(\DOMException $e, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $k = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'code'; + if (isset($a[$k], self::ERROR_CODES[$a[$k]])) { + $a[$k] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::ERROR_CODES[$a[$k]], $a[$k]); + } + return $a; + } + public static function castLength($dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['length' => $dom->length]; + return $a; + } + public static function castImplementation($dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'Core' => '1.0', \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'XML' => '2.0']; + return $a; + } + public static function castNode(\DOMNode $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['nodeName' => $dom->nodeName, 'nodeValue' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->nodeValue), 'nodeType' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), 'parentNode' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->parentNode), 'childNodes' => $dom->childNodes, 'firstChild' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->firstChild), 'lastChild' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->lastChild), 'previousSibling' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->previousSibling), 'nextSibling' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->nextSibling), 'attributes' => $dom->attributes, 'ownerDocument' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->ownerDocument), 'namespaceURI' => $dom->namespaceURI, 'prefix' => $dom->prefix, 'localName' => $dom->localName, 'baseURI' => $dom->baseURI ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($dom->baseURI) : $dom->baseURI, 'textContent' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->textContent)]; + return $a; + } + public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['nodeName' => $dom->nodeName, 'nodeValue' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->nodeValue), 'nodeType' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), 'prefix' => $dom->prefix, 'localName' => $dom->localName, 'namespaceURI' => $dom->namespaceURI, 'ownerDocument' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->ownerDocument), 'parentNode' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->parentNode)]; + return $a; + } + public static function castDocument(\DOMDocument $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + $a += ['doctype' => $dom->doctype, 'implementation' => $dom->implementation, 'documentElement' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($dom->documentElement), 'actualEncoding' => $dom->actualEncoding, 'encoding' => $dom->encoding, 'xmlEncoding' => $dom->xmlEncoding, 'standalone' => $dom->standalone, 'xmlStandalone' => $dom->xmlStandalone, 'version' => $dom->version, 'xmlVersion' => $dom->xmlVersion, 'strictErrorChecking' => $dom->strictErrorChecking, 'documentURI' => $dom->documentURI ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($dom->documentURI) : $dom->documentURI, 'config' => $dom->config, 'formatOutput' => $dom->formatOutput, 'validateOnParse' => $dom->validateOnParse, 'resolveExternals' => $dom->resolveExternals, 'preserveWhiteSpace' => $dom->preserveWhiteSpace, 'recover' => $dom->recover, 'substituteEntities' => $dom->substituteEntities]; + if (!($filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE)) { + $formatOutput = $dom->formatOutput; + $dom->formatOutput = \true; + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'xml' => $dom->saveXML()]; + $dom->formatOutput = $formatOutput; + } + return $a; + } + public static function castCharacterData(\DOMCharacterData $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['data' => $dom->data, 'length' => $dom->length]; + return $a; + } + public static function castAttr(\DOMAttr $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['name' => $dom->name, 'specified' => $dom->specified, 'value' => $dom->value, 'ownerElement' => $dom->ownerElement, 'schemaTypeInfo' => $dom->schemaTypeInfo]; + return $a; + } + public static function castElement(\DOMElement $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['tagName' => $dom->tagName, 'schemaTypeInfo' => $dom->schemaTypeInfo]; + return $a; + } + public static function castText(\DOMText $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['wholeText' => $dom->wholeText]; + return $a; + } + public static function castTypeinfo(\DOMTypeinfo $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['typeName' => $dom->typeName, 'typeNamespace' => $dom->typeNamespace]; + return $a; + } + public static function castDomError(\DOMDomError $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['severity' => $dom->severity, 'message' => $dom->message, 'type' => $dom->type, 'relatedException' => $dom->relatedException, 'related_data' => $dom->related_data, 'location' => $dom->location]; + return $a; + } + public static function castLocator(\DOMLocator $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['lineNumber' => $dom->lineNumber, 'columnNumber' => $dom->columnNumber, 'offset' => $dom->offset, 'relatedNode' => $dom->relatedNode, 'uri' => $dom->uri ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($dom->uri, $dom->lineNumber) : $dom->uri]; + return $a; + } + public static function castDocumentType(\DOMDocumentType $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['name' => $dom->name, 'entities' => $dom->entities, 'notations' => $dom->notations, 'publicId' => $dom->publicId, 'systemId' => $dom->systemId, 'internalSubset' => $dom->internalSubset]; + return $a; + } + public static function castNotation(\DOMNotation $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['publicId' => $dom->publicId, 'systemId' => $dom->systemId]; + return $a; + } + public static function castEntity(\DOMEntity $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['publicId' => $dom->publicId, 'systemId' => $dom->systemId, 'notationName' => $dom->notationName, 'actualEncoding' => $dom->actualEncoding, 'encoding' => $dom->encoding, 'version' => $dom->version]; + return $a; + } + public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['target' => $dom->target, 'data' => $dom->data]; + return $a; + } + public static function castXPath(\DOMXPath $dom, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += ['document' => $dom->document]; + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/DateCaster.php b/build/vendor/symfony/var-dumper/Caster/DateCaster.php new file mode 100644 index 0000000..e9eb358 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/DateCaster.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts DateTimeInterface related classes to array representation. + * + * @author Dany Maillard + * + * @final + */ +class DateCaster +{ + private const PERIOD_LIMIT = 3; + public static function castDateTime(\DateTimeInterface $d, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $location = $d->getTimezone()->getLocation(); + $fromNow = (new \DateTime())->diff($d); + $title = $d->format('l, F j, Y') . "\n" . self::formatInterval($fromNow) . ' from now' . ($location ? $d->format('I') ? "\nDST On" : "\nDST Off" : ''); + unset($a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_DYNAMIC . 'date'], $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_DYNAMIC . 'timezone'], $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_DYNAMIC . 'timezone_type']); + $a[$prefix . 'date'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::formatDateTime($d, $location ? ' e (P)' : ' P'), $title); + $stub->class .= $d->format(' @U'); + return $a; + } + public static function castInterval(\DateInterval $interval, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter) + { + $now = new \DateTimeImmutable(); + $numberOfSeconds = $now->add($interval)->getTimestamp() - $now->getTimestamp(); + $title = \number_format($numberOfSeconds, 0, '.', ' ') . 's'; + $i = [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'interval' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::formatInterval($interval), $title)]; + return $filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE ? $i : $i + $a; + } + private static function formatInterval(\DateInterval $i) : string + { + $format = '%R '; + if (0 === $i->y && 0 === $i->m && ($i->h >= 24 || $i->i >= 60 || $i->s >= 60)) { + $i = \date_diff($d = new \DateTime(), \date_add(clone $d, $i)); + // recalculate carry over points + $format .= 0 < $i->days ? '%ad ' : ''; + } else { + $format .= ($i->y ? '%yy ' : '') . ($i->m ? '%mm ' : '') . ($i->d ? '%dd ' : ''); + } + $format .= $i->h || $i->i || $i->s || $i->f ? '%H:%I:' . self::formatSeconds($i->s, \substr($i->f, 2)) : ''; + $format = '%R ' === $format ? '0s' : $format; + return $i->format(\rtrim($format)); + } + public static function castTimeZone(\DateTimeZone $timeZone, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter) + { + $location = $timeZone->getLocation(); + $formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P'); + $title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-' . $location['country_code']) : ''; + $z = [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'timezone' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($formatted, $title)]; + return $filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE ? $z : $z + $a; + } + public static function castPeriod(\DatePeriod $p, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter) + { + $dates = []; + foreach (clone $p as $i => $d) { + if (self::PERIOD_LIMIT === $i) { + $now = new \DateTimeImmutable('now', new \DateTimeZone('UTC')); + $dates[] = \sprintf('%s more', ($end = $p->getEndDate()) ? \ceil(($end->format('U.u') - $d->format('U.u')) / ((int) $now->add($p->getDateInterval())->format('U.u') - (int) $now->format('U.u'))) : $p->recurrences - $i); + break; + } + $dates[] = \sprintf('%s) %s', $i + 1, self::formatDateTime($d)); + } + $period = \sprintf('every %s, from %s (%s) %s', self::formatInterval($p->getDateInterval()), self::formatDateTime($p->getStartDate()), $p->include_start_date ? 'included' : 'excluded', ($end = $p->getEndDate()) ? 'to ' . self::formatDateTime($end) : 'recurring ' . $p->recurrences . ' time/s'); + $p = [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'period' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($period, \implode("\n", $dates))]; + return $filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE ? $p : $p + $a; + } + private static function formatDateTime(\DateTimeInterface $d, string $extra = '') : string + { + return $d->format('Y-m-d H:i:' . self::formatSeconds($d->format('s'), $d->format('u')) . $extra); + } + private static function formatSeconds(string $s, string $us) : string + { + return \sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = \rtrim($us, '0'))) ? '0' : ($len <= 3 ? \str_pad($t, 3, '0') : $us)); + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/DoctrineCaster.php b/build/vendor/symfony/var-dumper/Caster/DoctrineCaster.php new file mode 100644 index 0000000..9603fbd --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/DoctrineCaster.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Doctrine\Common\Proxy\Proxy as CommonProxy; +use RayGlobalScoped\Doctrine\ORM\PersistentCollection; +use RayGlobalScoped\Doctrine\ORM\Proxy\Proxy as OrmProxy; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts Doctrine related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class DoctrineCaster +{ + public static function castCommonProxy(\RayGlobalScoped\Doctrine\Common\Proxy\Proxy $proxy, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + foreach (['__cloner__', '__initializer__'] as $k) { + if (\array_key_exists($k, $a)) { + unset($a[$k]); + ++$stub->cut; + } + } + return $a; + } + public static function castOrmProxy(\RayGlobalScoped\Doctrine\ORM\Proxy\Proxy $proxy, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + foreach (['_entityPersister', '_identifier'] as $k) { + if (\array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0" . $k, $a)) { + unset($a[$k]); + ++$stub->cut; + } + } + return $a; + } + public static function castPersistentCollection(\RayGlobalScoped\Doctrine\ORM\PersistentCollection $coll, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + foreach (['snapshot', 'association', 'typeClass'] as $k) { + if (\array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0" . $k, $a)) { + $a[$k] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($a[$k]); + } + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/DsCaster.php b/build/vendor/symfony/var-dumper/Caster/DsCaster.php new file mode 100644 index 0000000..0ac35d5 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/DsCaster.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use Ds\Collection; +use Ds\Map; +use Ds\Pair; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts Ds extension classes to array representation. + * + * @author Jáchym Toušek + * + * @final + */ +class DsCaster +{ + public static function castCollection(\Ds\Collection $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) : array + { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'count'] = $c->count(); + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'capacity'] = $c->capacity(); + if (!$c instanceof \Ds\Map) { + $a += $c->toArray(); + } + return $a; + } + public static function castMap(\Ds\Map $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) : array + { + foreach ($c as $k => $v) { + $a[] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\DsPairStub($k, $v); + } + return $a; + } + public static function castPair(\Ds\Pair $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) : array + { + foreach ($c->toArray() as $k => $v) { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . $k] = $v; + } + return $a; + } + public static function castPairStub(\RayGlobalScoped\Symfony\Component\VarDumper\Caster\DsPairStub $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) : array + { + if ($isNested) { + $stub->class = \Ds\Pair::class; + $stub->value = null; + $stub->handle = 0; + $a = $c->value; + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/DsPairStub.php b/build/vendor/symfony/var-dumper/Caster/DsPairStub.php new file mode 100644 index 0000000..5f9ad76 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/DsPairStub.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * @author Nicolas Grekas + */ +class DsPairStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub +{ + public function __construct($key, $value) + { + $this->value = [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'key' => $key, \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'value' => $value]; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/EnumStub.php b/build/vendor/symfony/var-dumper/Caster/EnumStub.php new file mode 100644 index 0000000..24812e6 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/EnumStub.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Represents an enumeration of values. + * + * @author Nicolas Grekas + */ +class EnumStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub +{ + public $dumpKeys = \true; + public function __construct(array $values, bool $dumpKeys = \true) + { + $this->value = $values; + $this->dumpKeys = $dumpKeys; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/ExceptionCaster.php b/build/vendor/symfony/var-dumper/Caster/ExceptionCaster.php new file mode 100644 index 0000000..b1378f6 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/ExceptionCaster.php @@ -0,0 +1,304 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +use RayGlobalScoped\Symfony\Component\VarDumper\Exception\ThrowingCasterException; +/** + * Casts common Exception classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class ExceptionCaster +{ + public static $srcContext = 1; + public static $traceArgs = \true; + public static $errorTypes = [\E_DEPRECATED => 'E_DEPRECATED', \E_USER_DEPRECATED => 'E_USER_DEPRECATED', \E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', \E_ERROR => 'E_ERROR', \E_WARNING => 'E_WARNING', \E_PARSE => 'E_PARSE', \E_NOTICE => 'E_NOTICE', \E_CORE_ERROR => 'E_CORE_ERROR', \E_CORE_WARNING => 'E_CORE_WARNING', \E_COMPILE_ERROR => 'E_COMPILE_ERROR', \E_COMPILE_WARNING => 'E_COMPILE_WARNING', \E_USER_ERROR => 'E_USER_ERROR', \E_USER_WARNING => 'E_USER_WARNING', \E_USER_NOTICE => 'E_USER_NOTICE', \E_STRICT => 'E_STRICT']; + private static $framesCache = []; + public static function castError(\Error $e, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); + } + public static function castException(\Exception $e, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); + } + public static function castErrorException(\ErrorException $e, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + if (isset($a[$s = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'severity'], self::$errorTypes[$a[$s]])) { + $a[$s] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::$errorTypes[$a[$s]], $a[$s]); + } + return $a; + } + public static function castThrowingCasterException(\RayGlobalScoped\Symfony\Component\VarDumper\Exception\ThrowingCasterException $e, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $trace = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'trace'; + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED; + $xPrefix = "\0Exception\0"; + if (isset($a[$xPrefix . 'previous'], $a[$trace]) && $a[$xPrefix . 'previous'] instanceof \Exception) { + $b = (array) $a[$xPrefix . 'previous']; + $class = \get_debug_type($a[$xPrefix . 'previous']); + self::traceUnshift($b[$xPrefix . 'trace'], $class, $b[$prefix . 'file'], $b[$prefix . 'line']); + $a[$trace] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\TraceStub($b[$xPrefix . 'trace'], \false, 0, -\count($a[$trace]->value)); + } + unset($a[$xPrefix . 'previous'], $a[$prefix . 'code'], $a[$prefix . 'file'], $a[$prefix . 'line']); + return $a; + } + public static function castSilencedErrorContext(\RayGlobalScoped\Symfony\Component\ErrorHandler\Exception\SilencedErrorContext $e, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $sPrefix = "\0" . \RayGlobalScoped\Symfony\Component\ErrorHandler\Exception\SilencedErrorContext::class . "\0"; + if (!isset($a[$s = $sPrefix . 'severity'])) { + return $a; + } + if (isset(self::$errorTypes[$a[$s]])) { + $a[$s] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::$errorTypes[$a[$s]], $a[$s]); + } + $trace = [['file' => $a[$sPrefix . 'file'], 'line' => $a[$sPrefix . 'line']]]; + if (isset($a[$sPrefix . 'trace'])) { + $trace = \array_merge($trace, $a[$sPrefix . 'trace']); + } + unset($a[$sPrefix . 'file'], $a[$sPrefix . 'line'], $a[$sPrefix . 'trace']); + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'trace'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\TraceStub($trace, self::$traceArgs); + return $a; + } + public static function castTraceStub(\RayGlobalScoped\Symfony\Component\VarDumper\Caster\TraceStub $trace, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + if (!$isNested) { + return $a; + } + $stub->class = ''; + $stub->handle = 0; + $frames = $trace->value; + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a = []; + $j = \count($frames); + if (0 > ($i = $trace->sliceOffset)) { + $i = \max(0, $j + $i); + } + if (!isset($trace->value[$i])) { + return []; + } + $lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'] . $frames[$i]['type'] : '') . $frames[$i]['function'] . '()' : ''; + $frames[] = ['function' => '']; + $collapse = \false; + for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { + $f = $frames[$i]; + $call = isset($f['function']) ? (isset($f['class']) ? $f['class'] . $f['type'] : '') . $f['function'] : '???'; + $frame = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\FrameStub(['object' => $f['object'] ?? null, 'class' => $f['class'] ?? null, 'type' => $f['type'] ?? null, 'function' => $f['function'] ?? null] + $frames[$i - 1], \false, \true); + $f = self::castFrameStub($frame, [], $frame, \true); + if (isset($f[$prefix . 'src'])) { + foreach ($f[$prefix . 'src']->value as $label => $frame) { + if (0 === \strpos($label, "\0~collapse=0")) { + if ($collapse) { + $label = \substr_replace($label, '1', 11, 1); + } else { + $collapse = \true; + } + } + $label = \substr_replace($label, "title=Stack level {$j}.&", 2, 0); + } + $f = $frames[$i - 1]; + if ($trace->keepArgs && !empty($f['args']) && $frame instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub) { + $frame->value['arguments'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ArgsStub($f['args'], $f['function'] ?? null, $f['class'] ?? null); + } + } elseif ('???' !== $lastCall) { + $label = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ClassStub($lastCall); + if (isset($label->attr['ellipsis'])) { + $label->attr['ellipsis'] += 2; + $label = \substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level {$j}.", 2, 0) . $label->value . '()'; + } else { + $label = \substr_replace($prefix, "title=Stack level {$j}.", 2, 0) . $label->value . '()'; + } + } else { + $label = \substr_replace($prefix, "title=Stack level {$j}.", 2, 0) . $lastCall; + } + $a[\substr_replace($label, \sprintf('separator=%s&', $frame instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub ? ' ' : ':'), 2, 0)] = $frame; + $lastCall = $call; + } + if (null !== $trace->sliceLength) { + $a = \array_slice($a, 0, $trace->sliceLength, \true); + } + return $a; + } + public static function castFrameStub(\RayGlobalScoped\Symfony\Component\VarDumper\Caster\FrameStub $frame, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + if (!$isNested) { + return $a; + } + $f = $frame->value; + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + if (isset($f['file'], $f['line'])) { + $cacheKey = $f; + unset($cacheKey['object'], $cacheKey['args']); + $cacheKey[] = self::$srcContext; + $cacheKey = \implode('-', $cacheKey); + if (isset(self::$framesCache[$cacheKey])) { + $a[$prefix . 'src'] = self::$framesCache[$cacheKey]; + } else { + if (\preg_match('/\\((\\d+)\\)(?:\\([\\da-f]{32}\\))? : (?:eval\\(\\)\'d code|runtime-created function)$/', $f['file'], $match)) { + $f['file'] = \substr($f['file'], 0, -\strlen($match[0])); + $f['line'] = (int) $match[1]; + } + $src = $f['line']; + $srcKey = $f['file']; + $ellipsis = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($srcKey, 0); + $srcAttr = 'collapse=' . (int) $ellipsis->inVendor; + $ellipsisTail = $ellipsis->attr['ellipsis-tail'] ?? 0; + $ellipsis = $ellipsis->attr['ellipsis'] ?? 0; + if (\is_file($f['file']) && 0 <= self::$srcContext) { + if (!empty($f['class']) && (\is_subclass_of($f['class'], 'RayGlobalScoped\\Twig\\Template') || \is_subclass_of($f['class'], 'RayGlobalScoped\\Twig_Template')) && \method_exists($f['class'], 'getDebugInfo')) { + $template = $f['object'] ?? \unserialize(\sprintf('O:%d:"%s":0:{}', \strlen($f['class']), $f['class'])); + $ellipsis = 0; + $templateSrc = \method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (\method_exists($template, 'getSource') ? $template->getSource() : ''); + $templateInfo = $template->getDebugInfo(); + if (isset($templateInfo[$f['line']])) { + if (!\method_exists($template, 'getSourceContext') || !\is_file($templatePath = $template->getSourceContext()->getPath())) { + $templatePath = null; + } + if ($templateSrc) { + $src = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext, 'twig', $templatePath, $f); + $srcKey = ($templatePath ?: $template->getTemplateName()) . ':' . $templateInfo[$f['line']]; + } + } + } + if ($srcKey == $f['file']) { + $src = self::extractSource(\file_get_contents($f['file']), $f['line'], self::$srcContext, 'php', $f['file'], $f); + $srcKey .= ':' . $f['line']; + if ($ellipsis) { + $ellipsis += 1 + \strlen($f['line']); + } + } + $srcAttr .= \sprintf('&separator= &file=%s&line=%d', \rawurlencode($f['file']), $f['line']); + } else { + $srcAttr .= '&separator=:'; + } + $srcAttr .= $ellipsis ? '&ellipsis-type=path&ellipsis=' . $ellipsis . '&ellipsis-tail=' . $ellipsisTail : ''; + self::$framesCache[$cacheKey] = $a[$prefix . 'src'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub(["\0~{$srcAttr}\0{$srcKey}" => $src]); + } + } + unset($a[$prefix . 'args'], $a[$prefix . 'line'], $a[$prefix . 'file']); + if ($frame->inTraceStub) { + unset($a[$prefix . 'class'], $a[$prefix . 'type'], $a[$prefix . 'function']); + } + foreach ($a as $k => $v) { + if (!$v) { + unset($a[$k]); + } + } + if ($frame->keepArgs && !empty($f['args'])) { + $a[$prefix . 'arguments'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ArgsStub($f['args'], $f['function'], $f['class']); + } + return $a; + } + private static function filterExceptionArray(string $xClass, array $a, string $xPrefix, int $filter) : array + { + if (isset($a[$xPrefix . 'trace'])) { + $trace = $a[$xPrefix . 'trace']; + unset($a[$xPrefix . 'trace']); + // Ensures the trace is always last + } else { + $trace = []; + } + if (!($filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE) && $trace) { + if (isset($a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'file'], $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'line'])) { + self::traceUnshift($trace, $xClass, $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'file'], $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'line']); + } + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'trace'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\TraceStub($trace, self::$traceArgs); + } + if (empty($a[$xPrefix . 'previous'])) { + unset($a[$xPrefix . 'previous']); + } + unset($a[$xPrefix . 'string'], $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_DYNAMIC . 'xdebug_message'], $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_DYNAMIC . '__destructorException']); + if (isset($a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'message']) && \false !== \strpos($a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'message'], "@anonymous\0")) { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . '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]; + }, $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'message']); + } + if (isset($a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'file'], $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'line'])) { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'file'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'file'], $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . 'line']); + } + return $a; + } + private static function traceUnshift(array &$trace, ?string $class, string $file, int $line) : void + { + if (isset($trace[0]['file'], $trace[0]['line']) && $trace[0]['file'] === $file && $trace[0]['line'] === $line) { + return; + } + \array_unshift($trace, ['function' => $class ? 'new ' . $class : null, 'file' => $file, 'line' => $line]); + } + private static function extractSource(string $srcLines, int $line, int $srcContext, string $lang, ?string $file, array $frame) : \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub + { + $srcLines = \explode("\n", $srcLines); + $src = []; + for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { + $src[] = ($srcLines[$i] ?? '') . "\n"; + } + if ($frame['function'] ?? \false) { + $stub = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub(new \stdClass()); + $stub->class = (isset($frame['class']) ? $frame['class'] . $frame['type'] : '') . $frame['function']; + $stub->type = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT; + $stub->attr['cut_hash'] = \true; + $stub->attr['file'] = $frame['file']; + $stub->attr['line'] = $frame['line']; + try { + $caller = isset($frame['class']) ? new \ReflectionMethod($frame['class'], $frame['function']) : new \ReflectionFunction($frame['function']); + $stub->class .= \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ReflectionCaster::getSignature(\RayGlobalScoped\Symfony\Component\VarDumper\Caster\ReflectionCaster::castFunctionAbstract($caller, [], $stub, \true, \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE)); + if ($f = $caller->getFileName()) { + $stub->attr['file'] = $f; + $stub->attr['line'] = $caller->getStartLine(); + } + } catch (\ReflectionException $e) { + // ignore fake class/function + } + $srcLines = ["\0~separator=\0" => $stub]; + } else { + $stub = null; + $srcLines = []; + } + $ltrim = 0; + do { + $pad = null; + for ($i = $srcContext << 1; $i >= 0; --$i) { + if (isset($src[$i][$ltrim]) && "\r" !== ($c = $src[$i][$ltrim]) && "\n" !== $c) { + if (null === $pad) { + $pad = $c; + } + if (' ' !== $c && "\t" !== $c || $pad !== $c) { + break; + } + } + } + ++$ltrim; + } while (0 > $i && null !== $pad); + --$ltrim; + foreach ($src as $i => $c) { + if ($ltrim) { + $c = isset($c[$ltrim]) && "\r" !== $c[$ltrim] ? \substr($c, $ltrim) : \ltrim($c, " \t"); + } + $c = \substr($c, 0, -1); + if ($i !== $srcContext) { + $c = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub('default', $c); + } else { + $c = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($c, $stub ? 'in ' . $stub->class : ''); + if (null !== $file) { + $c->attr['file'] = $file; + $c->attr['line'] = $line; + } + } + $c->attr['lang'] = $lang; + $srcLines[\sprintf("\0~separator=› &%d\0", $i + $line - $srcContext)] = $c; + } + return new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub($srcLines); + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/FrameStub.php b/build/vendor/symfony/var-dumper/Caster/FrameStub.php new file mode 100644 index 0000000..1c9616f --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/FrameStub.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +/** + * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace(). + * + * @author Nicolas Grekas + */ +class FrameStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub +{ + public $keepArgs; + public $inTraceStub; + public function __construct(array $frame, bool $keepArgs = \true, bool $inTraceStub = \false) + { + $this->value = $frame; + $this->keepArgs = $keepArgs; + $this->inTraceStub = $inTraceStub; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/GmpCaster.php b/build/vendor/symfony/var-dumper/Caster/GmpCaster.php new file mode 100644 index 0000000..25493fe --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/GmpCaster.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts GMP objects to array representation. + * + * @author Hamza Amrouche + * @author Nicolas Grekas + * + * @final + */ +class GmpCaster +{ + public static function castGmp(\GMP $gmp, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter) : array + { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'value'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\gmp_strval($gmp), \gmp_strval($gmp)); + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/ImagineCaster.php b/build/vendor/symfony/var-dumper/Caster/ImagineCaster.php new file mode 100644 index 0000000..afc75e1 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/ImagineCaster.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Imagine\Image\ImageInterface; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * @author Grégoire Pineau + */ +final class ImagineCaster +{ + public static function castImage(\RayGlobalScoped\Imagine\Image\ImageInterface $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) : array + { + $imgData = $c->get('png'); + if (\strlen($imgData) > 1 * 1000 * 1000) { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'image' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($c->getSize())]; + } else { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'image' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ImgStub($imgData, 'image/png', $c->getSize())]; + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/ImgStub.php b/build/vendor/symfony/var-dumper/Caster/ImgStub.php new file mode 100644 index 0000000..0aa742e --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/ImgStub.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +/** + * @author Grégoire Pineau + */ +class ImgStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub +{ + public function __construct(string $data, string $contentType, string $size = '') + { + $this->value = ''; + $this->attr['img-data'] = $data; + $this->attr['img-size'] = $size; + $this->attr['content-type'] = $contentType; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/IntlCaster.php b/build/vendor/symfony/var-dumper/Caster/IntlCaster.php new file mode 100644 index 0000000..622290c --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/IntlCaster.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * @author Nicolas Grekas + * @author Jan Schädlich + * + * @final + */ +class IntlCaster +{ + public static function castMessageFormatter(\MessageFormatter $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'locale' => $c->getLocale(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'pattern' => $c->getPattern()]; + return self::castError($c, $a); + } + public static function castNumberFormatter(\NumberFormatter $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'locale' => $c->getLocale(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'pattern' => $c->getPattern()]; + if ($filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE) { + $stub->cut += 3; + return self::castError($c, $a); + } + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'attributes' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub(['PARSE_INT_ONLY' => $c->getAttribute(\NumberFormatter::PARSE_INT_ONLY), 'GROUPING_USED' => $c->getAttribute(\NumberFormatter::GROUPING_USED), 'DECIMAL_ALWAYS_SHOWN' => $c->getAttribute(\NumberFormatter::DECIMAL_ALWAYS_SHOWN), 'MAX_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_INTEGER_DIGITS), 'MIN_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_INTEGER_DIGITS), 'INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::INTEGER_DIGITS), 'MAX_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_FRACTION_DIGITS), 'MIN_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_FRACTION_DIGITS), 'FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::FRACTION_DIGITS), 'MULTIPLIER' => $c->getAttribute(\NumberFormatter::MULTIPLIER), 'GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::GROUPING_SIZE), 'ROUNDING_MODE' => $c->getAttribute(\NumberFormatter::ROUNDING_MODE), 'ROUNDING_INCREMENT' => $c->getAttribute(\NumberFormatter::ROUNDING_INCREMENT), 'FORMAT_WIDTH' => $c->getAttribute(\NumberFormatter::FORMAT_WIDTH), 'PADDING_POSITION' => $c->getAttribute(\NumberFormatter::PADDING_POSITION), 'SECONDARY_GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::SECONDARY_GROUPING_SIZE), 'SIGNIFICANT_DIGITS_USED' => $c->getAttribute(\NumberFormatter::SIGNIFICANT_DIGITS_USED), 'MIN_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_SIGNIFICANT_DIGITS), 'MAX_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_SIGNIFICANT_DIGITS), 'LENIENT_PARSE' => $c->getAttribute(\NumberFormatter::LENIENT_PARSE)]), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'text_attributes' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub(['POSITIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_PREFIX), 'POSITIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_SUFFIX), 'NEGATIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_PREFIX), 'NEGATIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_SUFFIX), 'PADDING_CHARACTER' => $c->getTextAttribute(\NumberFormatter::PADDING_CHARACTER), 'CURRENCY_CODE' => $c->getTextAttribute(\NumberFormatter::CURRENCY_CODE), 'DEFAULT_RULESET' => $c->getTextAttribute(\NumberFormatter::DEFAULT_RULESET), 'PUBLIC_RULESETS' => $c->getTextAttribute(\NumberFormatter::PUBLIC_RULESETS)]), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'symbols' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub(['DECIMAL_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL), 'GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL), 'PATTERN_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::PATTERN_SEPARATOR_SYMBOL), 'PERCENT_SYMBOL' => $c->getSymbol(\NumberFormatter::PERCENT_SYMBOL), 'ZERO_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::ZERO_DIGIT_SYMBOL), 'DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::DIGIT_SYMBOL), 'MINUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::MINUS_SIGN_SYMBOL), 'PLUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::PLUS_SIGN_SYMBOL), 'CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::CURRENCY_SYMBOL), 'INTL_CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::INTL_CURRENCY_SYMBOL), 'MONETARY_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_SEPARATOR_SYMBOL), 'EXPONENTIAL_SYMBOL' => $c->getSymbol(\NumberFormatter::EXPONENTIAL_SYMBOL), 'PERMILL_SYMBOL' => $c->getSymbol(\NumberFormatter::PERMILL_SYMBOL), 'PAD_ESCAPE_SYMBOL' => $c->getSymbol(\NumberFormatter::PAD_ESCAPE_SYMBOL), 'INFINITY_SYMBOL' => $c->getSymbol(\NumberFormatter::INFINITY_SYMBOL), 'NAN_SYMBOL' => $c->getSymbol(\NumberFormatter::NAN_SYMBOL), 'SIGNIFICANT_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL), 'MONETARY_GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL)])]; + return self::castError($c, $a); + } + public static function castIntlTimeZone(\IntlTimeZone $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'display_name' => $c->getDisplayName(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'id' => $c->getID(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'raw_offset' => $c->getRawOffset()]; + if ($c->useDaylightTime()) { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'dst_savings' => $c->getDSTSavings()]; + } + return self::castError($c, $a); + } + public static function castIntlCalendar(\IntlCalendar $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'type' => $c->getType(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'first_day_of_week' => $c->getFirstDayOfWeek(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'minimal_days_in_first_week' => $c->getMinimalDaysInFirstWeek(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'repeated_wall_time_option' => $c->getRepeatedWallTimeOption(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'skipped_wall_time_option' => $c->getSkippedWallTimeOption(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'time' => $c->getTime(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'in_daylight_time' => $c->inDaylightTime(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'is_lenient' => $c->isLenient(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'time_zone' => $filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($c->getTimeZone()) : $c->getTimeZone()]; + return self::castError($c, $a); + } + public static function castIntlDateFormatter(\IntlDateFormatter $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'locale' => $c->getLocale(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'pattern' => $c->getPattern(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'calendar' => $c->getCalendar(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'time_zone_id' => $c->getTimeZoneId(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'time_type' => $c->getTimeType(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'date_type' => $c->getDateType(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'calendar_object' => $filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($c->getCalendarObject()) : $c->getCalendarObject(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'time_zone' => $filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($c->getTimeZone()) : $c->getTimeZone()]; + return self::castError($c, $a); + } + private static function castError(object $c, array $a) : array + { + if ($errorCode = $c->getErrorCode()) { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'error_code' => $errorCode, \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'error_message' => $c->getErrorMessage()]; + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/LinkStub.php b/build/vendor/symfony/var-dumper/Caster/LinkStub.php new file mode 100644 index 0000000..2024f24 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/LinkStub.php @@ -0,0 +1,96 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +/** + * Represents a file or a URL. + * + * @author Nicolas Grekas + */ +class LinkStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub +{ + public $inVendor = \false; + private static $vendorRoots; + private static $composerRoots; + public function __construct($label, int $line = 0, $href = null) + { + $this->value = $label; + if (null === $href) { + $href = $label; + } + if (!\is_string($href)) { + return; + } + if (0 === \strpos($href, 'file://')) { + if ($href === $label) { + $label = \substr($label, 7); + } + $href = \substr($href, 7); + } elseif (\false !== \strpos($href, '://')) { + $this->attr['href'] = $href; + return; + } + if (!\is_file($href)) { + return; + } + if ($line) { + $this->attr['line'] = $line; + } + if ($label !== ($this->attr['file'] = \realpath($href) ?: $href)) { + return; + } + if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) { + $this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1; + $this->attr['ellipsis-type'] = 'path'; + $this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(\implode('', \array_slice(\explode(\DIRECTORY_SEPARATOR, \substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0); + } elseif (3 < \count($ellipsis = \explode(\DIRECTORY_SEPARATOR, $href))) { + $this->attr['ellipsis'] = 2 + \strlen(\implode('', \array_slice($ellipsis, -2))); + $this->attr['ellipsis-type'] = 'path'; + $this->attr['ellipsis-tail'] = 1; + } + } + private function getComposerRoot(string $file, bool &$inVendor) + { + if (null === self::$vendorRoots) { + self::$vendorRoots = []; + foreach (\get_declared_classes() as $class) { + if ('C' === $class[0] && 0 === \strpos($class, 'ComposerAutoloaderInit')) { + $r = new \ReflectionClass($class); + $v = \dirname($r->getFileName(), 2); + if (\is_file($v . '/composer/installed.json')) { + self::$vendorRoots[] = $v . \DIRECTORY_SEPARATOR; + } + } + } + } + $inVendor = \false; + if (isset(self::$composerRoots[$dir = \dirname($file)])) { + return self::$composerRoots[$dir]; + } + foreach (self::$vendorRoots as $root) { + if ($inVendor = 0 === \strpos($file, $root)) { + return $root; + } + } + $parent = $dir; + while (!@\is_file($parent . '/composer.json')) { + if (!@\file_exists($parent)) { + // open_basedir restriction in effect + break; + } + if ($parent === \dirname($parent)) { + return self::$composerRoots[$dir] = \false; + } + $parent = \dirname($parent); + } + return self::$composerRoots[$dir] = $parent . \DIRECTORY_SEPARATOR; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/MemcachedCaster.php b/build/vendor/symfony/var-dumper/Caster/MemcachedCaster.php new file mode 100644 index 0000000..02301a6 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/MemcachedCaster.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * @author Jan Schädlich + * + * @final + */ +class MemcachedCaster +{ + private static $optionConstants; + private static $defaultOptions; + public static function castMemcached(\Memcached $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'servers' => $c->getServerList(), \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'options' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub(self::getNonDefaultOptions($c))]; + return $a; + } + private static function getNonDefaultOptions(\Memcached $c) : array + { + self::$defaultOptions = self::$defaultOptions ?? self::discoverDefaultOptions(); + self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); + $nonDefaultOptions = []; + foreach (self::$optionConstants as $constantKey => $value) { + if (self::$defaultOptions[$constantKey] !== ($option = $c->getOption($value))) { + $nonDefaultOptions[$constantKey] = $option; + } + } + return $nonDefaultOptions; + } + private static function discoverDefaultOptions() : array + { + $defaultMemcached = new \Memcached(); + $defaultMemcached->addServer('127.0.0.1', 11211); + $defaultOptions = []; + self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); + foreach (self::$optionConstants as $constantKey => $value) { + $defaultOptions[$constantKey] = $defaultMemcached->getOption($value); + } + return $defaultOptions; + } + private static function getOptionConstants() : array + { + $reflectedMemcached = new \ReflectionClass(\Memcached::class); + $optionConstants = []; + foreach ($reflectedMemcached->getConstants() as $constantKey => $value) { + if (0 === \strpos($constantKey, 'OPT_')) { + $optionConstants[$constantKey] = $value; + } + } + return $optionConstants; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/PdoCaster.php b/build/vendor/symfony/var-dumper/Caster/PdoCaster.php new file mode 100644 index 0000000..a206da8 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/PdoCaster.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts PDO related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class PdoCaster +{ + private const PDO_ATTRIBUTES = ['CASE' => [\PDO::CASE_LOWER => 'LOWER', \PDO::CASE_NATURAL => 'NATURAL', \PDO::CASE_UPPER => 'UPPER'], 'ERRMODE' => [\PDO::ERRMODE_SILENT => 'SILENT', \PDO::ERRMODE_WARNING => 'WARNING', \PDO::ERRMODE_EXCEPTION => 'EXCEPTION'], 'TIMEOUT', 'PREFETCH', 'AUTOCOMMIT', 'PERSISTENT', 'DRIVER_NAME', 'SERVER_INFO', 'ORACLE_NULLS' => [\PDO::NULL_NATURAL => 'NATURAL', \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', \PDO::NULL_TO_STRING => 'TO_STRING'], 'CLIENT_VERSION', 'SERVER_VERSION', 'STATEMENT_CLASS', 'EMULATE_PREPARES', 'CONNECTION_STATUS', 'STRINGIFY_FETCHES', 'DEFAULT_FETCH_MODE' => [\PDO::FETCH_ASSOC => 'ASSOC', \PDO::FETCH_BOTH => 'BOTH', \PDO::FETCH_LAZY => 'LAZY', \PDO::FETCH_NUM => 'NUM', \PDO::FETCH_OBJ => 'OBJ']]; + public static function castPdo(\PDO $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $attr = []; + $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); + $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + foreach (self::PDO_ATTRIBUTES as $k => $v) { + if (!isset($k[0])) { + $k = $v; + $v = []; + } + try { + $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(\constant('PDO::ATTR_' . $k)); + if ($v && isset($v[$attr[$k]])) { + $attr[$k] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($v[$attr[$k]], $attr[$k]); + } + } catch (\Exception $e) { + } + } + if (isset($attr[$k = 'STATEMENT_CLASS'][1])) { + if ($attr[$k][1]) { + $attr[$k][1] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ArgsStub($attr[$k][1], '__construct', $attr[$k][0]); + } + $attr[$k][0] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ClassStub($attr[$k][0]); + } + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'inTransaction' => \method_exists($c, 'inTransaction'), $prefix . 'errorInfo' => $c->errorInfo(), $prefix . 'attributes' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub($attr)]; + if ($a[$prefix . 'inTransaction']) { + $a[$prefix . 'inTransaction'] = $c->inTransaction(); + } else { + unset($a[$prefix . 'inTransaction']); + } + if (!isset($a[$prefix . 'errorInfo'][1], $a[$prefix . 'errorInfo'][2])) { + unset($a[$prefix . 'errorInfo']); + } + $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); + return $a; + } + public static function castPdoStatement(\PDOStatement $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a[$prefix . 'errorInfo'] = $c->errorInfo(); + if (!isset($a[$prefix . 'errorInfo'][1], $a[$prefix . 'errorInfo'][2])) { + unset($a[$prefix . 'errorInfo']); + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/PgSqlCaster.php b/build/vendor/symfony/var-dumper/Caster/PgSqlCaster.php new file mode 100644 index 0000000..0f25260 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/PgSqlCaster.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts pqsql resources to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class PgSqlCaster +{ + private const PARAM_CODES = ['server_encoding', 'client_encoding', 'is_superuser', 'session_authorization', 'DateStyle', 'TimeZone', 'IntervalStyle', 'integer_datetimes', 'application_name', 'standard_conforming_strings']; + private const TRANSACTION_STATUS = [\PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE', \PGSQL_TRANSACTION_ACTIVE => 'PGSQL_TRANSACTION_ACTIVE', \PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS', \PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR', \PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN']; + private const RESULT_STATUS = [\PGSQL_EMPTY_QUERY => 'PGSQL_EMPTY_QUERY', \PGSQL_COMMAND_OK => 'PGSQL_COMMAND_OK', \PGSQL_TUPLES_OK => 'PGSQL_TUPLES_OK', \PGSQL_COPY_OUT => 'PGSQL_COPY_OUT', \PGSQL_COPY_IN => 'PGSQL_COPY_IN', \PGSQL_BAD_RESPONSE => 'PGSQL_BAD_RESPONSE', \PGSQL_NONFATAL_ERROR => 'PGSQL_NONFATAL_ERROR', \PGSQL_FATAL_ERROR => 'PGSQL_FATAL_ERROR']; + private const DIAG_CODES = ['severity' => \PGSQL_DIAG_SEVERITY, 'sqlstate' => \PGSQL_DIAG_SQLSTATE, 'message' => \PGSQL_DIAG_MESSAGE_PRIMARY, 'detail' => \PGSQL_DIAG_MESSAGE_DETAIL, 'hint' => \PGSQL_DIAG_MESSAGE_HINT, 'statement position' => \PGSQL_DIAG_STATEMENT_POSITION, 'internal position' => \PGSQL_DIAG_INTERNAL_POSITION, 'internal query' => \PGSQL_DIAG_INTERNAL_QUERY, 'context' => \PGSQL_DIAG_CONTEXT, 'file' => \PGSQL_DIAG_SOURCE_FILE, 'line' => \PGSQL_DIAG_SOURCE_LINE, 'function' => \PGSQL_DIAG_SOURCE_FUNCTION]; + public static function castLargeObject($lo, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a['seek position'] = \pg_lo_tell($lo); + return $a; + } + public static function castLink($link, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a['status'] = \pg_connection_status($link); + $a['status'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\PGSQL_CONNECTION_OK === $a['status'] ? 'PGSQL_CONNECTION_OK' : 'PGSQL_CONNECTION_BAD', $a['status']); + $a['busy'] = \pg_connection_busy($link); + $a['transaction'] = \pg_transaction_status($link); + if (isset(self::TRANSACTION_STATUS[$a['transaction']])) { + $a['transaction'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::TRANSACTION_STATUS[$a['transaction']], $a['transaction']); + } + $a['pid'] = \pg_get_pid($link); + $a['last error'] = \pg_last_error($link); + $a['last notice'] = \pg_last_notice($link); + $a['host'] = \pg_host($link); + $a['port'] = \pg_port($link); + $a['dbname'] = \pg_dbname($link); + $a['options'] = \pg_options($link); + $a['version'] = \pg_version($link); + foreach (self::PARAM_CODES as $v) { + if (\false !== ($s = \pg_parameter_status($link, $v))) { + $a['param'][$v] = $s; + } + } + $a['param']['client_encoding'] = \pg_client_encoding($link); + $a['param'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub($a['param']); + return $a; + } + public static function castResult($result, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a['num rows'] = \pg_num_rows($result); + $a['status'] = \pg_result_status($result); + if (isset(self::RESULT_STATUS[$a['status']])) { + $a['status'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::RESULT_STATUS[$a['status']], $a['status']); + } + $a['command-completion tag'] = \pg_result_status($result, \PGSQL_STATUS_STRING); + if (-1 === $a['num rows']) { + foreach (self::DIAG_CODES as $k => $v) { + $a['error'][$k] = \pg_result_error_field($result, $v); + } + } + $a['affected rows'] = \pg_affected_rows($result); + $a['last OID'] = \pg_last_oid($result); + $fields = \pg_num_fields($result); + for ($i = 0; $i < $fields; ++$i) { + $field = ['name' => \pg_field_name($result, $i), 'table' => \sprintf('%s (OID: %s)', \pg_field_table($result, $i), \pg_field_table($result, $i, \true)), 'type' => \sprintf('%s (OID: %s)', \pg_field_type($result, $i), \pg_field_type_oid($result, $i)), 'nullable' => (bool) \pg_field_is_null($result, $i), 'storage' => \pg_field_size($result, $i) . ' bytes', 'display' => \pg_field_prtlen($result, $i) . ' chars']; + if (' (OID: )' === $field['table']) { + $field['table'] = null; + } + if ('-1 bytes' === $field['storage']) { + $field['storage'] = 'variable size'; + } elseif ('1 bytes' === $field['storage']) { + $field['storage'] = '1 byte'; + } + if ('1 chars' === $field['display']) { + $field['display'] = '1 char'; + } + $a['fields'][] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub($field); + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php b/build/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php new file mode 100644 index 0000000..46adef9 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\ProxyManager\Proxy\ProxyInterface; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * @author Nicolas Grekas + * + * @final + */ +class ProxyManagerCaster +{ + public static function castProxy(\RayGlobalScoped\ProxyManager\Proxy\ProxyInterface $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + if ($parent = \get_parent_class($c)) { + $stub->class .= ' - ' . $parent; + } + $stub->class .= '@proxy'; + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php b/build/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php new file mode 100644 index 0000000..fd1fb2e --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RdKafka\Conf; +use RdKafka\Exception as RdKafkaException; +use RdKafka\KafkaConsumer; +use RdKafka\Message; +use RayGlobalScoped\RdKafka\Metadata\Broker as BrokerMetadata; +use RdKafka\Metadata\Collection as CollectionMetadata; +use RdKafka\Metadata\Partition as PartitionMetadata; +use RdKafka\Metadata\Topic as TopicMetadata; +use RdKafka\Topic; +use RdKafka\TopicConf; +use RdKafka\TopicPartition; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts RdKafka related classes to array representation. + * + * @author Romain Neutron + */ +class RdKafkaCaster +{ + public static function castKafkaConsumer(\RdKafka\KafkaConsumer $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + try { + $assignment = $c->getAssignment(); + } catch (\RdKafka\Exception $e) { + $assignment = []; + } + $a += [$prefix . 'subscription' => $c->getSubscription(), $prefix . 'assignment' => $assignment]; + $a += self::extractMetadata($c); + return $a; + } + public static function castTopic(\RdKafka\Topic $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'name' => $c->getName()]; + return $a; + } + public static function castTopicPartition(\RdKafka\TopicPartition $c, array $a) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'offset' => $c->getOffset(), $prefix . 'partition' => $c->getPartition(), $prefix . 'topic' => $c->getTopic()]; + return $a; + } + public static function castMessage(\RdKafka\Message $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'errstr' => $c->errstr()]; + return $a; + } + public static function castConf(\RdKafka\Conf $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + foreach ($c->dump() as $key => $value) { + $a[$prefix . $key] = $value; + } + return $a; + } + public static function castTopicConf(\RdKafka\TopicConf $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + foreach ($c->dump() as $key => $value) { + $a[$prefix . $key] = $value; + } + return $a; + } + public static function castRdKafka(\RdKafka $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'out_q_len' => $c->getOutQLen()]; + $a += self::extractMetadata($c); + return $a; + } + public static function castCollectionMetadata(\RdKafka\Metadata\Collection $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $a += \iterator_to_array($c); + return $a; + } + public static function castTopicMetadata(\RdKafka\Metadata\Topic $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'name' => $c->getTopic(), $prefix . 'partitions' => $c->getPartitions()]; + return $a; + } + public static function castPartitionMetadata(\RdKafka\Metadata\Partition $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'id' => $c->getId(), $prefix . 'err' => $c->getErr(), $prefix . 'leader' => $c->getLeader()]; + return $a; + } + public static function castBrokerMetadata(\RayGlobalScoped\RdKafka\Metadata\Broker $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $a += [$prefix . 'id' => $c->getId(), $prefix . 'host' => $c->getHost(), $prefix . 'port' => $c->getPort()]; + return $a; + } + private static function extractMetadata($c) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + try { + $m = $c->getMetadata(\true, null, 500); + } catch (\RdKafka\Exception $e) { + return []; + } + return [$prefix . 'orig_broker_id' => $m->getOrigBrokerId(), $prefix . 'orig_broker_name' => $m->getOrigBrokerName(), $prefix . 'brokers' => $m->getBrokers(), $prefix . 'topics' => $m->getTopics()]; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/RedisCaster.php b/build/vendor/symfony/var-dumper/Caster/RedisCaster.php new file mode 100644 index 0000000..05e5c49 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/RedisCaster.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts Redis class from ext-redis to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class RedisCaster +{ + private const SERIALIZERS = [\Redis::SERIALIZER_NONE => 'NONE', \Redis::SERIALIZER_PHP => 'PHP', 2 => 'IGBINARY']; + private const MODES = [\Redis::ATOMIC => 'ATOMIC', \Redis::MULTI => 'MULTI', \Redis::PIPELINE => 'PIPELINE']; + private const COMPRESSION_MODES = [ + 0 => 'NONE', + // Redis::COMPRESSION_NONE + 1 => 'LZF', + ]; + private const FAILOVER_OPTIONS = [\RedisCluster::FAILOVER_NONE => 'NONE', \RedisCluster::FAILOVER_ERROR => 'ERROR', \RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIBUTE', \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES => 'DISTRIBUTE_SLAVES']; + public static function castRedis(\Redis $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + if (!($connected = $c->isConnected())) { + return $a + [$prefix . 'isConnected' => $connected]; + } + $mode = $c->getMode(); + return $a + [$prefix . 'isConnected' => $connected, $prefix . 'host' => $c->getHost(), $prefix . 'port' => $c->getPort(), $prefix . 'auth' => $c->getAuth(), $prefix . 'mode' => isset(self::MODES[$mode]) ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::MODES[$mode], $mode) : $mode, $prefix . 'dbNum' => $c->getDbNum(), $prefix . 'timeout' => $c->getTimeout(), $prefix . 'lastError' => $c->getLastError(), $prefix . 'persistentId' => $c->getPersistentID(), $prefix . 'options' => self::getRedisOptions($c)]; + } + public static function castRedisArray(\RedisArray $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + return $a + [$prefix . 'hosts' => $c->_hosts(), $prefix . 'function' => \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ClassStub::wrapCallable($c->_function()), $prefix . 'lastError' => $c->getLastError(), $prefix . 'options' => self::getRedisOptions($c)]; + } + public static function castRedisCluster(\RedisCluster $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $failover = $c->getOption(\RedisCluster::OPT_SLAVE_FAILOVER); + $a += [$prefix . '_masters' => $c->_masters(), $prefix . '_redir' => $c->_redir(), $prefix . 'mode' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($c->getMode() ? 'MULTI' : 'ATOMIC', $c->getMode()), $prefix . 'lastError' => $c->getLastError(), $prefix . 'options' => self::getRedisOptions($c, ['SLAVE_FAILOVER' => isset(self::FAILOVER_OPTIONS[$failover]) ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::FAILOVER_OPTIONS[$failover], $failover) : $failover])]; + return $a; + } + /** + * @param \Redis|\RedisArray|\RedisCluster $redis + */ + private static function getRedisOptions($redis, array $options = []) : \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub + { + $serializer = $redis->getOption(\Redis::OPT_SERIALIZER); + if (\is_array($serializer)) { + foreach ($serializer as &$v) { + if (isset(self::SERIALIZERS[$v])) { + $v = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::SERIALIZERS[$v], $v); + } + } + } elseif (isset(self::SERIALIZERS[$serializer])) { + $serializer = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::SERIALIZERS[$serializer], $serializer); + } + $compression = \defined('Redis::OPT_COMPRESSION') ? $redis->getOption(\Redis::OPT_COMPRESSION) : 0; + if (\is_array($compression)) { + foreach ($compression as &$v) { + if (isset(self::COMPRESSION_MODES[$v])) { + $v = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::COMPRESSION_MODES[$v], $v); + } + } + } elseif (isset(self::COMPRESSION_MODES[$compression])) { + $compression = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::COMPRESSION_MODES[$compression], $compression); + } + $retry = \defined('Redis::OPT_SCAN') ? $redis->getOption(\Redis::OPT_SCAN) : 0; + if (\is_array($retry)) { + foreach ($retry as &$v) { + $v = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($v ? 'RETRY' : 'NORETRY', $v); + } + } else { + $retry = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($retry ? 'RETRY' : 'NORETRY', $retry); + } + $options += ['TCP_KEEPALIVE' => \defined('Redis::OPT_TCP_KEEPALIVE') ? $redis->getOption(\Redis::OPT_TCP_KEEPALIVE) : 0, 'READ_TIMEOUT' => $redis->getOption(\Redis::OPT_READ_TIMEOUT), 'COMPRESSION' => $compression, 'SERIALIZER' => $serializer, 'PREFIX' => $redis->getOption(\Redis::OPT_PREFIX), 'SCAN' => $retry]; + return new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub($options); + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/ReflectionCaster.php b/build/vendor/symfony/var-dumper/Caster/ReflectionCaster.php new file mode 100644 index 0000000..25fbac7 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/ReflectionCaster.php @@ -0,0 +1,305 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts Reflector related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class ReflectionCaster +{ + public const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__ . '::unsetClosureFileInfo']; + private const EXTRA_MAP = ['docComment' => 'getDocComment', 'extension' => 'getExtensionName', 'isDisabled' => 'isDisabled', 'isDeprecated' => 'isDeprecated', 'isInternal' => 'isInternal', 'isUserDefined' => 'isUserDefined', 'isGenerator' => 'isGenerator', 'isVariadic' => 'isVariadic']; + public static function castClosure(\Closure $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $c = new \ReflectionFunction($c); + $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); + if (\false === \strpos($c->name, '{closure}')) { + $stub->class = isset($a[$prefix . 'class']) ? $a[$prefix . 'class']->value . '::' . $c->name : $c->name; + unset($a[$prefix . 'class']); + } + unset($a[$prefix . 'extra']); + $stub->class .= self::getSignature($a); + if ($f = $c->getFileName()) { + $stub->attr['file'] = $f; + $stub->attr['line'] = $c->getStartLine(); + } + unset($a[$prefix . 'parameters']); + if ($filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE) { + $stub->cut += ($c->getFileName() ? 2 : 0) + \count($a); + return []; + } + if ($f) { + $a[$prefix . 'file'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($f, $c->getStartLine()); + $a[$prefix . 'line'] = $c->getStartLine() . ' to ' . $c->getEndLine(); + } + return $a; + } + public static function unsetClosureFileInfo(\Closure $c, array $a) + { + unset($a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'file'], $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'line']); + return $a; + } + public static function castGenerator(\Generator $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + // Cannot create ReflectionGenerator based on a terminated Generator + try { + $reflectionGenerator = new \ReflectionGenerator($c); + } catch (\Exception $e) { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'closed'] = \true; + return $a; + } + return self::castReflectionGenerator($reflectionGenerator, $a, $stub, $isNested); + } + public static function castType(\ReflectionType $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + if ($c instanceof \ReflectionNamedType || \PHP_VERSION_ID < 80000) { + $a += [$prefix . 'name' => $c instanceof \ReflectionNamedType ? $c->getName() : (string) $c, $prefix . 'allowsNull' => $c->allowsNull(), $prefix . 'isBuiltin' => $c->isBuiltin()]; + } elseif ($c instanceof \ReflectionUnionType) { + $a[$prefix . 'allowsNull'] = $c->allowsNull(); + self::addMap($a, $c, ['types' => 'getTypes']); + } else { + $a[$prefix . 'allowsNull'] = $c->allowsNull(); + } + return $a; + } + public static function castAttribute(\ReflectionAttribute $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + self::addMap($a, $c, ['name' => 'getName', 'arguments' => 'getArguments']); + return $a; + } + public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + if ($c->getThis()) { + $a[$prefix . 'this'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($c->getThis()); + } + $function = $c->getFunction(); + $frame = ['class' => $function->class ?? null, 'type' => isset($function->class) ? $function->isStatic() ? '::' : '->' : null, 'function' => $function->name, 'file' => $c->getExecutingFile(), 'line' => $c->getExecutingLine()]; + if ($trace = $c->getTrace(\DEBUG_BACKTRACE_IGNORE_ARGS)) { + $function = new \ReflectionGenerator($c->getExecutingGenerator()); + \array_unshift($trace, ['function' => 'yield', 'file' => $function->getExecutingFile(), 'line' => $function->getExecutingLine() - 1]); + $trace[] = $frame; + $a[$prefix . 'trace'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\TraceStub($trace, \false, 0, -1, -1); + } else { + $function = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\FrameStub($frame, \false, \true); + $function = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ExceptionCaster::castFrameStub($function, [], $function, \true); + $a[$prefix . 'executing'] = $function[$prefix . 'src']; + } + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'closed'] = \false; + return $a; + } + public static function castClass(\ReflectionClass $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + if ($n = \Reflection::getModifierNames($c->getModifiers())) { + $a[$prefix . 'modifiers'] = \implode(' ', $n); + } + self::addMap($a, $c, ['extends' => 'getParentClass', 'implements' => 'getInterfaceNames', 'constants' => 'getReflectionConstants']); + foreach ($c->getProperties() as $n) { + $a[$prefix . 'properties'][$n->name] = $n; + } + foreach ($c->getMethods() as $n) { + $a[$prefix . 'methods'][$n->name] = $n; + } + self::addAttributes($a, $c, $prefix); + if (!($filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } + return $a; + } + public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested, int $filter = 0) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + self::addMap($a, $c, ['returnsReference' => 'returnsReference', 'returnType' => 'getReturnType', 'class' => 'getClosureScopeClass', 'this' => 'getClosureThis']); + if (isset($a[$prefix . 'returnType'])) { + $v = $a[$prefix . 'returnType']; + $v = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; + $a[$prefix . 'returnType'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ClassStub($a[$prefix . 'returnType'] instanceof \ReflectionNamedType && $a[$prefix . 'returnType']->allowsNull() && 'mixed' !== $v ? '?' . $v : $v, [\class_exists($v, \false) || \interface_exists($v, \false) || \trait_exists($v, \false) ? $v : '', '']); + } + if (isset($a[$prefix . 'class'])) { + $a[$prefix . 'class'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ClassStub($a[$prefix . 'class']); + } + if (isset($a[$prefix . 'this'])) { + $a[$prefix . 'this'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($a[$prefix . 'this']); + } + foreach ($c->getParameters() as $v) { + $k = '$' . $v->name; + if ($v->isVariadic()) { + $k = '...' . $k; + } + if ($v->isPassedByReference()) { + $k = '&' . $k; + } + $a[$prefix . 'parameters'][$k] = $v; + } + if (isset($a[$prefix . 'parameters'])) { + $a[$prefix . 'parameters'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub($a[$prefix . 'parameters']); + } + self::addAttributes($a, $c, $prefix); + if (!($filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE) && ($v = $c->getStaticVariables())) { + foreach ($v as $k => &$v) { + if (\is_object($v)) { + $a[$prefix . 'use']['$' . $k] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($v); + } else { + $a[$prefix . 'use']['$' . $k] =& $v; + } + } + unset($v); + $a[$prefix . 'use'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub($a[$prefix . 'use']); + } + if (!($filter & \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } + return $a; + } + public static function castClassConstant(\ReflectionClassConstant $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'modifiers'] = \implode(' ', \Reflection::getModifierNames($c->getModifiers())); + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'value'] = $c->getValue(); + self::addAttributes($a, $c); + return $a; + } + public static function castMethod(\ReflectionMethod $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'modifiers'] = \implode(' ', \Reflection::getModifierNames($c->getModifiers())); + return $a; + } + public static function castParameter(\ReflectionParameter $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + self::addMap($a, $c, ['position' => 'getPosition', 'isVariadic' => 'isVariadic', 'byReference' => 'isPassedByReference', 'allowsNull' => 'allowsNull']); + self::addAttributes($a, $c, $prefix); + if ($v = $c->getType()) { + $a[$prefix . 'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; + } + if (isset($a[$prefix . 'typeHint'])) { + $v = $a[$prefix . 'typeHint']; + $a[$prefix . 'typeHint'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ClassStub($v, [\class_exists($v, \false) || \interface_exists($v, \false) || \trait_exists($v, \false) ? $v : '', '']); + } else { + unset($a[$prefix . 'allowsNull']); + } + try { + $a[$prefix . 'default'] = $v = $c->getDefaultValue(); + if ($c->isDefaultValueConstant()) { + $a[$prefix . 'default'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($c->getDefaultValueConstantName(), $v); + } + if (null === $v) { + unset($a[$prefix . 'allowsNull']); + } + } catch (\ReflectionException $e) { + } + return $a; + } + public static function castProperty(\ReflectionProperty $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'modifiers'] = \implode(' ', \Reflection::getModifierNames($c->getModifiers())); + self::addAttributes($a, $c); + self::addExtra($a, $c); + return $a; + } + public static function castReference(\ReflectionReference $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'id'] = $c->getId(); + return $a; + } + public static function castExtension(\ReflectionExtension $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + self::addMap($a, $c, ['version' => 'getVersion', 'dependencies' => 'getDependencies', 'iniEntries' => 'getIniEntries', 'isPersistent' => 'isPersistent', 'isTemporary' => 'isTemporary', 'constants' => 'getConstants', 'functions' => 'getFunctions', 'classes' => 'getClasses']); + return $a; + } + public static function castZendExtension(\ReflectionZendExtension $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + self::addMap($a, $c, ['version' => 'getVersion', 'author' => 'getAuthor', 'copyright' => 'getCopyright', 'url' => 'getURL']); + return $a; + } + public static function getSignature(array $a) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $signature = ''; + if (isset($a[$prefix . 'parameters'])) { + foreach ($a[$prefix . 'parameters']->value as $k => $param) { + $signature .= ', '; + if ($type = $param->getType()) { + if (!$type instanceof \ReflectionNamedType) { + $signature .= $type . ' '; + } else { + if (!$param->isOptional() && $param->allowsNull() && 'mixed' !== $type->getName()) { + $signature .= '?'; + } + $signature .= \substr(\strrchr('\\' . $type->getName(), '\\'), 1) . ' '; + } + } + $signature .= $k; + if (!$param->isDefaultValueAvailable()) { + continue; + } + $v = $param->getDefaultValue(); + $signature .= ' = '; + if ($param->isDefaultValueConstant()) { + $signature .= \substr(\strrchr('\\' . $param->getDefaultValueConstantName(), '\\'), 1); + } elseif (null === $v) { + $signature .= 'null'; + } elseif (\is_array($v)) { + $signature .= $v ? '[…' . \count($v) . ']' : '[]'; + } elseif (\is_string($v)) { + $signature .= 10 > \strlen($v) && \false === \strpos($v, '\\') ? "'{$v}'" : "'…" . \strlen($v) . "'"; + } elseif (\is_bool($v)) { + $signature .= $v ? 'true' : 'false'; + } else { + $signature .= $v; + } + } + } + $signature = (empty($a[$prefix . 'returnsReference']) ? '' : '&') . '(' . \substr($signature, 2) . ')'; + if (isset($a[$prefix . 'returnType'])) { + $signature .= ': ' . \substr(\strrchr('\\' . $a[$prefix . 'returnType'], '\\'), 1); + } + return $signature; + } + private static function addExtra(array &$a, \Reflector $c) + { + $x = isset($a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'extra']) ? $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'extra']->value : []; + if (\method_exists($c, 'getFileName') && ($m = $c->getFileName())) { + $x['file'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($m, $c->getStartLine()); + $x['line'] = $c->getStartLine() . ' to ' . $c->getEndLine(); + } + self::addMap($x, $c, self::EXTRA_MAP, ''); + if ($x) { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'extra'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub($x); + } + } + private static function addMap(array &$a, object $c, array $map, string $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL) + { + foreach ($map as $k => $m) { + if (\PHP_VERSION_ID >= 80000 && 'isDisabled' === $k) { + continue; + } + if (\method_exists($c, $m) && \false !== ($m = $c->{$m}()) && null !== $m) { + $a[$prefix . $k] = $m instanceof \Reflector ? $m->name : $m; + } + } + } + private static function addAttributes(array &$a, \Reflector $c, string $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL) : void + { + if (\PHP_VERSION_ID >= 80000) { + foreach ($c->getAttributes() as $n) { + $a[$prefix . 'attributes'][] = $n; + } + } + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/ResourceCaster.php b/build/vendor/symfony/var-dumper/Caster/ResourceCaster.php new file mode 100644 index 0000000..c8d1427 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/ResourceCaster.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts common resource types to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class ResourceCaster +{ + /** + * @param \CurlHandle|resource $h + * + * @return array + */ + public static function castCurl($h, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + return \curl_getinfo($h); + } + public static function castDba($dba, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $list = \dba_list(); + $a['file'] = $list[(int) $dba]; + return $a; + } + public static function castProcess($process, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + return \proc_get_status($process); + } + public static function castStream($stream, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a = \stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); + if (isset($a['uri'])) { + $a['uri'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($a['uri']); + } + return $a; + } + public static function castStreamContext($stream, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + return @\stream_context_get_params($stream) ?: $a; + } + public static function castGd($gd, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $a['size'] = \imagesx($gd) . 'x' . \imagesy($gd); + $a['trueColor'] = \imageistruecolor($gd); + return $a; + } + public static function castMysqlLink($h, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a['host'] = \mysql_get_host_info($h); + $a['protocol'] = \mysql_get_proto_info($h); + $a['server'] = \mysql_get_server_info($h); + return $a; + } + public static function castOpensslX509($h, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $stub->cut = -1; + $info = \openssl_x509_parse($h, \false); + $pin = \openssl_pkey_get_public($h); + $pin = \openssl_pkey_get_details($pin)['key']; + $pin = \array_slice(\explode("\n", $pin), 1, -2); + $pin = \base64_decode(\implode('', $pin)); + $pin = \base64_encode(\hash('sha256', $pin, \true)); + $a += ['subject' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub(\array_intersect_key($info['subject'], ['organizationName' => \true, 'commonName' => \true])), 'issuer' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub(\array_intersect_key($info['issuer'], ['organizationName' => \true, 'commonName' => \true])), 'expiry' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\date(\DateTime::ISO8601, $info['validTo_time_t']), $info['validTo_time_t']), 'fingerprint' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub(['md5' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\wordwrap(\strtoupper(\openssl_x509_fingerprint($h, 'md5')), 2, ':', \true)), 'sha1' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\wordwrap(\strtoupper(\openssl_x509_fingerprint($h, 'sha1')), 2, ':', \true)), 'sha256' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\wordwrap(\strtoupper(\openssl_x509_fingerprint($h, 'sha256')), 2, ':', \true)), 'pin-sha256' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub($pin)])]; + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/SplCaster.php b/build/vendor/symfony/var-dumper/Caster/SplCaster.php new file mode 100644 index 0000000..cf7047a --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/SplCaster.php @@ -0,0 +1,159 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts SPL related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class SplCaster +{ + private const SPL_FILE_OBJECT_FLAGS = [\SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', \SplFileObject::READ_AHEAD => 'READ_AHEAD', \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', \SplFileObject::READ_CSV => 'READ_CSV']; + public static function castArrayObject(\ArrayObject $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + return self::castSplArray($c, $a, $stub, $isNested); + } + public static function castArrayIterator(\ArrayIterator $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + return self::castSplArray($c, $a, $stub, $isNested); + } + public static function castHeap(\Iterator $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, $isNested) + { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'heap' => \iterator_to_array(clone $c)]; + return $a; + } + public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $mode = $c->getIteratorMode(); + $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); + $a += [$prefix . 'mode' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(($mode & \SplDoublyLinkedList::IT_MODE_LIFO ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO') . ' | ' . ($mode & \SplDoublyLinkedList::IT_MODE_DELETE ? 'IT_MODE_DELETE' : 'IT_MODE_KEEP'), $mode), $prefix . 'dllist' => \iterator_to_array($c)]; + $c->setIteratorMode($mode); + return $a; + } + public static function castFileInfo(\SplFileInfo $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + static $map = ['path' => 'getPath', 'filename' => 'getFilename', 'basename' => 'getBasename', 'pathname' => 'getPathname', 'extension' => 'getExtension', 'realPath' => 'getRealPath', 'aTime' => 'getATime', 'mTime' => 'getMTime', 'cTime' => 'getCTime', 'inode' => 'getInode', 'size' => 'getSize', 'perms' => 'getPerms', 'owner' => 'getOwner', 'group' => 'getGroup', 'type' => 'getType', 'writable' => 'isWritable', 'readable' => 'isReadable', 'executable' => 'isExecutable', 'file' => 'isFile', 'dir' => 'isDir', 'link' => 'isLink', 'linkTarget' => 'getLinkTarget']; + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + unset($a["\0SplFileInfo\0fileName"]); + unset($a["\0SplFileInfo\0pathName"]); + if (\PHP_VERSION_ID < 80000) { + if (\false === $c->getPathname()) { + $a[$prefix . '⚠'] = 'The parent constructor was not called: the object is in an invalid state'; + return $a; + } + } else { + try { + $c->isReadable(); + } catch (\RuntimeException $e) { + if ('Object not initialized' !== $e->getMessage()) { + throw $e; + } + $a[$prefix . '⚠'] = 'The parent constructor was not called: the object is in an invalid state'; + return $a; + } catch (\Error $e) { + if ('Object not initialized' !== $e->getMessage()) { + throw $e; + } + $a[$prefix . '⚠'] = 'The parent constructor was not called: the object is in an invalid state'; + return $a; + } + } + foreach ($map as $key => $accessor) { + try { + $a[$prefix . $key] = $c->{$accessor}(); + } catch (\Exception $e) { + } + } + if (isset($a[$prefix . 'realPath'])) { + $a[$prefix . 'realPath'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($a[$prefix . 'realPath']); + } + if (isset($a[$prefix . 'perms'])) { + $a[$prefix . 'perms'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\sprintf('0%o', $a[$prefix . 'perms']), $a[$prefix . 'perms']); + } + static $mapDate = ['aTime', 'mTime', 'cTime']; + foreach ($mapDate as $key) { + if (isset($a[$prefix . $key])) { + $a[$prefix . $key] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\date('Y-m-d H:i:s', $a[$prefix . $key]), $a[$prefix . $key]); + } + } + return $a; + } + public static function castFileObject(\SplFileObject $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + static $map = ['csvControl' => 'getCsvControl', 'flags' => 'getFlags', 'maxLineLen' => 'getMaxLineLen', 'fstat' => 'fstat', 'eof' => 'eof', 'key' => 'key']; + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + foreach ($map as $key => $accessor) { + try { + $a[$prefix . $key] = $c->{$accessor}(); + } catch (\Exception $e) { + } + } + if (isset($a[$prefix . 'flags'])) { + $flagsArray = []; + foreach (self::SPL_FILE_OBJECT_FLAGS as $value => $name) { + if ($a[$prefix . 'flags'] & $value) { + $flagsArray[] = $name; + } + } + $a[$prefix . 'flags'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(\implode('|', $flagsArray), $a[$prefix . 'flags']); + } + if (isset($a[$prefix . 'fstat'])) { + $a[$prefix . 'fstat'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutArrayStub($a[$prefix . 'fstat'], ['dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks']); + } + return $a; + } + public static function castObjectStorage(\SplObjectStorage $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $storage = []; + unset($a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_DYNAMIC . "\0gcdata"]); + // Don't hit https://bugs.php.net/65967 + unset($a["\0SplObjectStorage\0storage"]); + $clone = clone $c; + foreach ($clone as $obj) { + $storage[] = ['object' => $obj, 'info' => $clone->getInfo()]; + } + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'storage' => $storage]; + return $a; + } + public static function castOuterIterator(\OuterIterator $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'innerIterator'] = $c->getInnerIterator(); + return $a; + } + public static function castWeakReference(\WeakReference $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'object'] = $c->get(); + return $a; + } + private static function castSplArray($c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) : array + { + $prefix = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL; + $flags = $c->getFlags(); + if (!($flags & \ArrayObject::STD_PROP_LIST)) { + $c->setFlags(\ArrayObject::STD_PROP_LIST); + $a = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::castObject($c, \get_class($c), \method_exists($c, '__debugInfo'), $stub->class); + $c->setFlags($flags); + } + if (\PHP_VERSION_ID < 70400) { + $a[$prefix . 'storage'] = $c->getArrayCopy(); + } + $a += [$prefix . 'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), $prefix . 'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS)]; + if ($c instanceof \ArrayObject) { + $a[$prefix . 'iteratorClass'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ClassStub($c->getIteratorClass()); + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/StubCaster.php b/build/vendor/symfony/var-dumper/Caster/StubCaster.php new file mode 100644 index 0000000..693d740 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/StubCaster.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts a caster's Stub. + * + * @author Nicolas Grekas + * + * @final + */ +class StubCaster +{ + public static function castStub(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + if ($isNested) { + $stub->type = $c->type; + $stub->class = $c->class; + $stub->value = $c->value; + $stub->handle = $c->handle; + $stub->cut = $c->cut; + $stub->attr = $c->attr; + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !\preg_match('//u', $c->value)) { + $stub->type = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_STRING; + $stub->class = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::STRING_BINARY; + } + $a = []; + } + return $a; + } + public static function castCutArray(\RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutArrayStub $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + return $isNested ? $c->preservedSubset : $a; + } + public static function cutInternals($obj, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + if ($isNested) { + $stub->cut += \count($a); + return []; + } + return $a; + } + public static function castEnum(\RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + if ($isNested) { + $stub->class = $c->dumpKeys ? '' : null; + $stub->handle = 0; + $stub->value = null; + $stub->cut = $c->cut; + $stub->attr = $c->attr; + $a = []; + if ($c->value) { + foreach (\array_keys($c->value) as $k) { + $keys[] = !isset($k[0]) || "\0" !== $k[0] ? \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . $k : $k; + } + // Preserve references with array_combine() + $a = \array_combine($keys, $c->value); + } + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/SymfonyCaster.php b/build/vendor/symfony/var-dumper/Caster/SymfonyCaster.php new file mode 100644 index 0000000..92a24fe --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/SymfonyCaster.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\HttpFoundation\Request; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * @final + */ +class SymfonyCaster +{ + private const REQUEST_GETTERS = ['pathInfo' => 'getPathInfo', 'requestUri' => 'getRequestUri', 'baseUrl' => 'getBaseUrl', 'basePath' => 'getBasePath', 'method' => 'getMethod', 'format' => 'getRequestFormat']; + public static function castRequest(\RayGlobalScoped\Symfony\Component\HttpFoundation\Request $request, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $clone = null; + foreach (self::REQUEST_GETTERS as $prop => $getter) { + $key = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . $prop; + if (\array_key_exists($key, $a) && null === $a[$key]) { + if (null === $clone) { + $clone = clone $request; + } + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . $prop] = $clone->{$getter}(); + } + } + return $a; + } + public static function castHttpClient($client, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $multiKey = \sprintf("\0%s\0multi", \get_class($client)); + if (isset($a[$multiKey])) { + $a[$multiKey] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\CutStub($a[$multiKey]); + } + return $a; + } + public static function castHttpClientResponse($response, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $stub->cut += \count($a); + $a = []; + foreach ($response->getInfo() as $k => $v) { + $a[\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . $k] = $v; + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/TraceStub.php b/build/vendor/symfony/var-dumper/Caster/TraceStub.php new file mode 100644 index 0000000..e95a583 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/TraceStub.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). + * + * @author Nicolas Grekas + */ +class TraceStub extends \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub +{ + public $keepArgs; + public $sliceOffset; + public $sliceLength; + public $numberingOffset; + public function __construct(array $trace, bool $keepArgs = \true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0) + { + $this->value = $trace; + $this->keepArgs = $keepArgs; + $this->sliceOffset = $sliceOffset; + $this->sliceLength = $sliceLength; + $this->numberingOffset = $numberingOffset; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/UuidCaster.php b/build/vendor/symfony/var-dumper/Caster/UuidCaster.php new file mode 100644 index 0000000..bbb8e25 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/UuidCaster.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Ramsey\Uuid\UuidInterface; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * @author Grégoire Pineau + */ +final class UuidCaster +{ + public static function castRamseyUuid(\RayGlobalScoped\Ramsey\Uuid\UuidInterface $c, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) : array + { + $a += [\RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'uuid' => (string) $c]; + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php b/build/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php new file mode 100644 index 0000000..a194b41 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts XmlReader class to array representation. + * + * @author Baptiste Clavié + * + * @final + */ +class XmlReaderCaster +{ + private const NODE_TYPES = [\XMLReader::NONE => 'NONE', \XMLReader::ELEMENT => 'ELEMENT', \XMLReader::ATTRIBUTE => 'ATTRIBUTE', \XMLReader::TEXT => 'TEXT', \XMLReader::CDATA => 'CDATA', \XMLReader::ENTITY_REF => 'ENTITY_REF', \XMLReader::ENTITY => 'ENTITY', \XMLReader::PI => 'PI (Processing Instruction)', \XMLReader::COMMENT => 'COMMENT', \XMLReader::DOC => 'DOC', \XMLReader::DOC_TYPE => 'DOC_TYPE', \XMLReader::DOC_FRAGMENT => 'DOC_FRAGMENT', \XMLReader::NOTATION => 'NOTATION', \XMLReader::WHITESPACE => 'WHITESPACE', \XMLReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE', \XMLReader::END_ELEMENT => 'END_ELEMENT', \XMLReader::END_ENTITY => 'END_ENTITY', \XMLReader::XML_DECLARATION => 'XML_DECLARATION']; + public static function castXmlReader(\XMLReader $reader, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $props = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . 'parserProperties'; + $info = ['localName' => $reader->localName, 'prefix' => $reader->prefix, 'nodeType' => new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::NODE_TYPES[$reader->nodeType], $reader->nodeType), 'depth' => $reader->depth, 'isDefault' => $reader->isDefault, 'isEmptyElement' => \XMLReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement, 'xmlLang' => $reader->xmlLang, 'attributeCount' => $reader->attributeCount, 'value' => $reader->value, 'namespaceURI' => $reader->namespaceURI, 'baseURI' => $reader->baseURI ? new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\LinkStub($reader->baseURI) : $reader->baseURI, $props => ['LOADDTD' => $reader->getParserProperty(\XMLReader::LOADDTD), 'DEFAULTATTRS' => $reader->getParserProperty(\XMLReader::DEFAULTATTRS), 'VALIDATE' => $reader->getParserProperty(\XMLReader::VALIDATE), 'SUBST_ENTITIES' => $reader->getParserProperty(\XMLReader::SUBST_ENTITIES)]]; + if ($info[$props] = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::filter($info[$props], \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_EMPTY, [], $count)) { + $info[$props] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\EnumStub($info[$props]); + $info[$props]->cut = $count; + } + $info = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::filter($info, \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::EXCLUDE_EMPTY, [], $count); + // +2 because hasValue and hasAttributes are always filtered + $stub->cut += $count + 2; + return $a + $info; + } +} diff --git a/build/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php b/build/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php new file mode 100644 index 0000000..bd14d9d --- /dev/null +++ b/build/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Caster; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * Casts XML resources to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class XmlResourceCaster +{ + private const XML_ERRORS = [\XML_ERROR_NONE => 'XML_ERROR_NONE', \XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY', \XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX', \XML_ERROR_NO_ELEMENTS => 'XML_ERROR_NO_ELEMENTS', \XML_ERROR_INVALID_TOKEN => 'XML_ERROR_INVALID_TOKEN', \XML_ERROR_UNCLOSED_TOKEN => 'XML_ERROR_UNCLOSED_TOKEN', \XML_ERROR_PARTIAL_CHAR => 'XML_ERROR_PARTIAL_CHAR', \XML_ERROR_TAG_MISMATCH => 'XML_ERROR_TAG_MISMATCH', \XML_ERROR_DUPLICATE_ATTRIBUTE => 'XML_ERROR_DUPLICATE_ATTRIBUTE', \XML_ERROR_JUNK_AFTER_DOC_ELEMENT => 'XML_ERROR_JUNK_AFTER_DOC_ELEMENT', \XML_ERROR_PARAM_ENTITY_REF => 'XML_ERROR_PARAM_ENTITY_REF', \XML_ERROR_UNDEFINED_ENTITY => 'XML_ERROR_UNDEFINED_ENTITY', \XML_ERROR_RECURSIVE_ENTITY_REF => 'XML_ERROR_RECURSIVE_ENTITY_REF', \XML_ERROR_ASYNC_ENTITY => 'XML_ERROR_ASYNC_ENTITY', \XML_ERROR_BAD_CHAR_REF => 'XML_ERROR_BAD_CHAR_REF', \XML_ERROR_BINARY_ENTITY_REF => 'XML_ERROR_BINARY_ENTITY_REF', \XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF => 'XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', \XML_ERROR_MISPLACED_XML_PI => 'XML_ERROR_MISPLACED_XML_PI', \XML_ERROR_UNKNOWN_ENCODING => 'XML_ERROR_UNKNOWN_ENCODING', \XML_ERROR_INCORRECT_ENCODING => 'XML_ERROR_INCORRECT_ENCODING', \XML_ERROR_UNCLOSED_CDATA_SECTION => 'XML_ERROR_UNCLOSED_CDATA_SECTION', \XML_ERROR_EXTERNAL_ENTITY_HANDLING => 'XML_ERROR_EXTERNAL_ENTITY_HANDLING']; + public static function castXml($h, array $a, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a['current_byte_index'] = \xml_get_current_byte_index($h); + $a['current_column_number'] = \xml_get_current_column_number($h); + $a['current_line_number'] = \xml_get_current_line_number($h); + $a['error_code'] = \xml_get_error_code($h); + if (isset(self::XML_ERRORS[$a['error_code']])) { + $a['error_code'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Caster\ConstStub(self::XML_ERRORS[$a['error_code']], $a['error_code']); + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Cloner/AbstractCloner.php b/build/vendor/symfony/var-dumper/Cloner/AbstractCloner.php new file mode 100644 index 0000000..dceaebd --- /dev/null +++ b/build/vendor/symfony/var-dumper/Cloner/AbstractCloner.php @@ -0,0 +1,193 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Cloner; + +use RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster; +use RayGlobalScoped\Symfony\Component\VarDumper\Exception\ThrowingCasterException; +/** + * AbstractCloner implements a generic caster mechanism for objects and resources. + * + * @author Nicolas Grekas + */ +abstract class AbstractCloner implements \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\ClonerInterface +{ + public static $defaultCasters = ['__PHP_Incomplete_Class' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\Caster', 'castPhpIncompleteClass'], 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\CutStub' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'castStub'], 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'castCutArray'], 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ConstStub' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'castStub'], 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\EnumStub' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'castEnum'], 'Closure' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castClosure'], 'Generator' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castGenerator'], 'ReflectionType' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castType'], 'ReflectionAttribute' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castAttribute'], 'ReflectionGenerator' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castReflectionGenerator'], 'ReflectionClass' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castClass'], 'ReflectionClassConstant' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castClassConstant'], 'ReflectionFunctionAbstract' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castFunctionAbstract'], 'ReflectionMethod' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castMethod'], 'ReflectionParameter' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castParameter'], 'ReflectionProperty' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castProperty'], 'ReflectionReference' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castReference'], 'ReflectionExtension' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castExtension'], 'ReflectionZendExtension' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster', 'castZendExtension'], 'RayGlobalScoped\\Doctrine\\Common\\Persistence\\ObjectManager' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'RayGlobalScoped\\Doctrine\\Common\\Proxy\\Proxy' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster', 'castCommonProxy'], 'RayGlobalScoped\\Doctrine\\ORM\\Proxy\\Proxy' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster', 'castOrmProxy'], 'RayGlobalScoped\\Doctrine\\ORM\\PersistentCollection' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster', 'castPersistentCollection'], 'RayGlobalScoped\\Doctrine\\Persistence\\ObjectManager' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'DOMException' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castException'], 'DOMStringList' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castLength'], 'DOMNameList' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castLength'], 'DOMImplementation' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castImplementation'], 'DOMImplementationList' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castLength'], 'DOMNode' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castNode'], 'DOMNameSpaceNode' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castNameSpaceNode'], 'DOMDocument' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castDocument'], 'DOMNodeList' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castLength'], 'DOMNamedNodeMap' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castLength'], 'DOMCharacterData' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castCharacterData'], 'DOMAttr' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castAttr'], 'DOMElement' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castElement'], 'DOMText' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castText'], 'DOMTypeinfo' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castTypeinfo'], 'DOMDomError' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castDomError'], 'DOMLocator' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castLocator'], 'DOMDocumentType' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castDocumentType'], 'DOMNotation' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castNotation'], 'DOMEntity' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castEntity'], 'DOMProcessingInstruction' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castProcessingInstruction'], 'DOMXPath' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DOMCaster', 'castXPath'], 'XMLReader' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster', 'castXmlReader'], 'ErrorException' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster', 'castErrorException'], 'Exception' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster', 'castException'], 'Error' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster', 'castError'], 'RayGlobalScoped\\Symfony\\Bridge\\Monolog\\Logger' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'RayGlobalScoped\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'RayGlobalScoped\\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'RayGlobalScoped\\Symfony\\Component\\HttpClient\\CurlHttpClient' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster', 'castHttpClient'], 'RayGlobalScoped\\Symfony\\Component\\HttpClient\\NativeHttpClient' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster', 'castHttpClient'], 'RayGlobalScoped\\Symfony\\Component\\HttpClient\\Response\\CurlResponse' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster', 'castHttpClientResponse'], 'RayGlobalScoped\\Symfony\\Component\\HttpClient\\Response\\NativeResponse' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster', 'castHttpClientResponse'], 'RayGlobalScoped\\Symfony\\Component\\HttpFoundation\\Request' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster', 'castRequest'], 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster', 'castThrowingCasterException'], 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\TraceStub' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster', 'castTraceStub'], 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\FrameStub' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster', 'castFrameStub'], 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'RayGlobalScoped\\Symfony\\Component\\ErrorHandler\\Exception\\SilencedErrorContext' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster', 'castSilencedErrorContext'], 'RayGlobalScoped\\Imagine\\Image\\ImageInterface' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ImagineCaster', 'castImage'], 'RayGlobalScoped\\Ramsey\\Uuid\\UuidInterface' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\UuidCaster', 'castRamseyUuid'], 'RayGlobalScoped\\ProxyManager\\Proxy\\ProxyInterface' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ProxyManagerCaster', 'castProxy'], 'PHPUnit_Framework_MockObject_MockObject' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'RayGlobalScoped\\PHPUnit\\Framework\\MockObject\\MockObject' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'RayGlobalScoped\\PHPUnit\\Framework\\MockObject\\Stub' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'RayGlobalScoped\\Prophecy\\Prophecy\\ProphecySubjectInterface' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'RayGlobalScoped\\Mockery\\MockInterface' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\StubCaster', 'cutInternals'], 'PDO' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PdoCaster', 'castPdo'], 'PDOStatement' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PdoCaster', 'castPdoStatement'], 'AMQPConnection' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\AmqpCaster', 'castConnection'], 'AMQPChannel' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\AmqpCaster', 'castChannel'], 'AMQPQueue' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\AmqpCaster', 'castQueue'], 'AMQPExchange' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\AmqpCaster', 'castExchange'], 'AMQPEnvelope' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\AmqpCaster', 'castEnvelope'], 'ArrayObject' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castArrayObject'], 'ArrayIterator' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castArrayIterator'], 'SplDoublyLinkedList' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castDoublyLinkedList'], 'SplFileInfo' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castFileInfo'], 'SplFileObject' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castFileObject'], 'SplHeap' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castHeap'], 'SplObjectStorage' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castObjectStorage'], 'SplPriorityQueue' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castHeap'], 'OuterIterator' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castOuterIterator'], 'WeakReference' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\SplCaster', 'castWeakReference'], 'Redis' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RedisCaster', 'castRedis'], 'RedisArray' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RedisCaster', 'castRedisArray'], 'RedisCluster' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RedisCaster', 'castRedisCluster'], 'DateTimeInterface' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DateCaster', 'castDateTime'], 'DateInterval' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DateCaster', 'castInterval'], 'DateTimeZone' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DateCaster', 'castTimeZone'], 'DatePeriod' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DateCaster', 'castPeriod'], 'GMP' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\GmpCaster', 'castGmp'], 'MessageFormatter' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\IntlCaster', 'castMessageFormatter'], 'NumberFormatter' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\IntlCaster', 'castNumberFormatter'], 'IntlTimeZone' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\IntlCaster', 'castIntlTimeZone'], 'IntlCalendar' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\IntlCaster', 'castIntlCalendar'], 'IntlDateFormatter' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\IntlCaster', 'castIntlDateFormatter'], 'Memcached' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\MemcachedCaster', 'castMemcached'], 'RayGlobalScoped\\Ds\\Collection' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DsCaster', 'castCollection'], 'RayGlobalScoped\\Ds\\Map' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DsCaster', 'castMap'], 'RayGlobalScoped\\Ds\\Pair' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DsCaster', 'castPair'], 'RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\DsCaster', 'castPairStub'], 'CurlHandle' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castCurl'], ':curl' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castCurl'], ':dba' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castDba'], ':dba persistent' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castDba'], 'GdImage' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castGd'], ':gd' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castGd'], ':mysql link' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castMysqlLink'], ':pgsql large object' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster', 'castLargeObject'], ':pgsql link' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster', 'castLink'], ':pgsql link persistent' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster', 'castLink'], ':pgsql result' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster', 'castResult'], ':process' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castProcess'], ':stream' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castStream'], 'OpenSSLCertificate' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castOpensslX509'], ':OpenSSL X.509' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castOpensslX509'], ':persistent stream' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castStream'], ':stream-context' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\ResourceCaster', 'castStreamContext'], 'XmlParser' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster', 'castXml'], ':xml' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster', 'castXml'], 'RdKafka' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castRdKafka'], 'RayGlobalScoped\\RdKafka\\Conf' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castConf'], 'RayGlobalScoped\\RdKafka\\KafkaConsumer' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castKafkaConsumer'], 'RayGlobalScoped\\RdKafka\\Metadata\\Broker' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castBrokerMetadata'], 'RayGlobalScoped\\RdKafka\\Metadata\\Collection' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castCollectionMetadata'], 'RayGlobalScoped\\RdKafka\\Metadata\\Partition' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castPartitionMetadata'], 'RayGlobalScoped\\RdKafka\\Metadata\\Topic' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castTopicMetadata'], 'RayGlobalScoped\\RdKafka\\Message' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castMessage'], 'RayGlobalScoped\\RdKafka\\Topic' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castTopic'], 'RayGlobalScoped\\RdKafka\\TopicPartition' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castTopicPartition'], 'RayGlobalScoped\\RdKafka\\TopicConf' => ['RayGlobalScoped\\Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster', 'castTopicConf']]; + protected $maxItems = 2500; + protected $maxString = -1; + protected $minDepth = 1; + private $casters = []; + private $prevErrorHandler; + private $classInfo = []; + private $filter = 0; + /** + * @param callable[]|null $casters A map of casters + * + * @see addCasters + */ + public function __construct(array $casters = null) + { + if (null === $casters) { + $casters = static::$defaultCasters; + } + $this->addCasters($casters); + } + /** + * Adds casters for resources and objects. + * + * Maps resources or objects types to a callback. + * Types are in the key, with a callable caster for value. + * Resource types are to be prefixed with a `:`, + * see e.g. static::$defaultCasters. + * + * @param callable[] $casters A map of casters + */ + public function addCasters(array $casters) + { + foreach ($casters as $type => $callback) { + $this->casters[$type][] = $callback; + } + } + /** + * Sets the maximum number of items to clone past the minimum depth in nested structures. + */ + public function setMaxItems(int $maxItems) + { + $this->maxItems = $maxItems; + } + /** + * Sets the maximum cloned length for strings. + */ + public function setMaxString(int $maxString) + { + $this->maxString = $maxString; + } + /** + * Sets the minimum tree depth where we are guaranteed to clone all the items. After this + * depth is reached, only setMaxItems items will be cloned. + */ + public function setMinDepth(int $minDepth) + { + $this->minDepth = $minDepth; + } + /** + * Clones a PHP variable. + * + * @param mixed $var Any PHP variable + * @param int $filter A bit field of Caster::EXCLUDE_* constants + * + * @return Data The cloned variable represented by a Data object + */ + public function cloneVar($var, int $filter = 0) + { + $this->prevErrorHandler = \set_error_handler(function ($type, $msg, $file, $line, $context = []) { + if (\E_RECOVERABLE_ERROR === $type || \E_USER_ERROR === $type) { + // Cloner never dies + throw new \ErrorException($msg, 0, $type, $file, $line); + } + if ($this->prevErrorHandler) { + return ($this->prevErrorHandler)($type, $msg, $file, $line, $context); + } + return \false; + }); + $this->filter = $filter; + if ($gc = \gc_enabled()) { + \gc_disable(); + } + try { + return new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data($this->doClone($var)); + } finally { + if ($gc) { + \gc_enable(); + } + \restore_error_handler(); + $this->prevErrorHandler = null; + } + } + /** + * Effectively clones the PHP variable. + * + * @param mixed $var Any PHP variable + * + * @return array The cloned variable represented in an array + */ + protected abstract function doClone($var); + /** + * Casts an object to an array representation. + * + * @param bool $isNested True if the object is nested in the dumped structure + * + * @return array The object casted as array + */ + protected function castObject(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $obj = $stub->value; + $class = $stub->class; + if (\PHP_VERSION_ID < 80000 ? "\0" === ($class[15] ?? null) : \false !== \strpos($class, "@anonymous\0")) { + $stub->class = \get_debug_type($obj); + } + if (isset($this->classInfo[$class])) { + [$i, $parents, $hasDebugInfo, $fileInfo] = $this->classInfo[$class]; + } else { + $i = 2; + $parents = [$class]; + $hasDebugInfo = \method_exists($class, '__debugInfo'); + foreach (\class_parents($class) as $p) { + $parents[] = $p; + ++$i; + } + foreach (\class_implements($class) as $p) { + $parents[] = $p; + ++$i; + } + $parents[] = '*'; + $r = new \ReflectionClass($class); + $fileInfo = $r->isInternal() || $r->isSubclassOf(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::class) ? [] : ['file' => $r->getFileName(), 'line' => $r->getStartLine()]; + $this->classInfo[$class] = [$i, $parents, $hasDebugInfo, $fileInfo]; + } + $stub->attr += $fileInfo; + $a = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::castObject($obj, $class, $hasDebugInfo, $stub->class); + try { + while ($i--) { + if (!empty($this->casters[$p = $parents[$i]])) { + foreach ($this->casters[$p] as $callback) { + $a = $callback($obj, $a, $stub, $isNested, $this->filter); + } + } + } + } catch (\Exception $e) { + $a = [(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT === $stub->type ? \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL : '') . '⚠' => new \RayGlobalScoped\Symfony\Component\VarDumper\Exception\ThrowingCasterException($e)] + $a; + } + return $a; + } + /** + * Casts a resource to an array representation. + * + * @param bool $isNested True if the object is nested in the dumped structure + * + * @return array The resource casted as array + */ + protected function castResource(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub $stub, bool $isNested) + { + $a = []; + $res = $stub->value; + $type = $stub->class; + try { + if (!empty($this->casters[':' . $type])) { + foreach ($this->casters[':' . $type] as $callback) { + $a = $callback($res, $a, $stub, $isNested, $this->filter); + } + } + } catch (\Exception $e) { + $a = [(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT === $stub->type ? \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL : '') . '⚠' => new \RayGlobalScoped\Symfony\Component\VarDumper\Exception\ThrowingCasterException($e)] + $a; + } + return $a; + } +} diff --git a/build/vendor/symfony/var-dumper/Cloner/ClonerInterface.php b/build/vendor/symfony/var-dumper/Cloner/ClonerInterface.php new file mode 100644 index 0000000..d6c282b --- /dev/null +++ b/build/vendor/symfony/var-dumper/Cloner/ClonerInterface.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Cloner; + +/** + * @author Nicolas Grekas + */ +interface ClonerInterface +{ + /** + * Clones a PHP variable. + * + * @param mixed $var Any PHP variable + * + * @return Data The cloned variable represented by a Data object + */ + public function cloneVar($var); +} diff --git a/build/vendor/symfony/var-dumper/Cloner/Cursor.php b/build/vendor/symfony/var-dumper/Cloner/Cursor.php new file mode 100644 index 0000000..90babf4 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Cloner/Cursor.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Cloner; + +/** + * Represents the current state of a dumper while dumping. + * + * @author Nicolas Grekas + */ +class Cursor +{ + public const HASH_INDEXED = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::ARRAY_INDEXED; + public const HASH_ASSOC = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::ARRAY_ASSOC; + public const HASH_OBJECT = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT; + public const HASH_RESOURCE = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_RESOURCE; + public $depth = 0; + public $refIndex = 0; + public $softRefTo = 0; + public $softRefCount = 0; + public $softRefHandle = 0; + public $hardRefTo = 0; + public $hardRefCount = 0; + public $hardRefHandle = 0; + public $hashType; + public $hashKey; + public $hashKeyIsBinary; + public $hashIndex = 0; + public $hashLength = 0; + public $hashCut = 0; + public $stop = \false; + public $attr = []; + public $skipChildren = \false; +} diff --git a/build/vendor/symfony/var-dumper/Cloner/Data.php b/build/vendor/symfony/var-dumper/Cloner/Data.php new file mode 100644 index 0000000..72824a4 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Cloner/Data.php @@ -0,0 +1,396 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Cloner; + +use RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; +/** + * @author Nicolas Grekas + */ +class Data implements \ArrayAccess, \Countable, \IteratorAggregate +{ + private $data; + private $position = 0; + private $key = 0; + private $maxDepth = 20; + private $maxItemsPerDepth = -1; + private $useRefHandles = -1; + private $context = []; + /** + * @param array $data An array as returned by ClonerInterface::cloneVar() + */ + public function __construct(array $data) + { + $this->data = $data; + } + /** + * @return string|null The type of the value + */ + public function getType() + { + $item = $this->data[$this->position][$this->key]; + if ($item instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub && \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_REF === $item->type && !$item->position) { + $item = $item->value; + } + if (!$item instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub) { + return \gettype($item); + } + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_STRING === $item->type) { + return 'string'; + } + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_ARRAY === $item->type) { + return 'array'; + } + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT === $item->type) { + return $item->class; + } + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_RESOURCE === $item->type) { + return $item->class . ' resource'; + } + return null; + } + /** + * @param array|bool $recursive Whether values should be resolved recursively or not + * + * @return string|int|float|bool|array|Data[]|null A native representation of the original value + */ + public function getValue($recursive = \false) + { + $item = $this->data[$this->position][$this->key]; + if ($item instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub && \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_REF === $item->type && !$item->position) { + $item = $item->value; + } + if (!($item = $this->getStub($item)) instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub) { + return $item; + } + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_STRING === $item->type) { + return $item->value; + } + $children = $item->position ? $this->data[$item->position] : []; + foreach ($children as $k => $v) { + if ($recursive && !($v = $this->getStub($v)) instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub) { + continue; + } + $children[$k] = clone $this; + $children[$k]->key = $k; + $children[$k]->position = $item->position; + if ($recursive) { + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_REF === $v->type && ($v = $this->getStub($v->value)) instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub) { + $recursive = (array) $recursive; + if (isset($recursive[$v->position])) { + continue; + } + $recursive[$v->position] = \true; + } + $children[$k] = $children[$k]->getValue($recursive); + } + } + return $children; + } + /** + * @return int + */ + public function count() + { + return \count($this->getValue()); + } + /** + * @return \Traversable + */ + public function getIterator() + { + if (!\is_array($value = $this->getValue())) { + throw new \LogicException(\sprintf('"%s" object holds non-iterable type "%s".', self::class, \get_debug_type($value))); + } + yield from $value; + } + public function __get(string $key) + { + if (null !== ($data = $this->seek($key))) { + $item = $this->getStub($data->data[$data->position][$data->key]); + return $item instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub || [] === $item ? $data : $item; + } + return null; + } + /** + * @return bool + */ + public function __isset(string $key) + { + return null !== $this->seek($key); + } + /** + * @return bool + */ + public function offsetExists($key) + { + return $this->__isset($key); + } + public function offsetGet($key) + { + return $this->__get($key); + } + public function offsetSet($key, $value) + { + throw new \BadMethodCallException(self::class . ' objects are immutable.'); + } + public function offsetUnset($key) + { + throw new \BadMethodCallException(self::class . ' objects are immutable.'); + } + /** + * @return string + */ + public function __toString() + { + $value = $this->getValue(); + if (!\is_array($value)) { + return (string) $value; + } + return \sprintf('%s (count=%d)', $this->getType(), \count($value)); + } + /** + * Returns a depth limited clone of $this. + * + * @return static + */ + public function withMaxDepth(int $maxDepth) + { + $data = clone $this; + $data->maxDepth = (int) $maxDepth; + return $data; + } + /** + * Limits the number of elements per depth level. + * + * @return static + */ + public function withMaxItemsPerDepth(int $maxItemsPerDepth) + { + $data = clone $this; + $data->maxItemsPerDepth = (int) $maxItemsPerDepth; + return $data; + } + /** + * Enables/disables objects' identifiers tracking. + * + * @param bool $useRefHandles False to hide global ref. handles + * + * @return static + */ + public function withRefHandles(bool $useRefHandles) + { + $data = clone $this; + $data->useRefHandles = $useRefHandles ? -1 : 0; + return $data; + } + /** + * @return static + */ + public function withContext(array $context) + { + $data = clone $this; + $data->context = $context; + return $data; + } + /** + * Seeks to a specific key in nested data structures. + * + * @param string|int $key The key to seek to + * + * @return static|null Null if the key is not set + */ + public function seek($key) + { + $item = $this->data[$this->position][$this->key]; + if ($item instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub && \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_REF === $item->type && !$item->position) { + $item = $item->value; + } + if (!($item = $this->getStub($item)) instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub || !$item->position) { + return null; + } + $keys = [$key]; + switch ($item->type) { + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT: + $keys[] = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_DYNAMIC . $key; + $keys[] = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_PROTECTED . $key; + $keys[] = \RayGlobalScoped\Symfony\Component\VarDumper\Caster\Caster::PREFIX_VIRTUAL . $key; + $keys[] = "\0{$item->class}\0{$key}"; + // no break + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_ARRAY: + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_RESOURCE: + break; + default: + return null; + } + $data = null; + $children = $this->data[$item->position]; + foreach ($keys as $key) { + if (isset($children[$key]) || \array_key_exists($key, $children)) { + $data = clone $this; + $data->key = $key; + $data->position = $item->position; + break; + } + } + return $data; + } + /** + * Dumps data with a DumperInterface dumper. + */ + public function dump(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\DumperInterface $dumper) + { + $refs = [0]; + $cursor = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor(); + if ($cursor->attr = $this->context[\RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider::class] ?? []) { + $cursor->attr['if_links'] = \true; + $cursor->hashType = -1; + $dumper->dumpScalar($cursor, 'default', '^'); + $cursor->attr = ['if_links' => \true]; + $dumper->dumpScalar($cursor, 'default', ' '); + $cursor->hashType = 0; + } + $this->dumpItem($dumper, $cursor, $refs, $this->data[$this->position][$this->key]); + } + /** + * Depth-first dumping of items. + * + * @param mixed $item A Stub object or the original value being dumped + */ + private function dumpItem(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\DumperInterface $dumper, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, array &$refs, $item) + { + $cursor->refIndex = 0; + $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; + $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; + $firstSeen = \true; + if (!$item instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub) { + $cursor->attr = []; + $type = \gettype($item); + if ($item && 'array' === $type) { + $item = $this->getStub($item); + } + } elseif (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_REF === $item->type) { + if ($item->handle) { + if (!isset($refs[$r = $item->handle - (\PHP_INT_MAX >> 1)])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = \false; + } + $cursor->hardRefTo = $refs[$r]; + $cursor->hardRefHandle = $this->useRefHandles & $item->handle; + $cursor->hardRefCount = 0 < $item->handle ? $item->refCount : 0; + } + $cursor->attr = $item->attr; + $type = $item->class ?: \gettype($item->value); + $item = $this->getStub($item->value); + } + if ($item instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub) { + if ($item->refCount) { + if (!isset($refs[$r = $item->handle])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = \false; + } + $cursor->softRefTo = $refs[$r]; + } + $cursor->softRefHandle = $this->useRefHandles & $item->handle; + $cursor->softRefCount = $item->refCount; + $cursor->attr = $item->attr; + $cut = $item->cut; + if ($item->position && $firstSeen) { + $children = $this->data[$item->position]; + if ($cursor->stop) { + if ($cut >= 0) { + $cut += \count($children); + } + $children = []; + } + } else { + $children = []; + } + switch ($item->type) { + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_STRING: + $dumper->dumpString($cursor, $item->value, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::STRING_BINARY === $item->class, $cut); + break; + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_ARRAY: + $item = clone $item; + $item->type = $item->class; + $item->class = $item->value; + // no break + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT: + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_RESOURCE: + $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; + $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); + if ($withChildren) { + if ($cursor->skipChildren) { + $withChildren = \false; + $cut = -1; + } else { + $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); + } + } elseif ($children && 0 <= $cut) { + $cut += \count($children); + } + $cursor->skipChildren = \false; + $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); + break; + default: + throw new \RuntimeException(\sprintf('Unexpected Stub type: "%s".', $item->type)); + } + } elseif ('array' === $type) { + $dumper->enterHash($cursor, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_INDEXED, 0, \false); + $dumper->leaveHash($cursor, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_INDEXED, 0, \false, 0); + } elseif ('string' === $type) { + $dumper->dumpString($cursor, $item, \false, 0); + } else { + $dumper->dumpScalar($cursor, $type, $item); + } + } + /** + * Dumps children of hash structures. + * + * @return int The final number of removed items + */ + private function dumpChildren(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\DumperInterface $dumper, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $parentCursor, array &$refs, array $children, int $hashCut, int $hashType, bool $dumpKeys) : int + { + $cursor = clone $parentCursor; + ++$cursor->depth; + $cursor->hashType = $hashType; + $cursor->hashIndex = 0; + $cursor->hashLength = \count($children); + $cursor->hashCut = $hashCut; + foreach ($children as $key => $child) { + $cursor->hashKeyIsBinary = isset($key[0]) && !\preg_match('//u', $key); + $cursor->hashKey = $dumpKeys ? $key : null; + $this->dumpItem($dumper, $cursor, $refs, $child); + if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { + $parentCursor->stop = \true; + return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; + } + } + return $hashCut; + } + private function getStub($item) + { + if (!$item || !\is_array($item)) { + return $item; + } + $stub = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub(); + $stub->type = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_ARRAY; + foreach ($item as $stub->class => $stub->position) { + } + if (isset($item[0])) { + $stub->cut = $item[0]; + } + $stub->value = $stub->cut + ($stub->position ? \count($this->data[$stub->position]) : 0); + return $stub; + } +} diff --git a/build/vendor/symfony/var-dumper/Cloner/DumperInterface.php b/build/vendor/symfony/var-dumper/Cloner/DumperInterface.php new file mode 100644 index 0000000..19795f4 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Cloner/DumperInterface.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Cloner; + +/** + * DumperInterface used by Data objects. + * + * @author Nicolas Grekas + */ +interface DumperInterface +{ + /** + * Dumps a scalar value. + * + * @param string $type The PHP type of the value being dumped + * @param string|int|float|bool $value The scalar value being dumped + */ + public function dumpScalar(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, string $type, $value); + /** + * Dumps a string. + * + * @param string $str The string being dumped + * @param bool $bin Whether $str is UTF-8 or binary encoded + * @param int $cut The number of characters $str has been cut by + */ + public function dumpString(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, string $str, bool $bin, int $cut); + /** + * Dumps while entering an hash. + * + * @param int $type A Cursor::HASH_* const for the type of hash + * @param string|int $class The object class, resource type or array count + * @param bool $hasChild When the dump of the hash has child item + */ + public function enterHash(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, int $type, $class, bool $hasChild); + /** + * Dumps while leaving an hash. + * + * @param int $type A Cursor::HASH_* const for the type of hash + * @param string|int $class The object class, resource type or array count + * @param bool $hasChild When the dump of the hash has child item + * @param int $cut The number of items the hash has been cut by + */ + public function leaveHash(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, int $type, $class, bool $hasChild, int $cut); +} diff --git a/build/vendor/symfony/var-dumper/Cloner/Stub.php b/build/vendor/symfony/var-dumper/Cloner/Stub.php new file mode 100644 index 0000000..7685dd3 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Cloner/Stub.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Cloner; + +/** + * Represents the main properties of a PHP variable. + * + * @author Nicolas Grekas + */ +class Stub +{ + public const TYPE_REF = 1; + public const TYPE_STRING = 2; + public const TYPE_ARRAY = 3; + public const TYPE_OBJECT = 4; + public const TYPE_RESOURCE = 5; + public const STRING_BINARY = 1; + public const STRING_UTF8 = 2; + public const ARRAY_ASSOC = 1; + public const ARRAY_INDEXED = 2; + public $type = self::TYPE_REF; + public $class = ''; + public $value; + public $cut = 0; + public $handle = 0; + public $refCount = 0; + public $position = 0; + public $attr = []; + private static $defaultProperties = []; + /** + * @internal + */ + public function __sleep() : array + { + $properties = []; + if (!isset(self::$defaultProperties[$c = static::class])) { + self::$defaultProperties[$c] = \get_class_vars($c); + foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) { + unset(self::$defaultProperties[$c][$k]); + } + } + foreach (self::$defaultProperties[$c] as $k => $v) { + if ($this->{$k} !== $v) { + $properties[] = $k; + } + } + return $properties; + } +} diff --git a/build/vendor/symfony/var-dumper/Cloner/VarCloner.php b/build/vendor/symfony/var-dumper/Cloner/VarCloner.php new file mode 100644 index 0000000..4069ea4 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Cloner/VarCloner.php @@ -0,0 +1,288 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Cloner; + +/** + * @author Nicolas Grekas + */ +class VarCloner extends \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\AbstractCloner +{ + private static $gid; + private static $arrayCache = []; + /** + * {@inheritdoc} + */ + protected function doClone($var) + { + $len = 1; + // Length of $queue + $pos = 0; + // Number of cloned items past the minimum depth + $refsCounter = 0; + // Hard references counter + $queue = [[$var]]; + // This breadth-first queue is the return value + $hardRefs = []; + // Map of original zval ids to stub objects + $objRefs = []; + // Map of original object handles to their stub object counterpart + $objects = []; + // Keep a ref to objects to ensure their handle cannot be reused while cloning + $resRefs = []; + // Map of original resource handles to their stub object counterpart + $values = []; + // Map of stub objects' ids to original values + $maxItems = $this->maxItems; + $maxString = $this->maxString; + $minDepth = $this->minDepth; + $currentDepth = 0; + // Current tree depth + $currentDepthFinalIndex = 0; + // Final $queue index for current tree depth + $minimumDepthReached = 0 === $minDepth; + // Becomes true when minimum tree depth has been reached + $cookie = (object) []; + // Unique object used to detect hard references + $a = null; + // Array cast for nested structures + $stub = null; + // Stub capturing the main properties of an original item value + // or null if the original value is used directly + if (!($gid = self::$gid)) { + $gid = self::$gid = \md5(\random_bytes(6)); + // Unique string used to detect the special $GLOBALS variable + } + $arrayStub = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub(); + $arrayStub->type = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_ARRAY; + $fromObjCast = \false; + for ($i = 0; $i < $len; ++$i) { + // Detect when we move on to the next tree depth + if ($i > $currentDepthFinalIndex) { + ++$currentDepth; + $currentDepthFinalIndex = $len - 1; + if ($currentDepth >= $minDepth) { + $minimumDepthReached = \true; + } + } + $refs = $vals = $queue[$i]; + foreach ($vals as $k => $v) { + // $v is the original value or a stub object in case of hard references + if (\PHP_VERSION_ID >= 70400) { + $zvalIsRef = null !== \ReflectionReference::fromArrayElement($vals, $k); + } else { + $refs[$k] = $cookie; + $zvalIsRef = $vals[$k] === $cookie; + } + if ($zvalIsRef) { + $vals[$k] =& $stub; + // Break hard references to make $queue completely + unset($stub); + // independent from the original structure + if ($v instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub && isset($hardRefs[\spl_object_id($v)])) { + $vals[$k] = $refs[$k] = $v; + if ($v->value instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub && (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT === $v->value->type || \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_RESOURCE === $v->value->type)) { + ++$v->value->refCount; + } + ++$v->refCount; + continue; + } + $refs[$k] = $vals[$k] = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub(); + $refs[$k]->value = $v; + $h = \spl_object_id($refs[$k]); + $hardRefs[$h] =& $refs[$k]; + $values[$h] = $v; + $vals[$k]->handle = ++$refsCounter; + } + // Create $stub when the original value $v can not be used directly + // If $v is a nested structure, put that structure in array $a + switch (\true) { + case null === $v: + case \is_bool($v): + case \is_int($v): + case \is_float($v): + continue 2; + case \is_string($v): + if ('' === $v) { + continue 2; + } + if (!\preg_match('//u', $v)) { + $stub = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub(); + $stub->type = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_STRING; + $stub->class = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::STRING_BINARY; + if (0 <= $maxString && 0 < ($cut = \strlen($v) - $maxString)) { + $stub->cut = $cut; + $stub->value = \substr($v, 0, -$cut); + } else { + $stub->value = $v; + } + } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < ($cut = \mb_strlen($v, 'UTF-8') - $maxString)) { + $stub = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub(); + $stub->type = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_STRING; + $stub->class = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::STRING_UTF8; + $stub->cut = $cut; + $stub->value = \mb_substr($v, 0, $maxString, 'UTF-8'); + } else { + continue 2; + } + $a = null; + break; + case \is_array($v): + if (!$v) { + continue 2; + } + $stub = $arrayStub; + $stub->class = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::ARRAY_INDEXED; + $j = -1; + foreach ($v as $gk => $gv) { + if ($gk !== ++$j) { + $stub->class = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::ARRAY_ASSOC; + break; + } + } + $a = $v; + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::ARRAY_ASSOC === $stub->class) { + // Copies of $GLOBALS have very strange behavior, + // let's detect them with some black magic + if (\PHP_VERSION_ID < 80100 && ($a[$gid] = \true) && isset($v[$gid])) { + unset($v[$gid]); + $a = []; + foreach ($v as $gk => &$gv) { + if ($v === $gv) { + unset($v); + $v = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub(); + $v->value = [$v->cut = \count($gv), \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_ARRAY => 0]; + $v->handle = -1; + $gv =& $hardRefs[\spl_object_id($v)]; + $gv = $v; + } + $a[$gk] =& $gv; + } + unset($gv); + } else { + $a = $v; + } + } + break; + case \is_object($v): + case $v instanceof \__PHP_Incomplete_Class: + if (empty($objRefs[$h = \spl_object_id($v)])) { + $stub = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub(); + $stub->type = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT; + $stub->class = \get_class($v); + $stub->value = $v; + $stub->handle = $h; + $a = $this->castObject($stub, 0 < $i); + if ($v !== $stub->value) { + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { + break; + } + $stub->handle = $h = \spl_object_id($stub->value); + } + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { + $stub->cut = \count($a); + $a = null; + } + } + if (empty($objRefs[$h])) { + $objRefs[$h] = $stub; + $objects[] = $v; + } else { + $stub = $objRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; + default: + // resource + if (empty($resRefs[$h = (int) $v])) { + $stub = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub(); + $stub->type = \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::TYPE_RESOURCE; + if ('Unknown' === ($stub->class = @\get_resource_type($v))) { + $stub->class = 'Closed'; + } + $stub->value = $v; + $stub->handle = $h; + $a = $this->castResource($stub, 0 < $i); + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { + $stub->cut = \count($a); + $a = null; + } + } + if (empty($resRefs[$h])) { + $resRefs[$h] = $stub; + } else { + $stub = $resRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; + } + if ($a) { + if (!$minimumDepthReached || 0 > $maxItems) { + $queue[$len] = $a; + $stub->position = $len++; + } elseif ($pos < $maxItems) { + if ($maxItems < ($pos += \count($a))) { + $a = \array_slice($a, 0, $maxItems - $pos, \true); + if ($stub->cut >= 0) { + $stub->cut += $pos - $maxItems; + } + } + $queue[$len] = $a; + $stub->position = $len++; + } elseif ($stub->cut >= 0) { + $stub->cut += \count($a); + $stub->position = 0; + } + } + if ($arrayStub === $stub) { + if ($arrayStub->cut) { + $stub = [$arrayStub->cut, $arrayStub->class => $arrayStub->position]; + $arrayStub->cut = 0; + } elseif (isset(self::$arrayCache[$arrayStub->class][$arrayStub->position])) { + $stub = self::$arrayCache[$arrayStub->class][$arrayStub->position]; + } else { + self::$arrayCache[$arrayStub->class][$arrayStub->position] = $stub = [$arrayStub->class => $arrayStub->position]; + } + } + if ($zvalIsRef) { + $refs[$k]->value = $stub; + } else { + $vals[$k] = $stub; + } + } + if ($fromObjCast) { + $fromObjCast = \false; + $refs = $vals; + $vals = []; + $j = -1; + foreach ($queue[$i] as $k => $v) { + foreach ([$k => \true] as $gk => $gv) { + } + if ($gk !== $k) { + $vals = (object) $vals; + $vals->{$k} = $refs[++$j]; + $vals = (array) $vals; + } else { + $vals[$k] = $refs[++$j]; + } + } + } + $queue[$i] = $vals; + } + foreach ($values as $h => $v) { + $hardRefs[$h] = $v; + } + return $queue; + } +} diff --git a/build/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php b/build/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php new file mode 100644 index 0000000..c747e91 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor; + +use RayGlobalScoped\Symfony\Component\Console\Formatter\OutputFormatterStyle; +use RayGlobalScoped\Symfony\Component\Console\Input\ArrayInput; +use RayGlobalScoped\Symfony\Component\Console\Output\OutputInterface; +use RayGlobalScoped\Symfony\Component\Console\Style\SymfonyStyle; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper; +/** + * Describe collected data clones for cli output. + * + * @author Maxime Steinhausser + * + * @final + */ +class CliDescriptor implements \RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface +{ + private $dumper; + private $lastIdentifier; + private $supportsHref; + public function __construct(\RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper $dumper) + { + $this->dumper = $dumper; + $this->supportsHref = \method_exists(\RayGlobalScoped\Symfony\Component\Console\Formatter\OutputFormatterStyle::class, 'setHref'); + } + public function describe(\RayGlobalScoped\Symfony\Component\Console\Output\OutputInterface $output, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data, array $context, int $clientId) : void + { + $io = $output instanceof \RayGlobalScoped\Symfony\Component\Console\Style\SymfonyStyle ? $output : new \RayGlobalScoped\Symfony\Component\Console\Style\SymfonyStyle(new \RayGlobalScoped\Symfony\Component\Console\Input\ArrayInput([]), $output); + $this->dumper->setColors($output->isDecorated()); + $rows = [['date', \date('r', $context['timestamp'])]]; + $lastIdentifier = $this->lastIdentifier; + $this->lastIdentifier = $clientId; + $section = "Received from client #{$clientId}"; + if (isset($context['request'])) { + $request = $context['request']; + $this->lastIdentifier = $request['identifier']; + $section = \sprintf('%s %s', $request['method'], $request['uri']); + if ($controller = $request['controller']) { + $rows[] = ['controller', \rtrim($this->dumper->dump($controller, \true), "\n")]; + } + } elseif (isset($context['cli'])) { + $this->lastIdentifier = $context['cli']['identifier']; + $section = '$ ' . $context['cli']['command_line']; + } + if ($this->lastIdentifier !== $lastIdentifier) { + $io->section($section); + } + if (isset($context['source'])) { + $source = $context['source']; + $sourceInfo = \sprintf('%s on line %d', $source['name'], $source['line']); + $fileLink = $source['file_link'] ?? null; + if ($this->supportsHref && $fileLink) { + $sourceInfo = \sprintf('%s', $fileLink, $sourceInfo); + } + $rows[] = ['source', $sourceInfo]; + $file = $source['file_relative'] ?? $source['file']; + $rows[] = ['file', $file]; + } + $io->table([], $rows); + if (!$this->supportsHref && isset($fileLink)) { + $io->writeln(['Open source in your IDE/browser:', $fileLink]); + $io->newLine(); + } + $this->dumper->dump($data); + $io->newLine(); + } +} diff --git a/build/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php b/build/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php new file mode 100644 index 0000000..37bdafa --- /dev/null +++ b/build/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor; + +use RayGlobalScoped\Symfony\Component\Console\Output\OutputInterface; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +/** + * @author Maxime Steinhausser + */ +interface DumpDescriptorInterface +{ + public function describe(\RayGlobalScoped\Symfony\Component\Console\Output\OutputInterface $output, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data, array $context, int $clientId) : void; +} diff --git a/build/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php b/build/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php new file mode 100644 index 0000000..ae0e98e --- /dev/null +++ b/build/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor; + +use RayGlobalScoped\Symfony\Component\Console\Output\OutputInterface; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper; +/** + * Describe collected data clones for html output. + * + * @author Maxime Steinhausser + * + * @final + */ +class HtmlDescriptor implements \RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface +{ + private $dumper; + private $initialized = \false; + public function __construct(\RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper $dumper) + { + $this->dumper = $dumper; + } + public function describe(\RayGlobalScoped\Symfony\Component\Console\Output\OutputInterface $output, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data, array $context, int $clientId) : void + { + if (!$this->initialized) { + $styles = \file_get_contents(__DIR__ . '/../../Resources/css/htmlDescriptor.css'); + $scripts = \file_get_contents(__DIR__ . '/../../Resources/js/htmlDescriptor.js'); + $output->writeln(""); + $this->initialized = \true; + } + $title = '-'; + if (isset($context['request'])) { + $request = $context['request']; + $controller = "{$this->dumper->dump($request['controller'], \true, ['maxDepth' => 0])}"; + $title = \sprintf('%s %s', $request['method'], $uri = $request['uri'], $uri); + $dedupIdentifier = $request['identifier']; + } elseif (isset($context['cli'])) { + $title = '$ ' . $context['cli']['command_line']; + $dedupIdentifier = $context['cli']['identifier']; + } else { + $dedupIdentifier = \uniqid('', \true); + } + $sourceDescription = ''; + if (isset($context['source'])) { + $source = $context['source']; + $projectDir = $source['project_dir'] ?? null; + $sourceDescription = \sprintf('%s on line %d', $source['name'], $source['line']); + if (isset($source['file_link'])) { + $sourceDescription = \sprintf('%s', $source['file_link'], $sourceDescription); + } + } + $isoDate = $this->extractDate($context, 'c'); + $tags = \array_filter(['controller' => $controller ?? null, 'project dir' => $projectDir ?? null]); + $output->writeln(<< +
+
+

{$title}

+ +
+ {$this->renderTags($tags)} +
+
+

+ {$sourceDescription} +

+ {$this->dumper->dump($data, \true)} +
+ +HTML +); + } + private function extractDate(array $context, string $format = 'r') : string + { + return \date($format, $context['timestamp']); + } + private function renderTags(array $tags) : string + { + if (!$tags) { + return ''; + } + $renderedTags = ''; + foreach ($tags as $key => $value) { + $renderedTags .= \sprintf('
  • %s%s
  • ', $key, $value); + } + return << +
      + {$renderedTags} +
    + +HTML; + } +} diff --git a/build/vendor/symfony/var-dumper/Command/ServerDumpCommand.php b/build/vendor/symfony/var-dumper/Command/ServerDumpCommand.php new file mode 100644 index 0000000..1f02fb5 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Command/ServerDumpCommand.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Command; + +use RayGlobalScoped\Symfony\Component\Console\Command\Command; +use RayGlobalScoped\Symfony\Component\Console\Exception\InvalidArgumentException; +use RayGlobalScoped\Symfony\Component\Console\Input\InputInterface; +use RayGlobalScoped\Symfony\Component\Console\Input\InputOption; +use RayGlobalScoped\Symfony\Component\Console\Output\OutputInterface; +use RayGlobalScoped\Symfony\Component\Console\Style\SymfonyStyle; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +use RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor; +use RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface; +use RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper; +use RayGlobalScoped\Symfony\Component\VarDumper\Server\DumpServer; +/** + * Starts a dump server to collect and output dumps on a single place with multiple formats support. + * + * @author Maxime Steinhausser + * + * @final + */ +class ServerDumpCommand extends \RayGlobalScoped\Symfony\Component\Console\Command\Command +{ + protected static $defaultName = 'server:dump'; + private $server; + /** @var DumpDescriptorInterface[] */ + private $descriptors; + public function __construct(\RayGlobalScoped\Symfony\Component\VarDumper\Server\DumpServer $server, array $descriptors = []) + { + $this->server = $server; + $this->descriptors = $descriptors + ['cli' => new \RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor(new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper()), 'html' => new \RayGlobalScoped\Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor(new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper())]; + parent::__construct(); + } + protected function configure() + { + $availableFormats = \implode(', ', \array_keys($this->descriptors)); + $this->addOption('format', null, \RayGlobalScoped\Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED, \sprintf('The output format (%s)', $availableFormats), 'cli')->setDescription('Start a dump server that collects and displays dumps in a single place')->setHelp(<<<'EOF' +%command.name% starts a dump server that collects and displays +dumps in a single place for debugging you application: + + php %command.full_name% + +You can consult dumped data in HTML format in your browser by providing the --format=html option +and redirecting the output to a file: + + php %command.full_name% --format="html" > dump.html + +EOF +); + } + protected function execute(\RayGlobalScoped\Symfony\Component\Console\Input\InputInterface $input, \RayGlobalScoped\Symfony\Component\Console\Output\OutputInterface $output) : int + { + $io = new \RayGlobalScoped\Symfony\Component\Console\Style\SymfonyStyle($input, $output); + $format = $input->getOption('format'); + if (!($descriptor = $this->descriptors[$format] ?? null)) { + throw new \RayGlobalScoped\Symfony\Component\Console\Exception\InvalidArgumentException(\sprintf('Unsupported format "%s".', $format)); + } + $errorIo = $io->getErrorStyle(); + $errorIo->title('Symfony Var Dumper Server'); + $this->server->start(); + $errorIo->success(\sprintf('Server listening on %s', $this->server->getHost())); + $errorIo->comment('Quit the server with CONTROL-C.'); + $this->server->listen(function (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data, array $context, int $clientId) use($descriptor, $io) { + $descriptor->describe($io, $data, $context, $clientId); + }); + } +} diff --git a/build/vendor/symfony/var-dumper/Dumper/AbstractDumper.php b/build/vendor/symfony/var-dumper/Dumper/AbstractDumper.php new file mode 100644 index 0000000..4379da4 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/AbstractDumper.php @@ -0,0 +1,178 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\DumperInterface; +/** + * Abstract mechanism for dumping a Data object. + * + * @author Nicolas Grekas + */ +abstract class AbstractDumper implements \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\DataDumperInterface, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\DumperInterface +{ + public const DUMP_LIGHT_ARRAY = 1; + public const DUMP_STRING_LENGTH = 2; + public const DUMP_COMMA_SEPARATOR = 4; + public const DUMP_TRAILING_COMMA = 8; + public static $defaultOutput = 'php://output'; + protected $line = ''; + protected $lineDumper; + protected $outputStream; + protected $decimalPoint; + // This is locale dependent + protected $indentPad = ' '; + protected $flags; + private $charset = ''; + /** + * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput + * @param string|null $charset The default character encoding to use for non-UTF8 strings + * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation + */ + public function __construct($output = null, string $charset = null, int $flags = 0) + { + $this->flags = $flags; + $this->setCharset((($charset ?: \ini_get('php.output_encoding')) ?: \ini_get('default_charset')) ?: 'UTF-8'); + $this->decimalPoint = \localeconv(); + $this->decimalPoint = $this->decimalPoint['decimal_point']; + $this->setOutput($output ?: static::$defaultOutput); + if (!$output && \is_string(static::$defaultOutput)) { + static::$defaultOutput = $this->outputStream; + } + } + /** + * Sets the output destination of the dumps. + * + * @param callable|resource|string $output A line dumper callable, an opened stream or an output path + * + * @return callable|resource|string The previous output destination + */ + public function setOutput($output) + { + $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; + if (\is_callable($output)) { + $this->outputStream = null; + $this->lineDumper = $output; + } else { + if (\is_string($output)) { + $output = \fopen($output, 'w'); + } + $this->outputStream = $output; + $this->lineDumper = [$this, 'echoLine']; + } + return $prev; + } + /** + * Sets the default character encoding to use for non-UTF8 strings. + * + * @return string The previous charset + */ + public function setCharset(string $charset) + { + $prev = $this->charset; + $charset = \strtoupper($charset); + $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; + $this->charset = $charset; + return $prev; + } + /** + * Sets the indentation pad string. + * + * @param string $pad A string that will be prepended to dumped lines, repeated by nesting level + * + * @return string The previous indent pad + */ + public function setIndentPad(string $pad) + { + $prev = $this->indentPad; + $this->indentPad = $pad; + return $prev; + } + /** + * Dumps a Data object. + * + * @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump + * + * @return string|null The dump as string when $output is true + */ + public function dump(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data, $output = null) + { + $this->decimalPoint = \localeconv(); + $this->decimalPoint = $this->decimalPoint['decimal_point']; + if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? \setlocale(\LC_NUMERIC, 0) : null) { + \setlocale(\LC_NUMERIC, 'C'); + } + if ($returnDump = \true === $output) { + $output = \fopen('php://memory', 'r+'); + } + if ($output) { + $prevOutput = $this->setOutput($output); + } + try { + $data->dump($this); + $this->dumpLine(-1); + if ($returnDump) { + $result = \stream_get_contents($output, -1, 0); + \fclose($output); + return $result; + } + } finally { + if ($output) { + $this->setOutput($prevOutput); + } + if ($locale) { + \setlocale(\LC_NUMERIC, $locale); + } + } + return null; + } + /** + * Dumps the current line. + * + * @param int $depth The recursive depth in the dumped structure for the line being dumped, + * or -1 to signal the end-of-dump to the line dumper callable + */ + protected function dumpLine(int $depth) + { + ($this->lineDumper)($this->line, $depth, $this->indentPad); + $this->line = ''; + } + /** + * Generic line dumper callback. + */ + protected function echoLine(string $line, int $depth, string $indentPad) + { + if (-1 !== $depth) { + \fwrite($this->outputStream, \str_repeat($indentPad, $depth) . $line . "\n"); + } + } + /** + * Converts a non-UTF-8 string to UTF-8. + * + * @return string|null The string converted to UTF-8 + */ + protected function utf8Encode(?string $s) + { + if (null === $s || \preg_match('//u', $s)) { + return $s; + } + if (!\function_exists('iconv')) { + throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); + } + if (\false !== ($c = @\iconv($this->charset, 'UTF-8', $s))) { + return $c; + } + if ('CP1252' !== $this->charset && \false !== ($c = @\iconv('CP1252', 'UTF-8', $s))) { + return $c; + } + return \iconv('CP850', 'UTF-8', $s); + } +} diff --git a/build/vendor/symfony/var-dumper/Dumper/CliDumper.php b/build/vendor/symfony/var-dumper/Dumper/CliDumper.php new file mode 100644 index 0000000..06407de --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/CliDumper.php @@ -0,0 +1,540 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * CliDumper dumps variables for command line output. + * + * @author Nicolas Grekas + */ +class CliDumper extends \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\AbstractDumper +{ + public static $defaultColors; + public static $defaultOutput = 'php://stdout'; + protected $colors; + protected $maxStringWidth = 0; + protected $styles = [ + // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics + 'default' => '0;38;5;208', + 'num' => '1;38;5;38', + 'const' => '1;38;5;208', + 'str' => '1;38;5;113', + 'note' => '38;5;38', + 'ref' => '38;5;247', + 'public' => '', + 'protected' => '', + 'private' => '', + 'meta' => '38;5;170', + 'key' => '38;5;113', + 'index' => '38;5;38', + ]; + protected static $controlCharsRx = '/[\\x00-\\x1F\\x7F]+/'; + protected static $controlCharsMap = ["\t" => '\\t', "\n" => '\\n', "\v" => '\\v', "\f" => '\\f', "\r" => '\\r', "\33" => '\\e']; + protected $collapseNextHash = \false; + protected $expandNextHash = \false; + private $displayOptions = ['fileLinkFormat' => null]; + private $handlesHrefGracefully; + /** + * {@inheritdoc} + */ + public function __construct($output = null, string $charset = null, int $flags = 0) + { + parent::__construct($output, $charset, $flags); + if ('\\' === \DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { + // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI + $this->setStyles(['default' => '31', 'num' => '1;34', 'const' => '1;31', 'str' => '1;32', 'note' => '34', 'ref' => '1;30', 'meta' => '35', 'key' => '32', 'index' => '34']); + } + $this->displayOptions['fileLinkFormat'] = (\ini_get('xdebug.file_link_format') ?: \get_cfg_var('xdebug.file_link_format')) ?: 'file://%f#L%l'; + } + /** + * Enables/disables colored output. + */ + public function setColors(bool $colors) + { + $this->colors = $colors; + } + /** + * Sets the maximum number of characters per line for dumped strings. + */ + public function setMaxStringWidth(int $maxStringWidth) + { + $this->maxStringWidth = $maxStringWidth; + } + /** + * Configures styles. + * + * @param array $styles A map of style names to style definitions + */ + public function setStyles(array $styles) + { + $this->styles = $styles + $this->styles; + } + /** + * Configures display options. + * + * @param array $displayOptions A map of display options to customize the behavior + */ + public function setDisplayOptions(array $displayOptions) + { + $this->displayOptions = $displayOptions + $this->displayOptions; + } + /** + * {@inheritdoc} + */ + public function dumpScalar(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, string $type, $value) + { + $this->dumpKey($cursor); + $style = 'const'; + $attr = $cursor->attr; + switch ($type) { + case 'default': + $style = 'default'; + break; + case 'integer': + $style = 'num'; + break; + case 'double': + $style = 'num'; + switch (\true) { + case \INF === $value: + $value = 'INF'; + break; + case -\INF === $value: + $value = '-INF'; + break; + case \is_nan($value): + $value = 'NAN'; + break; + default: + $value = (string) $value; + if (\false === \strpos($value, $this->decimalPoint)) { + $value .= $this->decimalPoint . '0'; + } + break; + } + break; + case 'NULL': + $value = 'null'; + break; + case 'boolean': + $value = $value ? 'true' : 'false'; + break; + default: + $attr += ['value' => $this->utf8Encode($value)]; + $value = $this->utf8Encode($type); + break; + } + $this->line .= $this->style($style, $value, $attr); + $this->endValue($cursor); + } + /** + * {@inheritdoc} + */ + public function dumpString(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, string $str, bool $bin, int $cut) + { + $this->dumpKey($cursor); + $attr = $cursor->attr; + if ($bin) { + $str = $this->utf8Encode($str); + } + if ('' === $str) { + $this->line .= '""'; + $this->endValue($cursor); + } else { + $attr += ['length' => 0 <= $cut ? \mb_strlen($str, 'UTF-8') + $cut : 0, 'binary' => $bin]; + $str = $bin && \false !== \strpos($str, "\0") ? [$str] : \explode("\n", $str); + if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { + unset($str[1]); + $str[0] .= "\n"; + } + $m = \count($str) - 1; + $i = $lineCut = 0; + if (self::DUMP_STRING_LENGTH & $this->flags) { + $this->line .= '(' . $attr['length'] . ') '; + } + if ($bin) { + $this->line .= 'b'; + } + if ($m) { + $this->line .= '"""'; + $this->dumpLine($cursor->depth); + } else { + $this->line .= '"'; + } + foreach ($str as $str) { + if ($i < $m) { + $str .= "\n"; + } + if (0 < $this->maxStringWidth && $this->maxStringWidth < ($len = \mb_strlen($str, 'UTF-8'))) { + $str = \mb_substr($str, 0, $this->maxStringWidth, 'UTF-8'); + $lineCut = $len - $this->maxStringWidth; + } + if ($m && 0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + if ('' !== $str) { + $this->line .= $this->style('str', $str, $attr); + } + if ($i++ == $m) { + if ($m) { + if ('' !== $str) { + $this->dumpLine($cursor->depth); + if (0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + } + $this->line .= '"""'; + } else { + $this->line .= '"'; + } + if ($cut < 0) { + $this->line .= '…'; + $lineCut = 0; + } elseif ($cut) { + $lineCut += $cut; + } + } + if ($lineCut) { + $this->line .= '…' . $lineCut; + $lineCut = 0; + } + if ($i > $m) { + $this->endValue($cursor); + } else { + $this->dumpLine($cursor->depth); + } + } + } + } + /** + * {@inheritdoc} + */ + public function enterHash(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, int $type, $class, bool $hasChild) + { + if (null === $this->colors) { + $this->colors = $this->supportsColors(); + } + $this->dumpKey($cursor); + $attr = $cursor->attr; + if ($this->collapseNextHash) { + $cursor->skipChildren = \true; + $this->collapseNextHash = $hasChild = \false; + } + $class = $this->utf8Encode($class); + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_OBJECT === $type) { + $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class, $attr) . (empty($attr['cut_hash']) ? ' {' : '') : '{'; + } elseif (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_RESOURCE === $type) { + $prefix = $this->style('note', $class . ' resource', $attr) . ($hasChild ? ' {' : ' '); + } else { + $prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:' . $class) . ' [' : '['; + } + if (($cursor->softRefCount || 0 < $cursor->softRefHandle) && empty($attr['cut_hash'])) { + $prefix .= $this->style('ref', (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_RESOURCE === $type ? '@' : '#') . (0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), ['count' => $cursor->softRefCount]); + } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { + $prefix .= $this->style('ref', '&' . $cursor->hardRefTo, ['count' => $cursor->hardRefCount]); + } elseif (!$hasChild && \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_RESOURCE === $type) { + $prefix = \substr($prefix, 0, -1); + } + $this->line .= $prefix; + if ($hasChild) { + $this->dumpLine($cursor->depth); + } + } + /** + * {@inheritdoc} + */ + public function leaveHash(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, int $type, $class, bool $hasChild, int $cut) + { + if (empty($cursor->attr['cut_hash'])) { + $this->dumpEllipsis($cursor, $hasChild, $cut); + $this->line .= \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_OBJECT === $type ? '}' : (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); + } + $this->endValue($cursor); + } + /** + * Dumps an ellipsis for cut children. + * + * @param bool $hasChild When the dump of the hash has child item + * @param int $cut The number of items the hash has been cut by + */ + protected function dumpEllipsis(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, $hasChild, $cut) + { + if ($cut) { + $this->line .= ' …'; + if (0 < $cut) { + $this->line .= $cut; + } + if ($hasChild) { + $this->dumpLine($cursor->depth + 1); + } + } + } + /** + * Dumps a key in a hash structure. + */ + protected function dumpKey(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor) + { + if (null !== ($key = $cursor->hashKey)) { + if ($cursor->hashKeyIsBinary) { + $key = $this->utf8Encode($key); + } + $attr = ['binary' => $cursor->hashKeyIsBinary]; + $bin = $cursor->hashKeyIsBinary ? 'b' : ''; + $style = 'key'; + switch ($cursor->hashType) { + default: + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_INDEXED: + if (self::DUMP_LIGHT_ARRAY & $this->flags) { + break; + } + $style = 'index'; + // no break + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_ASSOC: + if (\is_int($key)) { + $this->line .= $this->style($style, $key) . ' => '; + } else { + $this->line .= $bin . '"' . $this->style($style, $key) . '" => '; + } + break; + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_RESOURCE: + $key = "\0~\0" . $key; + // no break + case \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_OBJECT: + if (!isset($key[0]) || "\0" !== $key[0]) { + $this->line .= '+' . $bin . $this->style('public', $key) . ': '; + } elseif (0 < \strpos($key, "\0", 1)) { + $key = \explode("\0", \substr($key, 1), 2); + switch ($key[0][0]) { + case '+': + // User inserted keys + $attr['dynamic'] = \true; + $this->line .= '+' . $bin . '"' . $this->style('public', $key[1], $attr) . '": '; + break 2; + case '~': + $style = 'meta'; + if (isset($key[0][1])) { + \parse_str(\substr($key[0], 1), $attr); + $attr += ['binary' => $cursor->hashKeyIsBinary]; + } + break; + case '*': + $style = 'protected'; + $bin = '#' . $bin; + break; + default: + $attr['class'] = $key[0]; + $style = 'private'; + $bin = '-' . $bin; + break; + } + if (isset($attr['collapse'])) { + if ($attr['collapse']) { + $this->collapseNextHash = \true; + } else { + $this->expandNextHash = \true; + } + } + $this->line .= $bin . $this->style($style, $key[1], $attr) . ($attr['separator'] ?? ': '); + } else { + // This case should not happen + $this->line .= '-' . $bin . '"' . $this->style('private', $key, ['class' => '']) . '": '; + } + break; + } + if ($cursor->hardRefTo) { + $this->line .= $this->style('ref', '&' . ($cursor->hardRefCount ? $cursor->hardRefTo : ''), ['count' => $cursor->hardRefCount]) . ' '; + } + } + } + /** + * Decorates a value with some style. + * + * @param string $style The type of style being applied + * @param string $value The value being styled + * @param array $attr Optional context information + * + * @return string The value with style decoration + */ + protected function style($style, $value, $attr = []) + { + if (null === $this->colors) { + $this->colors = $this->supportsColors(); + } + if (null === $this->handlesHrefGracefully) { + $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== \getenv('TERMINAL_EMULATOR') && (!\getenv('KONSOLE_VERSION') || (int) \getenv('KONSOLE_VERSION') > 201100); + } + if (isset($attr['ellipsis'], $attr['ellipsis-type'])) { + $prefix = \substr($value, 0, -$attr['ellipsis']); + if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && 0 === \strpos($prefix, $_SERVER[$pwd])) { + $prefix = '.' . \substr($prefix, \strlen($_SERVER[$pwd])); + } + if (!empty($attr['ellipsis-tail'])) { + $prefix .= \substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']); + $value = \substr($value, -$attr['ellipsis'] + $attr['ellipsis-tail']); + } else { + $value = \substr($value, -$attr['ellipsis']); + } + $value = $this->style('default', $prefix) . $this->style($style, $value); + goto href; + } + $map = static::$controlCharsMap; + $startCchr = $this->colors ? "\33[m\33[{$this->styles['default']}m" : ''; + $endCchr = $this->colors ? "\33[m\33[{$this->styles[$style]}m" : ''; + $value = \preg_replace_callback(static::$controlCharsRx, function ($c) use($map, $startCchr, $endCchr) { + $s = $startCchr; + $c = $c[$i = 0]; + do { + $s .= $map[$c[$i]] ?? \sprintf('\\x%02X', \ord($c[$i])); + } while (isset($c[++$i])); + return $s . $endCchr; + }, $value, -1, $cchrCount); + if ($this->colors) { + if ($cchrCount && "\33" === $value[0]) { + $value = \substr($value, \strlen($startCchr)); + } else { + $value = "\33[{$this->styles[$style]}m" . $value; + } + if ($cchrCount && $endCchr === \substr($value, -\strlen($endCchr))) { + $value = \substr($value, 0, -\strlen($endCchr)); + } else { + $value .= "\33[{$this->styles['default']}m"; + } + } + href: + if ($this->colors && $this->handlesHrefGracefully) { + if (isset($attr['file']) && ($href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0))) { + if ('note' === $style) { + $value .= "\33]8;;{$href}\33\\^\33]8;;\33\\"; + } else { + $attr['href'] = $href; + } + } + if (isset($attr['href'])) { + $value = "\33]8;;{$attr['href']}\33\\{$value}\33]8;;\33\\"; + } + } elseif ($attr['if_links'] ?? \false) { + return ''; + } + return $value; + } + /** + * @return bool Tells if the current output stream supports ANSI colors or not + */ + protected function supportsColors() + { + if ($this->outputStream !== static::$defaultOutput) { + return $this->hasColorSupport($this->outputStream); + } + if (null !== static::$defaultColors) { + return static::$defaultColors; + } + if (isset($_SERVER['argv'][1])) { + $colors = $_SERVER['argv']; + $i = \count($colors); + while (--$i > 0) { + if (isset($colors[$i][5])) { + switch ($colors[$i]) { + case '--ansi': + case '--color': + case '--color=yes': + case '--color=force': + case '--color=always': + case '--colors=always': + return static::$defaultColors = \true; + case '--no-ansi': + case '--color=no': + case '--color=none': + case '--color=never': + case '--colors=never': + return static::$defaultColors = \false; + } + } + } + } + $h = \stream_get_meta_data($this->outputStream) + ['wrapper_type' => null]; + $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? \fopen('php://stdout', 'w') : $this->outputStream; + return static::$defaultColors = $this->hasColorSupport($h); + } + /** + * {@inheritdoc} + */ + protected function dumpLine(int $depth, bool $endOfValue = \false) + { + if ($this->colors) { + $this->line = \sprintf("\33[%sm%s\33[m", $this->styles['default'], $this->line); + } + parent::dumpLine($depth); + } + protected function endValue(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor) + { + if (-1 === $cursor->hashType) { + return; + } + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::ARRAY_INDEXED === $cursor->hashType || \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::ARRAY_ASSOC === $cursor->hashType) { + if (self::DUMP_TRAILING_COMMA & $this->flags && 0 < $cursor->depth) { + $this->line .= ','; + } elseif (self::DUMP_COMMA_SEPARATOR & $this->flags && 1 < $cursor->hashLength - $cursor->hashIndex) { + $this->line .= ','; + } + } + $this->dumpLine($cursor->depth, \true); + } + /** + * Returns true if the stream supports colorization. + * + * Reference: Composer\XdebugHandler\Process::supportsColor + * https://github.com/composer/xdebug-handler + * + * @param mixed $stream A CLI output stream + */ + private function hasColorSupport($stream) : bool + { + if (!\is_resource($stream) || 'stream' !== \get_resource_type($stream)) { + return \false; + } + // 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($stream) || \false !== \getenv('ANSICON') || 'ON' === \getenv('ConEmuANSI') || 'xterm' === \getenv('TERM'); + } + return \stream_isatty($stream); + } + /** + * Returns true if the Windows terminal supports true color. + * + * Note that this does not check an output stream, but relies on environment + * variables from known implementations, or a PHP and Windows version that + * supports true color. + */ + private function isWindowsTrueColor() : bool + { + $result = 183 <= \getenv('ANSICON_VER') || 'ON' === \getenv('ConEmuANSI') || 'xterm' === \getenv('TERM') || 'Hyper' === \getenv('TERM_PROGRAM'); + if (!$result) { + $version = \sprintf('%s.%s.%s', \PHP_WINDOWS_VERSION_MAJOR, \PHP_WINDOWS_VERSION_MINOR, \PHP_WINDOWS_VERSION_BUILD); + $result = $version >= '10.0.15063'; + } + return $result; + } + private function getSourceLink(string $file, int $line) + { + if ($fmt = $this->displayOptions['fileLinkFormat']) { + return \is_string($fmt) ? \strtr($fmt, ['%f' => $file, '%l' => $line]) : ($fmt->format($file, $line) ?: 'file://' . $file . '#L' . $line); + } + return \false; + } +} diff --git a/build/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php b/build/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php new file mode 100644 index 0000000..8b318fe --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider; + +/** + * Tries to provide context on CLI. + * + * @author Maxime Steinhausser + */ +final class CliContextProvider implements \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface +{ + public function getContext() : ?array + { + if ('cli' !== \PHP_SAPI) { + return null; + } + return ['command_line' => $commandLine = \implode(' ', $_SERVER['argv'] ?? []), 'identifier' => \hash('crc32b', $commandLine . $_SERVER['REQUEST_TIME_FLOAT'])]; + } +} diff --git a/build/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php b/build/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php new file mode 100644 index 0000000..115a6fa --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider; + +/** + * Interface to provide contextual data about dump data clones sent to a server. + * + * @author Maxime Steinhausser + */ +interface ContextProviderInterface +{ + /** + * @return array|null Context data or null if unable to provide any context + */ + public function getContext() : ?array; +} diff --git a/build/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php b/build/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php new file mode 100644 index 0000000..51877fd --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider; + +use RayGlobalScoped\Symfony\Component\HttpFoundation\RequestStack; +use RayGlobalScoped\Symfony\Component\VarDumper\Caster\ReflectionCaster; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\VarCloner; +/** + * Tries to provide context from a request. + * + * @author Maxime Steinhausser + */ +final class RequestContextProvider implements \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface +{ + private $requestStack; + private $cloner; + public function __construct(\RayGlobalScoped\Symfony\Component\HttpFoundation\RequestStack $requestStack) + { + $this->requestStack = $requestStack; + $this->cloner = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\VarCloner(); + $this->cloner->setMaxItems(0); + $this->cloner->addCasters(\RayGlobalScoped\Symfony\Component\VarDumper\Caster\ReflectionCaster::UNSET_CLOSURE_FILE_INFO); + } + public function getContext() : ?array + { + if (null === ($request = $this->requestStack->getCurrentRequest())) { + return null; + } + $controller = $request->attributes->get('_controller'); + return ['uri' => $request->getUri(), 'method' => $request->getMethod(), 'controller' => $controller ? $this->cloner->cloneVar($controller) : $controller, 'identifier' => \spl_object_hash($request)]; + } +} diff --git a/build/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php b/build/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php new file mode 100644 index 0000000..7551103 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider; + +use RayGlobalScoped\Symfony\Component\HttpKernel\Debug\FileLinkFormatter; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\VarCloner; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper; +use RayGlobalScoped\Symfony\Component\VarDumper\VarDumper; +use RayGlobalScoped\Twig\Template; +/** + * Tries to provide context from sources (class name, file, line, code excerpt, ...). + * + * @author Nicolas Grekas + * @author Maxime Steinhausser + */ +final class SourceContextProvider implements \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface +{ + private $limit; + private $charset; + private $projectDir; + private $fileLinkFormatter; + public function __construct(string $charset = null, string $projectDir = null, \RayGlobalScoped\Symfony\Component\HttpKernel\Debug\FileLinkFormatter $fileLinkFormatter = null, int $limit = 9) + { + $this->charset = $charset; + $this->projectDir = $projectDir; + $this->fileLinkFormatter = $fileLinkFormatter; + $this->limit = $limit; + } + public function getContext() : ?array + { + $trace = \debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, $this->limit); + $file = $trace[1]['file']; + $line = $trace[1]['line']; + $name = \false; + $fileExcerpt = \false; + for ($i = 2; $i < $this->limit; ++$i) { + if (isset($trace[$i]['class'], $trace[$i]['function']) && 'dump' === $trace[$i]['function'] && \RayGlobalScoped\Symfony\Component\VarDumper\VarDumper::class === $trace[$i]['class']) { + $file = $trace[$i]['file'] ?? $file; + $line = $trace[$i]['line'] ?? $line; + while (++$i < $this->limit) { + if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && 0 !== \strpos($trace[$i]['function'], 'call_user_func')) { + $file = $trace[$i]['file']; + $line = $trace[$i]['line']; + break; + } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof \RayGlobalScoped\Twig\Template) { + $template = $trace[$i]['object']; + $name = $template->getTemplateName(); + $src = \method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (\method_exists($template, 'getSource') ? $template->getSource() : \false); + $info = $template->getDebugInfo(); + if (isset($info[$trace[$i - 1]['line']])) { + $line = $info[$trace[$i - 1]['line']]; + $file = \method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getPath() : null; + if ($src) { + $src = \explode("\n", $src); + $fileExcerpt = []; + for ($i = \max($line - 3, 1), $max = \min($line + 3, \count($src)); $i <= $max; ++$i) { + $fileExcerpt[] = '' . $this->htmlEncode($src[$i - 1]) . ''; + } + $fileExcerpt = '
      ' . \implode("\n", $fileExcerpt) . '
    '; + } + } + break; + } + } + break; + } + } + if (\false === $name) { + $name = \str_replace('\\', '/', $file); + $name = \substr($name, \strrpos($name, '/') + 1); + } + $context = ['name' => $name, 'file' => $file, 'line' => $line]; + $context['file_excerpt'] = $fileExcerpt; + if (null !== $this->projectDir) { + $context['project_dir'] = $this->projectDir; + if (0 === \strpos($file, $this->projectDir)) { + $context['file_relative'] = \ltrim(\substr($file, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); + } + } + if ($this->fileLinkFormatter && ($fileLink = $this->fileLinkFormatter->format($context['file'], $context['line']))) { + $context['file_link'] = $fileLink; + } + return $context; + } + private function htmlEncode(string $s) : string + { + $html = ''; + $dumper = new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper(function ($line) use(&$html) { + $html .= $line; + }, $this->charset); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $cloner = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\VarCloner(); + $dumper->dump($cloner->cloneVar($s)); + return \substr(\strip_tags($html), 1, -1); + } +} diff --git a/build/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php b/build/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php new file mode 100644 index 0000000..641560b --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; +/** + * @author Kévin Thérage + */ +class ContextualizedDumper implements \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\DataDumperInterface +{ + private $wrappedDumper; + private $contextProviders; + /** + * @param ContextProviderInterface[] $contextProviders + */ + public function __construct(\RayGlobalScoped\Symfony\Component\VarDumper\Dumper\DataDumperInterface $wrappedDumper, array $contextProviders) + { + $this->wrappedDumper = $wrappedDumper; + $this->contextProviders = $contextProviders; + } + public function dump(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data) + { + $context = []; + foreach ($this->contextProviders as $contextProvider) { + $context[\get_class($contextProvider)] = $contextProvider->getContext(); + } + $this->wrappedDumper->dump($data->withContext($context)); + } +} diff --git a/build/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php b/build/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php new file mode 100644 index 0000000..b5a8a3c --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +/** + * DataDumperInterface for dumping Data objects. + * + * @author Nicolas Grekas + */ +interface DataDumperInterface +{ + public function dump(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data); +} diff --git a/build/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/build/vendor/symfony/var-dumper/Dumper/HtmlDumper.php new file mode 100644 index 0000000..a3118c2 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/HtmlDumper.php @@ -0,0 +1,905 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +/** + * HtmlDumper dumps variables as HTML. + * + * @author Nicolas Grekas + */ +class HtmlDumper extends \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper +{ + public static $defaultOutput = 'php://output'; + protected static $themes = ['dark' => ['default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', 'num' => 'font-weight:bold; color:#1299DA', 'const' => 'font-weight:bold', 'str' => 'font-weight:bold; color:#56DB3A', 'note' => 'color:#1299DA', 'ref' => 'color:#A0A0A0', 'public' => 'color:#FFFFFF', 'protected' => 'color:#FFFFFF', 'private' => 'color:#FFFFFF', 'meta' => 'color:#B729D9', 'key' => 'color:#56DB3A', 'index' => 'color:#1299DA', 'ellipsis' => 'color:#FF8400', 'ns' => 'user-select:none;'], 'light' => ['default' => 'background:none; color:#CC7832; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', 'num' => 'font-weight:bold; color:#1299DA', 'const' => 'font-weight:bold', 'str' => 'font-weight:bold; color:#629755;', 'note' => 'color:#6897BB', 'ref' => 'color:#6E6E6E', 'public' => 'color:#262626', 'protected' => 'color:#262626', 'private' => 'color:#262626', 'meta' => 'color:#B729D9', 'key' => 'color:#789339', 'index' => 'color:#1299DA', 'ellipsis' => 'color:#CC7832', 'ns' => 'user-select:none;']]; + protected $dumpHeader; + protected $dumpPrefix = '
    ';
    +    protected $dumpSuffix = '
    '; + protected $dumpId = 'sf-dump'; + protected $colors = \true; + protected $headerIsDumped = \false; + protected $lastDepth = -1; + protected $styles; + private $displayOptions = ['maxDepth' => 1, 'maxStringLength' => 160, 'fileLinkFormat' => null]; + private $extraDisplayOptions = []; + /** + * {@inheritdoc} + */ + public function __construct($output = null, string $charset = null, int $flags = 0) + { + \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\AbstractDumper::__construct($output, $charset, $flags); + $this->dumpId = 'sf-dump-' . \mt_rand(); + $this->displayOptions['fileLinkFormat'] = \ini_get('xdebug.file_link_format') ?: \get_cfg_var('xdebug.file_link_format'); + $this->styles = static::$themes['dark'] ?? self::$themes['dark']; + } + /** + * {@inheritdoc} + */ + public function setStyles(array $styles) + { + $this->headerIsDumped = \false; + $this->styles = $styles + $this->styles; + } + public function setTheme(string $themeName) + { + if (!isset(static::$themes[$themeName])) { + throw new \InvalidArgumentException(\sprintf('Theme "%s" does not exist in class "%s".', $themeName, static::class)); + } + $this->setStyles(static::$themes[$themeName]); + } + /** + * Configures display options. + * + * @param array $displayOptions A map of display options to customize the behavior + */ + public function setDisplayOptions(array $displayOptions) + { + $this->headerIsDumped = \false; + $this->displayOptions = $displayOptions + $this->displayOptions; + } + /** + * Sets an HTML header that will be dumped once in the output stream. + * + * @param string $header An HTML string + */ + public function setDumpHeader($header) + { + $this->dumpHeader = $header; + } + /** + * Sets an HTML prefix and suffix that will encapse every single dump. + * + * @param string $prefix The prepended HTML string + * @param string $suffix The appended HTML string + */ + public function setDumpBoundaries($prefix, $suffix) + { + $this->dumpPrefix = $prefix; + $this->dumpSuffix = $suffix; + } + /** + * {@inheritdoc} + */ + public function dump(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data, $output = null, array $extraDisplayOptions = []) + { + $this->extraDisplayOptions = $extraDisplayOptions; + $result = parent::dump($data, $output); + $this->dumpId = 'sf-dump-' . \mt_rand(); + return $result; + } + /** + * Dumps the HTML header. + */ + protected function getDumpHeader() + { + $this->headerIsDumped = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; + if (null !== $this->dumpHeader) { + return $this->dumpHeader; + } + $line = \str_replace('{$options}', \json_encode($this->displayOptions, \JSON_FORCE_OBJECT), <<<'EOHTML' +' . $this->dumpHeader; + } + /** + * {@inheritdoc} + */ + public function dumpString(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, string $str, bool $bin, int $cut) + { + if ('' === $str && isset($cursor->attr['img-data'], $cursor->attr['content-type'])) { + $this->dumpKey($cursor); + $this->line .= $this->style('default', $cursor->attr['img-size'] ?? '', []); + $this->line .= $cursor->depth >= $this->displayOptions['maxDepth'] ? ' ' : ' '; + $this->endValue($cursor); + $this->line .= $this->indentPad; + $this->line .= \sprintf('', $cursor->attr['content-type'], \base64_encode($cursor->attr['img-data'])); + $this->endValue($cursor); + } else { + parent::dumpString($cursor, $str, $bin, $cut); + } + } + /** + * {@inheritdoc} + */ + public function enterHash(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, int $type, $class, bool $hasChild) + { + if (\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor::HASH_OBJECT === $type) { + $cursor->attr['depth'] = $cursor->depth; + } + parent::enterHash($cursor, $type, $class, \false); + if ($cursor->skipChildren || $cursor->depth >= $this->displayOptions['maxDepth']) { + $cursor->skipChildren = \false; + $eol = ' class=sf-dump-compact>'; + } else { + $this->expandNextHash = \false; + $eol = ' class=sf-dump-expanded>'; + } + if ($hasChild) { + $this->line .= 'dumpId, $r); + } + $this->line .= $eol; + $this->dumpLine($cursor->depth); + } + } + /** + * {@inheritdoc} + */ + public function leaveHash(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Cursor $cursor, int $type, $class, bool $hasChild, int $cut) + { + $this->dumpEllipsis($cursor, $hasChild, $cut); + if ($hasChild) { + $this->line .= ''; + } + parent::leaveHash($cursor, $type, $class, $hasChild, 0); + } + /** + * {@inheritdoc} + */ + protected function style($style, $value, $attr = []) + { + if ('' === $value) { + return ''; + } + $v = esc($value); + if ('ref' === $style) { + if (empty($attr['count'])) { + return \sprintf('%s', $v); + } + $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2) . \substr($value, 1); + return \sprintf('%s', $this->dumpId, $r, 1 + $attr['count'], $v); + } + if ('const' === $style && isset($attr['value'])) { + $style .= \sprintf(' title="%s"', esc(\is_scalar($attr['value']) ? $attr['value'] : \json_encode($attr['value']))); + } elseif ('public' === $style) { + $style .= \sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); + } elseif ('str' === $style && 1 < $attr['length']) { + $style .= \sprintf(' title="%d%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); + } elseif ('note' === $style && 0 < ($attr['depth'] ?? 0) && \false !== ($c = \strrpos($value, '\\'))) { + $style .= ' title=""'; + $attr += ['ellipsis' => \strlen($value) - $c, 'ellipsis-type' => 'note', 'ellipsis-tail' => 1]; + } elseif ('protected' === $style) { + $style .= ' title="Protected property"'; + } elseif ('meta' === $style && isset($attr['title'])) { + $style .= \sprintf(' title="%s"', esc($this->utf8Encode($attr['title']))); + } elseif ('private' === $style) { + $style .= \sprintf(' title="Private property defined in class: `%s`"', esc($this->utf8Encode($attr['class']))); + } + $map = static::$controlCharsMap; + if (isset($attr['ellipsis'])) { + $class = 'sf-dump-ellipsis'; + if (isset($attr['ellipsis-type'])) { + $class = \sprintf('"%s sf-dump-ellipsis-%s"', $class, $attr['ellipsis-type']); + } + $label = esc(\substr($value, -$attr['ellipsis'])); + $style = \str_replace(' title="', " title=\"{$v}\n", $style); + $v = \sprintf('%s', $class, \substr($v, 0, -\strlen($label))); + if (!empty($attr['ellipsis-tail'])) { + $tail = \strlen(esc(\substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']))); + $v .= \sprintf('%s%s', $class, \substr($label, 0, $tail), \substr($label, $tail)); + } else { + $v .= $label; + } + } + $v = "" . \preg_replace_callback(static::$controlCharsRx, function ($c) use($map) { + $s = $b = ''; + }, $v) . ''; + if (isset($attr['file']) && ($href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0))) { + $attr['href'] = $href; + } + if (isset($attr['href'])) { + $target = isset($attr['file']) ? '' : ' target="_blank"'; + $v = \sprintf('%s', esc($this->utf8Encode($attr['href'])), $target, $v); + } + if (isset($attr['lang'])) { + $v = \sprintf('%s', esc($attr['lang']), $v); + } + return $v; + } + /** + * {@inheritdoc} + */ + protected function dumpLine(int $depth, bool $endOfValue = \false) + { + if (-1 === $this->lastDepth) { + $this->line = \sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad) . $this->line; + } + if ($this->headerIsDumped !== (null !== $this->outputStream ? $this->outputStream : $this->lineDumper)) { + $this->line = $this->getDumpHeader() . $this->line; + } + if (-1 === $depth) { + $args = ['"' . $this->dumpId . '"']; + if ($this->extraDisplayOptions) { + $args[] = \json_encode($this->extraDisplayOptions, \JSON_FORCE_OBJECT); + } + // Replace is for BC + $this->line .= \sprintf(\str_replace('"%s"', '%s', $this->dumpSuffix), \implode(', ', $args)); + } + $this->lastDepth = $depth; + $this->line = \mb_convert_encoding($this->line, 'HTML-ENTITIES', 'UTF-8'); + if (-1 === $depth) { + \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\AbstractDumper::dumpLine(0); + } + \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\AbstractDumper::dumpLine($depth); + } + private function getSourceLink(string $file, int $line) + { + $options = $this->extraDisplayOptions + $this->displayOptions; + if ($fmt = $options['fileLinkFormat']) { + return \is_string($fmt) ? \strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); + } + return \false; + } +} +function esc($str) +{ + return \htmlspecialchars($str, \ENT_QUOTES, 'UTF-8'); +} diff --git a/build/vendor/symfony/var-dumper/Dumper/ServerDumper.php b/build/vendor/symfony/var-dumper/Dumper/ServerDumper.php new file mode 100644 index 0000000..feee911 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Dumper/ServerDumper.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Dumper; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; +use RayGlobalScoped\Symfony\Component\VarDumper\Server\Connection; +/** + * ServerDumper forwards serialized Data clones to a server. + * + * @author Maxime Steinhausser + */ +class ServerDumper implements \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\DataDumperInterface +{ + private $connection; + private $wrappedDumper; + /** + * @param string $host The server host + * @param DataDumperInterface|null $wrappedDumper A wrapped instance used whenever we failed contacting the server + * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name + */ + public function __construct(string $host, \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\DataDumperInterface $wrappedDumper = null, array $contextProviders = []) + { + $this->connection = new \RayGlobalScoped\Symfony\Component\VarDumper\Server\Connection($host, $contextProviders); + $this->wrappedDumper = $wrappedDumper; + } + public function getContextProviders() : array + { + return $this->connection->getContextProviders(); + } + /** + * {@inheritdoc} + */ + public function dump(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data) + { + if (!$this->connection->write($data) && $this->wrappedDumper) { + $this->wrappedDumper->dump($data); + } + } +} diff --git a/build/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php b/build/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php new file mode 100644 index 0000000..2e0c813 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Exception; + +/** + * @author Nicolas Grekas + */ +class ThrowingCasterException extends \Exception +{ + /** + * @param \Throwable $prev The exception thrown from the caster + */ + public function __construct(\Throwable $prev) + { + parent::__construct('Unexpected ' . \get_class($prev) . ' thrown from a caster: ' . $prev->getMessage(), 0, $prev); + } +} diff --git a/build/vendor/symfony/var-dumper/LICENSE b/build/vendor/symfony/var-dumper/LICENSE new file mode 100644 index 0000000..c1f0aac --- /dev/null +++ b/build/vendor/symfony/var-dumper/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2021 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. diff --git a/build/vendor/symfony/var-dumper/Resources/bin/var-dump-server b/build/vendor/symfony/var-dumper/Resources/bin/var-dump-server new file mode 100644 index 0000000..fbe8bef --- /dev/null +++ b/build/vendor/symfony/var-dumper/Resources/bin/var-dump-server @@ -0,0 +1,45 @@ +#!/usr/bin/env php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +/** + * Starts a dump server to collect and output dumps on a single place with multiple formats support. + * + * @author Maxime Steinhausser + */ +use RayGlobalScoped\Psr\Log\LoggerInterface; +use RayGlobalScoped\Symfony\Component\Console\Application; +use RayGlobalScoped\Symfony\Component\Console\Input\ArgvInput; +use RayGlobalScoped\Symfony\Component\Console\Input\InputOption; +use RayGlobalScoped\Symfony\Component\Console\Logger\ConsoleLogger; +use RayGlobalScoped\Symfony\Component\Console\Output\ConsoleOutput; +use RayGlobalScoped\Symfony\Component\VarDumper\Command\ServerDumpCommand; +use RayGlobalScoped\Symfony\Component\VarDumper\Server\DumpServer; +function includeIfExists(string $file) : bool +{ + return \file_exists($file) && (include $file); +} +if (!\RayGlobalScoped\includeIfExists(__DIR__ . '/../../../../autoload.php') && !\RayGlobalScoped\includeIfExists(__DIR__ . '/../../vendor/autoload.php') && !\RayGlobalScoped\includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php')) { + \fwrite(\STDERR, 'Install dependencies using Composer.' . \PHP_EOL); + exit(1); +} +if (!\class_exists(\RayGlobalScoped\Symfony\Component\Console\Application::class)) { + \fwrite(\STDERR, 'You need the "symfony/console" component in order to run the VarDumper server.' . \PHP_EOL); + exit(1); +} +$input = new \RayGlobalScoped\Symfony\Component\Console\Input\ArgvInput(); +$output = new \RayGlobalScoped\Symfony\Component\Console\Output\ConsoleOutput(); +$defaultHost = '127.0.0.1:9912'; +$host = $input->getParameterOption(['--host'], $_SERVER['VAR_DUMPER_SERVER'] ?? $defaultHost, \true); +$logger = \interface_exists(\RayGlobalScoped\Psr\Log\LoggerInterface::class) ? new \RayGlobalScoped\Symfony\Component\Console\Logger\ConsoleLogger($output->getErrorOutput()) : null; +$app = new \RayGlobalScoped\Symfony\Component\Console\Application(); +$app->getDefinition()->addOption(new \RayGlobalScoped\Symfony\Component\Console\Input\InputOption('--host', null, \RayGlobalScoped\Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED, 'The address the server should listen to', $defaultHost)); +$app->add($command = new \RayGlobalScoped\Symfony\Component\VarDumper\Command\ServerDumpCommand(new \RayGlobalScoped\Symfony\Component\VarDumper\Server\DumpServer($host, $logger)))->getApplication()->setDefaultCommand($command->getName(), \true)->run($input, $output); diff --git a/build/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css b/build/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css new file mode 100644 index 0000000..8f706d6 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css @@ -0,0 +1,130 @@ +body { + display: flex; + flex-direction: column-reverse; + justify-content: flex-end; + max-width: 1140px; + margin: auto; + padding: 15px; + word-wrap: break-word; + background-color: #F9F9F9; + color: #222; + font-family: Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.4; +} +p { + margin: 0; +} +a { + color: #218BC3; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +.text-small { + font-size: 12px !important; +} +article { + margin: 5px; + margin-bottom: 10px; +} +article > header > .row { + display: flex; + flex-direction: row; + align-items: baseline; + margin-bottom: 10px; +} +article > header > .row > .col { + flex: 1; + display: flex; + align-items: baseline; +} +article > header > .row > h2 { + font-size: 14px; + color: #222; + font-weight: normal; + font-family: "Lucida Console", monospace, sans-serif; + word-break: break-all; + margin: 20px 5px 0 0; + user-select: all; +} +article > header > .row > h2 > code { + white-space: nowrap; + user-select: none; + color: #cc2255; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + border-radius: 3px; + margin-right: 5px; + padding: 0 3px; +} +article > header > .row > time.col { + flex: 0; + text-align: right; + white-space: nowrap; + color: #999; + font-style: italic; +} +article > header ul.tags { + list-style: none; + padding: 0; + margin: 0; + font-size: 12px; +} +article > header ul.tags > li { + user-select: all; + margin-bottom: 2px; +} +article > header ul.tags > li > span.badge { + display: inline-block; + padding: .25em .4em; + margin-right: 5px; + border-radius: 4px; + background-color: #6c757d3b; + color: #524d4d; + font-size: 12px; + text-align: center; + font-weight: 700; + line-height: 1; + white-space: nowrap; + vertical-align: baseline; + user-select: none; +} +article > section.body { + border: 1px solid #d8d8d8; + background: #FFF; + padding: 10px; + border-radius: 3px; +} +pre.sf-dump { + border-radius: 3px; + margin-bottom: 0; +} +.hidden { + display: none !important; +} +.dumped-tag > .sf-dump { + display: inline-block; + margin: 0; + padding: 1px 5px; + line-height: 1.4; + vertical-align: top; + background-color: transparent; + user-select: auto; +} +.dumped-tag > pre.sf-dump, +.dumped-tag > .sf-dump-default { + color: #CC7832; + background: none; +} +.dumped-tag > .sf-dump .sf-dump-str { color: #629755; } +.dumped-tag > .sf-dump .sf-dump-private, +.dumped-tag > .sf-dump .sf-dump-protected, +.dumped-tag > .sf-dump .sf-dump-public { color: #262626; } +.dumped-tag > .sf-dump .sf-dump-note { color: #6897BB; } +.dumped-tag > .sf-dump .sf-dump-key { color: #789339; } +.dumped-tag > .sf-dump .sf-dump-ref { color: #6E6E6E; } +.dumped-tag > .sf-dump .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } +.dumped-tag > .sf-dump .sf-dump-ellipsis-path { max-width: 5em; } +.dumped-tag > .sf-dump .sf-dump-ns { user-select: none; } diff --git a/build/vendor/symfony/var-dumper/Resources/functions/dump.php b/build/vendor/symfony/var-dumper/Resources/functions/dump.php new file mode 100644 index 0000000..be29f73 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Resources/functions/dump.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use RayGlobalScoped\Symfony\Component\VarDumper\VarDumper; +if (!\function_exists('RayGlobalScoped\\dump')) { + /** + * @author Nicolas Grekas + */ + function dump($var, ...$moreVars) + { + \RayGlobalScoped\Symfony\Component\VarDumper\VarDumper::dump($var); + foreach ($moreVars as $v) { + \RayGlobalScoped\Symfony\Component\VarDumper\VarDumper::dump($v); + } + if (1 < \func_num_args()) { + return \func_get_args(); + } + return $var; + } +} +if (!\function_exists('RayGlobalScoped\\dd')) { + function dd(...$vars) + { + foreach ($vars as $v) { + \RayGlobalScoped\Symfony\Component\VarDumper\VarDumper::dump($v); + } + exit(1); + } +} diff --git a/build/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js b/build/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js new file mode 100644 index 0000000..63101e5 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js @@ -0,0 +1,10 @@ +document.addEventListener('DOMContentLoaded', function() { + let prev = null; + Array.from(document.getElementsByTagName('article')).reverse().forEach(function (article) { + const dedupId = article.dataset.dedupId; + if (dedupId === prev) { + article.getElementsByTagName('header')[0].classList.add('hidden'); + } + prev = dedupId; + }); +}); diff --git a/build/vendor/symfony/var-dumper/Server/Connection.php b/build/vendor/symfony/var-dumper/Server/Connection.php new file mode 100644 index 0000000..1216c8f --- /dev/null +++ b/build/vendor/symfony/var-dumper/Server/Connection.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Server; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; +/** + * Forwards serialized Data clones to a server. + * + * @author Maxime Steinhausser + */ +class Connection +{ + private $host; + private $contextProviders; + private $socket; + /** + * @param string $host The server host + * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name + */ + public function __construct(string $host, array $contextProviders = []) + { + if (\false === \strpos($host, '://')) { + $host = 'tcp://' . $host; + } + $this->host = $host; + $this->contextProviders = $contextProviders; + } + public function getContextProviders() : array + { + return $this->contextProviders; + } + public function write(\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data $data) : bool + { + $socketIsFresh = !$this->socket; + if (!($this->socket = $this->socket ?: $this->createSocket())) { + return \false; + } + $context = ['timestamp' => \microtime(\true)]; + foreach ($this->contextProviders as $name => $provider) { + $context[$name] = $provider->getContext(); + } + $context = \array_filter($context); + $encodedPayload = \base64_encode(\serialize([$data, $context])) . "\n"; + \set_error_handler([self::class, 'nullErrorHandler']); + try { + if (-1 !== \stream_socket_sendto($this->socket, $encodedPayload)) { + return \true; + } + if (!$socketIsFresh) { + \stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR); + \fclose($this->socket); + $this->socket = $this->createSocket(); + } + if (-1 !== \stream_socket_sendto($this->socket, $encodedPayload)) { + return \true; + } + } finally { + \restore_error_handler(); + } + return \false; + } + private static function nullErrorHandler($t, $m) + { + // no-op + } + private function createSocket() + { + \set_error_handler([self::class, 'nullErrorHandler']); + try { + return \stream_socket_client($this->host, $errno, $errstr, 3, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT); + } finally { + \restore_error_handler(); + } + } +} diff --git a/build/vendor/symfony/var-dumper/Server/DumpServer.php b/build/vendor/symfony/var-dumper/Server/DumpServer.php new file mode 100644 index 0000000..f00fbde --- /dev/null +++ b/build/vendor/symfony/var-dumper/Server/DumpServer.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Server; + +use RayGlobalScoped\Psr\Log\LoggerInterface; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub; +/** + * A server collecting Data clones sent by a ServerDumper. + * + * @author Maxime Steinhausser + * + * @final + */ +class DumpServer +{ + private $host; + private $socket; + private $logger; + public function __construct(string $host, \RayGlobalScoped\Psr\Log\LoggerInterface $logger = null) + { + if (\false === \strpos($host, '://')) { + $host = 'tcp://' . $host; + } + $this->host = $host; + $this->logger = $logger; + } + public function start() : void + { + if (!($this->socket = \stream_socket_server($this->host, $errno, $errstr))) { + throw new \RuntimeException(\sprintf('Server start failed on "%s": ', $this->host) . $errstr . ' ' . $errno); + } + } + public function listen(callable $callback) : void + { + if (null === $this->socket) { + $this->start(); + } + foreach ($this->getMessages() as $clientId => $message) { + if ($this->logger) { + $this->logger->info('Received a payload from client {clientId}', ['clientId' => $clientId]); + } + $payload = @\unserialize(\base64_decode($message), ['allowed_classes' => [\RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data::class, \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Stub::class]]); + // Impossible to decode the message, give up. + if (\false === $payload) { + if ($this->logger) { + $this->logger->warning('Unable to decode a message from {clientId} client.', ['clientId' => $clientId]); + } + continue; + } + if (!\is_array($payload) || \count($payload) < 2 || !$payload[0] instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\Data || !\is_array($payload[1])) { + if ($this->logger) { + $this->logger->warning('Invalid payload from {clientId} client. Expected an array of two elements (Data $data, array $context)', ['clientId' => $clientId]); + } + continue; + } + [$data, $context] = $payload; + $callback($data, $context, $clientId); + } + } + public function getHost() : string + { + return $this->host; + } + private function getMessages() : iterable + { + $sockets = [(int) $this->socket => $this->socket]; + $write = []; + while (\true) { + $read = $sockets; + \stream_select($read, $write, $write, null); + foreach ($read as $stream) { + if ($this->socket === $stream) { + $stream = \stream_socket_accept($this->socket); + $sockets[(int) $stream] = $stream; + } elseif (\feof($stream)) { + unset($sockets[(int) $stream]); + \fclose($stream); + } else { + (yield (int) $stream => \fgets($stream)); + } + } + } + } +} diff --git a/build/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php b/build/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php new file mode 100644 index 0000000..331a8d5 --- /dev/null +++ b/build/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper\Test; + +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\VarCloner; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper; +/** + * @author Nicolas Grekas + */ +trait VarDumperTestTrait +{ + /** + * @internal + */ + private $varDumperConfig = ['casters' => [], 'flags' => null]; + protected function setUpVarDumper(array $casters, int $flags = null) : void + { + $this->varDumperConfig['casters'] = $casters; + $this->varDumperConfig['flags'] = $flags; + } + /** + * @after + */ + protected function tearDownVarDumper() : void + { + $this->varDumperConfig['casters'] = []; + $this->varDumperConfig['flags'] = null; + } + public function assertDumpEquals($expected, $data, int $filter = 0, string $message = '') + { + $this->assertSame($this->prepareExpectation($expected, $filter), $this->getDump($data, null, $filter), $message); + } + public function assertDumpMatchesFormat($expected, $data, int $filter = 0, string $message = '') + { + $this->assertStringMatchesFormat($this->prepareExpectation($expected, $filter), $this->getDump($data, null, $filter), $message); + } + protected function getDump($data, $key = null, int $filter = 0) : ?string + { + if (null === ($flags = $this->varDumperConfig['flags'])) { + $flags = \getenv('DUMP_LIGHT_ARRAY') ? \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper::DUMP_LIGHT_ARRAY : 0; + $flags |= \getenv('DUMP_STRING_LENGTH') ? \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper::DUMP_STRING_LENGTH : 0; + $flags |= \getenv('DUMP_COMMA_SEPARATOR') ? \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper::DUMP_COMMA_SEPARATOR : 0; + } + $cloner = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\VarCloner(); + $cloner->addCasters($this->varDumperConfig['casters']); + $cloner->setMaxItems(-1); + $dumper = new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper(null, null, $flags); + $dumper->setColors(\false); + $data = $cloner->cloneVar($data, $filter)->withRefHandles(\false); + if (null !== $key && null === ($data = $data->seek($key))) { + return null; + } + return \rtrim($dumper->dump($data, \true)); + } + private function prepareExpectation($expected, int $filter) : string + { + if (!\is_string($expected)) { + $expected = $this->getDump($expected, null, $filter); + } + return \rtrim($expected); + } +} diff --git a/build/vendor/symfony/var-dumper/VarDumper.php b/build/vendor/symfony/var-dumper/VarDumper.php new file mode 100644 index 0000000..d4ddc2e --- /dev/null +++ b/build/vendor/symfony/var-dumper/VarDumper.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace RayGlobalScoped\Symfony\Component\VarDumper; + +use RayGlobalScoped\Symfony\Component\HttpFoundation\Request; +use RayGlobalScoped\Symfony\Component\HttpFoundation\RequestStack; +use RayGlobalScoped\Symfony\Component\HttpKernel\Debug\FileLinkFormatter; +use RayGlobalScoped\Symfony\Component\VarDumper\Caster\ReflectionCaster; +use RayGlobalScoped\Symfony\Component\VarDumper\Cloner\VarCloner; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\CliContextProvider; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\RequestContextProvider; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextualizedDumper; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper; +use RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ServerDumper; +// Load the global dump() function +require_once __DIR__ . '/Resources/functions/dump.php'; +/** + * @author Nicolas Grekas + */ +class VarDumper +{ + private static $handler; + public static function dump($var) + { + if (null === self::$handler) { + self::register(); + } + return (self::$handler)($var); + } + public static function setHandler(callable $callable = null) + { + $prevHandler = self::$handler; + // Prevent replacing the handler with expected format as soon as the env var was set: + if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { + return $prevHandler; + } + self::$handler = $callable; + return $prevHandler; + } + private static function register() : void + { + $cloner = new \RayGlobalScoped\Symfony\Component\VarDumper\Cloner\VarCloner(); + $cloner->addCasters(\RayGlobalScoped\Symfony\Component\VarDumper\Caster\ReflectionCaster::UNSET_CLOSURE_FILE_INFO); + $format = $_SERVER['VAR_DUMPER_FORMAT'] ?? null; + switch (\true) { + case 'html' === $format: + $dumper = new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper(); + break; + case 'cli' === $format: + $dumper = new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper(); + break; + case 'server' === $format: + case 'tcp' === \parse_url($format, \PHP_URL_SCHEME): + $host = 'server' === $format ? $_SERVER['VAR_DUMPER_SERVER'] ?? '127.0.0.1:9912' : $format; + $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], \true) ? new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper() : new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper(); + $dumper = new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ServerDumper($host, $dumper, self::getDefaultContextProviders()); + break; + default: + $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], \true) ? new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\CliDumper() : new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\HtmlDumper(); + } + if (!$dumper instanceof \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ServerDumper) { + $dumper = new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextualizedDumper($dumper, [new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider()]); + } + self::$handler = function ($var) use($cloner, $dumper) { + $dumper->dump($cloner->cloneVar($var)); + }; + } + private static function getDefaultContextProviders() : array + { + $contextProviders = []; + if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], \true) && \class_exists(\RayGlobalScoped\Symfony\Component\HttpFoundation\Request::class)) { + $requestStack = new \RayGlobalScoped\Symfony\Component\HttpFoundation\RequestStack(); + $requestStack->push(\RayGlobalScoped\Symfony\Component\HttpFoundation\Request::createFromGlobals()); + $contextProviders['request'] = new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\RequestContextProvider($requestStack); + } + $fileLinkFormatter = \class_exists(\RayGlobalScoped\Symfony\Component\HttpKernel\Debug\FileLinkFormatter::class) ? new \RayGlobalScoped\Symfony\Component\HttpKernel\Debug\FileLinkFormatter(null, $requestStack ?? null) : null; + return $contextProviders + ['cli' => new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\CliContextProvider(), 'source' => new \RayGlobalScoped\Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider(null, null, $fileLinkFormatter)]; + } +}