├── .editorconfig ├── .gitattributes ├── .gitignore ├── LICENSE.md ├── README.md ├── classes └── Ray.php ├── composer.json ├── composer.lock ├── index.php └── vendor ├── autoload.php ├── bin ├── remove-ray.sh └── var-dump-server ├── brick └── math │ └── src │ ├── BigDecimal.php │ ├── BigInteger.php │ ├── BigNumber.php │ ├── BigRational.php │ ├── Exception │ ├── DivisionByZeroException.php │ ├── IntegerOverflowException.php │ ├── MathException.php │ ├── NegativeNumberException.php │ ├── NumberFormatException.php │ └── RoundingNecessaryException.php │ ├── Internal │ ├── Calculator.php │ └── Calculator │ │ ├── BcMathCalculator.php │ │ ├── GmpCalculator.php │ │ └── NativeCalculator.php │ └── RoundingMode.php ├── composer ├── ClassLoader.php ├── InstalledVersions.php ├── autoload_classmap.php ├── autoload_files.php ├── autoload_namespaces.php ├── autoload_psr4.php ├── autoload_real.php ├── autoload_static.php ├── installed.php └── platform_check.php ├── psr └── container │ └── src │ ├── ContainerExceptionInterface.php │ ├── ContainerInterface.php │ └── NotFoundExceptionInterface.php ├── ramsey ├── collection │ └── src │ │ ├── AbstractArray.php │ │ ├── AbstractCollection.php │ │ ├── AbstractSet.php │ │ ├── ArrayInterface.php │ │ ├── Collection.php │ │ ├── CollectionInterface.php │ │ ├── DoubleEndedQueue.php │ │ ├── DoubleEndedQueueInterface.php │ │ ├── Exception │ │ ├── CollectionException.php │ │ ├── CollectionMismatchException.php │ │ ├── InvalidArgumentException.php │ │ ├── InvalidPropertyOrMethod.php │ │ ├── NoSuchElementException.php │ │ ├── OutOfBoundsException.php │ │ └── UnsupportedOperationException.php │ │ ├── GenericArray.php │ │ ├── Map │ │ ├── AbstractMap.php │ │ ├── AbstractTypedMap.php │ │ ├── AssociativeArrayMap.php │ │ ├── MapInterface.php │ │ ├── NamedParameterMap.php │ │ ├── TypedMap.php │ │ └── TypedMapInterface.php │ │ ├── Queue.php │ │ ├── QueueInterface.php │ │ ├── Set.php │ │ ├── Sort.php │ │ └── Tool │ │ ├── TypeTrait.php │ │ ├── ValueExtractorTrait.php │ │ └── ValueToStringTrait.php └── uuid │ └── src │ ├── BinaryUtils.php │ ├── Builder │ ├── BuilderCollection.php │ ├── DefaultUuidBuilder.php │ ├── DegradedUuidBuilder.php │ ├── FallbackBuilder.php │ └── UuidBuilderInterface.php │ ├── Codec │ ├── CodecInterface.php │ ├── GuidStringCodec.php │ ├── OrderedTimeCodec.php │ ├── StringCodec.php │ ├── TimestampFirstCombCodec.php │ └── TimestampLastCombCodec.php │ ├── Converter │ ├── Number │ │ ├── BigNumberConverter.php │ │ ├── DegradedNumberConverter.php │ │ └── GenericNumberConverter.php │ ├── NumberConverterInterface.php │ ├── Time │ │ ├── BigNumberTimeConverter.php │ │ ├── DegradedTimeConverter.php │ │ ├── GenericTimeConverter.php │ │ ├── PhpTimeConverter.php │ │ └── UnixTimeConverter.php │ └── TimeConverterInterface.php │ ├── DegradedUuid.php │ ├── DeprecatedUuidInterface.php │ ├── DeprecatedUuidMethodsTrait.php │ ├── Exception │ ├── BuilderNotFoundException.php │ ├── DateTimeException.php │ ├── DceSecurityException.php │ ├── InvalidArgumentException.php │ ├── InvalidBytesException.php │ ├── InvalidUuidStringException.php │ ├── NameException.php │ ├── NodeException.php │ ├── RandomSourceException.php │ ├── TimeSourceException.php │ ├── UnableToBuildUuidException.php │ ├── UnsupportedOperationException.php │ └── UuidExceptionInterface.php │ ├── FeatureSet.php │ ├── Fields │ ├── FieldsInterface.php │ └── SerializableFieldsTrait.php │ ├── Generator │ ├── CombGenerator.php │ ├── DceSecurityGenerator.php │ ├── DceSecurityGeneratorInterface.php │ ├── DefaultNameGenerator.php │ ├── DefaultTimeGenerator.php │ ├── NameGeneratorFactory.php │ ├── NameGeneratorInterface.php │ ├── PeclUuidNameGenerator.php │ ├── PeclUuidRandomGenerator.php │ ├── PeclUuidTimeGenerator.php │ ├── RandomBytesGenerator.php │ ├── RandomGeneratorFactory.php │ ├── RandomGeneratorInterface.php │ ├── RandomLibAdapter.php │ ├── TimeGeneratorFactory.php │ ├── TimeGeneratorInterface.php │ └── UnixTimeGenerator.php │ ├── Guid │ ├── Fields.php │ ├── Guid.php │ └── GuidBuilder.php │ ├── Lazy │ └── LazyUuidFromString.php │ ├── Math │ ├── BrickMathCalculator.php │ ├── CalculatorInterface.php │ └── RoundingMode.php │ ├── Nonstandard │ ├── Fields.php │ ├── Uuid.php │ ├── UuidBuilder.php │ └── UuidV6.php │ ├── Provider │ ├── Dce │ │ └── SystemDceSecurityProvider.php │ ├── DceSecurityProviderInterface.php │ ├── Node │ │ ├── FallbackNodeProvider.php │ │ ├── NodeProviderCollection.php │ │ ├── RandomNodeProvider.php │ │ ├── StaticNodeProvider.php │ │ └── SystemNodeProvider.php │ ├── NodeProviderInterface.php │ ├── Time │ │ ├── FixedTimeProvider.php │ │ └── SystemTimeProvider.php │ └── TimeProviderInterface.php │ ├── Rfc4122 │ ├── Fields.php │ ├── FieldsInterface.php │ ├── MaxTrait.php │ ├── MaxUuid.php │ ├── NilTrait.php │ ├── NilUuid.php │ ├── TimeTrait.php │ ├── UuidBuilder.php │ ├── UuidInterface.php │ ├── UuidV1.php │ ├── UuidV2.php │ ├── UuidV3.php │ ├── UuidV4.php │ ├── UuidV5.php │ ├── UuidV6.php │ ├── UuidV7.php │ ├── UuidV8.php │ ├── Validator.php │ ├── VariantTrait.php │ └── VersionTrait.php │ ├── Type │ ├── Decimal.php │ ├── Hexadecimal.php │ ├── Integer.php │ ├── NumberInterface.php │ ├── Time.php │ └── TypeInterface.php │ ├── Uuid.php │ ├── UuidFactory.php │ ├── UuidFactoryInterface.php │ ├── UuidInterface.php │ ├── Validator │ ├── GenericValidator.php │ └── ValidatorInterface.php │ └── functions.php ├── spatie ├── backtrace │ └── src │ │ ├── Arguments │ │ ├── ArgumentReducers.php │ │ ├── ProvidedArgument.php │ │ ├── ReduceArgumentPayloadAction.php │ │ ├── ReduceArgumentsAction.php │ │ ├── ReducedArgument │ │ │ ├── ReducedArgument.php │ │ │ ├── ReducedArgumentContract.php │ │ │ ├── TruncatedReducedArgument.php │ │ │ ├── UnReducedArgument.php │ │ │ └── VariadicReducedArgument.php │ │ └── Reducers │ │ │ ├── ArgumentReducer.php │ │ │ ├── ArrayArgumentReducer.php │ │ │ ├── BaseTypeArgumentReducer.php │ │ │ ├── ClosureArgumentReducer.php │ │ │ ├── DateTimeArgumentReducer.php │ │ │ ├── DateTimeZoneArgumentReducer.php │ │ │ ├── EnumArgumentReducer.php │ │ │ ├── MinimalArrayArgumentReducer.php │ │ │ ├── SensitiveParameterArrayReducer.php │ │ │ ├── StdClassArgumentReducer.php │ │ │ ├── StringableArgumentReducer.php │ │ │ └── SymphonyRequestArgumentReducer.php │ │ ├── Backtrace.php │ │ ├── CodeSnippets │ │ ├── CodeSnippet.php │ │ ├── FileSnippetProvider.php │ │ ├── LaravelSerializableClosureSnippetProvider.php │ │ ├── NullSnippetProvider.php │ │ └── SnippetProvider.php │ │ └── Frame.php ├── macroable │ └── src │ │ └── Macroable.php └── ray │ ├── bin │ └── remove-ray.sh │ ├── phpstan-baseline.neon │ ├── remove-ray-rector.php │ └── src │ ├── ArgumentConverter.php │ ├── Client.php │ ├── Concerns │ ├── RayColors.php │ ├── RayScreenColors.php │ ├── RaySizes.php │ └── RemovesRayFrames.php │ ├── Exceptions │ ├── CouldNotConnectToRay.php │ └── StopExecutionRequested.php │ ├── Origin │ ├── DefaultOriginFactory.php │ ├── Hostname.php │ ├── Origin.php │ └── OriginFactory.php │ ├── PHPStan │ └── RemainingRayCallRule.php │ ├── PayloadFactory.php │ ├── Payloads │ ├── ApplicationLogPayload.php │ ├── BoolPayload.php │ ├── CallerPayload.php │ ├── CarbonPayload.php │ ├── ClearAllPayload.php │ ├── ColorPayload.php │ ├── ConfettiPayload.php │ ├── CreateLockPayload.php │ ├── CustomPayload.php │ ├── DecodedJsonPayload.php │ ├── ExceptionPayload.php │ ├── ExpandPayload.php │ ├── FileContentsPayload.php │ ├── HideAppPayload.php │ ├── HidePayload.php │ ├── HtmlPayload.php │ ├── ImagePayload.php │ ├── JsonStringPayload.php │ ├── LabelPayload.php │ ├── LogPayload.php │ ├── MeasurePayload.php │ ├── NewScreenPayload.php │ ├── NotifyPayload.php │ ├── NullPayload.php │ ├── Payload.php │ ├── PhpInfoPayload.php │ ├── RemovePayload.php │ ├── ScreenColorPayload.php │ ├── SeparatorPayload.php │ ├── ShowAppPayload.php │ ├── SizePayload.php │ ├── TablePayload.php │ ├── TextPayload.php │ ├── TracePayload.php │ └── XmlPayload.php │ ├── Ray.php │ ├── Rector │ └── RemoveRayCallRector.php │ ├── Request.php │ ├── Settings │ ├── Settings.php │ └── SettingsFactory.php │ ├── Support │ ├── CacheStore.php │ ├── Clock.php │ ├── Counters.php │ ├── ExceptionHandler.php │ ├── IgnoredValue.php │ ├── Invador.php │ ├── Limiters.php │ ├── PlainTextDumper.php │ ├── RateLimiter.php │ └── SystemClock.php │ └── helpers.php └── symfony ├── deprecation-contracts └── function.php ├── polyfill-ctype ├── Ctype.php ├── bootstrap.php └── bootstrap80.php ├── polyfill-mbstring ├── Mbstring.php ├── Resources │ └── unidata │ │ ├── caseFolding.php │ │ ├── lowerCase.php │ │ ├── titleCaseRegexp.php │ │ └── upperCase.php ├── bootstrap.php └── bootstrap80.php ├── polyfill-php80 ├── Php80.php ├── Resources │ └── stubs │ │ ├── Attribute.php │ │ ├── Stringable.php │ │ ├── UnhandledMatchError.php │ │ └── ValueError.php └── bootstrap.php ├── polyfill-php81 ├── Php81.php ├── Resources │ └── stubs │ │ └── ReturnTypeWillChange.php └── bootstrap.php ├── service-contracts ├── Attribute │ ├── Required.php │ └── SubscribedService.php ├── ResetInterface.php ├── ServiceCollectionInterface.php ├── ServiceLocatorTrait.php ├── ServiceMethodsSubscriberTrait.php ├── ServiceProviderInterface.php ├── ServiceSubscriberInterface.php └── ServiceSubscriberTrait.php ├── stopwatch ├── Section.php ├── Stopwatch.php ├── StopwatchEvent.php └── StopwatchPeriod.php └── var-dumper ├── Caster ├── AmqpCaster.php ├── ArgsStub.php ├── Caster.php ├── ClassStub.php ├── ConstStub.php ├── CutArrayStub.php ├── CutStub.php ├── DOMCaster.php ├── DateCaster.php ├── DoctrineCaster.php ├── DsCaster.php ├── DsPairStub.php ├── EnumStub.php ├── ExceptionCaster.php ├── FFICaster.php ├── FiberCaster.php ├── FrameStub.php ├── GmpCaster.php ├── ImagineCaster.php ├── ImgStub.php ├── IntlCaster.php ├── LinkStub.php ├── MemcachedCaster.php ├── MysqliCaster.php ├── PdoCaster.php ├── PgSqlCaster.php ├── ProxyManagerCaster.php ├── RdKafkaCaster.php ├── RedisCaster.php ├── ReflectionCaster.php ├── ResourceCaster.php ├── ScalarStub.php ├── SplCaster.php ├── StubCaster.php ├── SymfonyCaster.php ├── TraceStub.php ├── UninitializedStub.php ├── UuidCaster.php ├── VirtualStub.php ├── XmlReaderCaster.php └── XmlResourceCaster.php ├── Cloner ├── AbstractCloner.php ├── ClonerInterface.php ├── Cursor.php ├── Data.php ├── DumperInterface.php ├── Internal │ └── NoDefault.php ├── Stub.php └── VarCloner.php ├── Command ├── Descriptor │ ├── CliDescriptor.php │ ├── DumpDescriptorInterface.php │ └── HtmlDescriptor.php └── ServerDumpCommand.php ├── Dumper ├── AbstractDumper.php ├── CliDumper.php ├── ContextProvider │ ├── CliContextProvider.php │ ├── ContextProviderInterface.php │ ├── RequestContextProvider.php │ └── SourceContextProvider.php ├── ContextualizedDumper.php ├── DataDumperInterface.php ├── HtmlDumper.php └── ServerDumper.php ├── Exception └── ThrowingCasterException.php ├── Resources ├── bin │ └── var-dump-server ├── css │ └── htmlDescriptor.css ├── functions │ └── dump.php └── js │ └── htmlDescriptor.js ├── Server ├── Connection.php └── DumpServer.php └── VarDumper.php /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.php] 13 | indent_size = 4 14 | 15 | [*.md,*.txt] 16 | trim_trailing_whitespace = false 17 | insert_final_newline = false 18 | 19 | [composer.json] 20 | indent_size = 4 21 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Note: You need to uncomment the lines you want to use; the other lines can be deleted 2 | 3 | # Git 4 | # .gitattributes export-ignore 5 | # .gitignore export-ignore 6 | 7 | # Tests 8 | # /.coveralls.yml export-ignore 9 | # /.travis.yml export-ignore 10 | # /phpunit.xml.dist export-ignore 11 | # /tests/ export-ignore 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS files 2 | .DS_Store 3 | 4 | # npm modules 5 | /node_modules 6 | 7 | # files of Composer dependencies that are not needed for the plugin 8 | /vendor/**/.* 9 | /vendor/**/*.json 10 | /vendor/**/*.txt 11 | /vendor/**/*.md 12 | /vendor/**/*.yml 13 | /vendor/**/*.yaml 14 | /vendor/**/*.xml 15 | /vendor/**/*.dist 16 | /vendor/**/readme.php 17 | /vendor/**/LICENSE 18 | /vendor/**/COPYING 19 | /vendor/**/VERSION 20 | /vendor/**/docs/* 21 | /vendor/**/example/* 22 | /vendor/**/examples/* 23 | /vendor/**/test/* 24 | /vendor/**/tests/* 25 | /vendor/**/php4/* 26 | /vendor/getkirby/composer-installer -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 GeNx 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /classes/Ray.php: -------------------------------------------------------------------------------- 1 | color($color); 16 | 17 | return $obj; 18 | } 19 | 20 | ray($obj); 21 | } 22 | 23 | return $obj; 24 | } 25 | 26 | /** 27 | * Inspired on code from the fantastic Bnomei 28 | * @param string|null $key 29 | * @return array 30 | */ 31 | private static function option(?string $key = null) 32 | { 33 | if(empty(self::$options)) 34 | { 35 | self::$options = [ 36 | 'debug' => option('debug', false), 37 | 'enabled' => option('genxbe.ray.enabled', false), 38 | ]; 39 | } 40 | 41 | if ($key) { 42 | return \A::get(self::$options, $key); 43 | } 44 | 45 | return self::$options; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "genxbe/kirby-ray", 3 | "type": "kirby-plugin", 4 | "license": "MIT", 5 | "version": "2.0.4", 6 | "description": "Helper tool that enables ray on all the extendable methods.", 7 | "keywords": [ 8 | "genxbe", 9 | "kirby", 10 | "kirby4", 11 | "kirby5", 12 | "plugin", 13 | "getkirby" 14 | ], 15 | "authors": [ 16 | { 17 | "name": "Sam Serrien", 18 | "email": "source@genx.be" 19 | } 20 | ], 21 | "require": { 22 | "php": "^8.3", 23 | "getkirby/composer-installer": "^1.1", 24 | "spatie/ray": "^1.3", 25 | "spatie/macroable": "^2.0" 26 | }, 27 | "autoload": { 28 | "psr-4": { 29 | "X\\": "classes/" 30 | } 31 | }, 32 | "config": { 33 | "optimize-autoloader": true, 34 | "allow-plugins": { 35 | "getkirby/composer-installer": true 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | [ 7 | 'enabled' => false, 8 | ], 9 | 'pageMethods' => ['ray' => fn ($color = null) => X\Ray::ray($this, $color)], 10 | 'pagesMethods' => ['ray' => fn ($color = null) => X\Ray::ray($this, $color)], 11 | 'fieldMethods' => ['ray' => fn ($field, $color = null) => X\Ray::ray($field, $color)], 12 | 'siteMethods' => ['ray' => fn ($color = null) => X\Ray::ray($this, $color)], 13 | 'fileMethods' => ['ray' => fn ($color = null) => X\Ray::ray($this, $color)], 14 | 'filesMethods' => ['ray' => fn ($color = null) => X\Ray::ray($this, $color)], 15 | 'userMethods' => ['ray' => fn ($color = null) => X\Ray::ray($this, $color)], 16 | 'usersMethods' => ['ray' => fn ($color = null) => X\Ray::ray($this, $color)], 17 | 'collectionMethods' => ['ray' => fn ($color = null) => X\Ray::ray($this, $color)], 18 | 'hooks' => [ 19 | 'system.exception' => function ($exception) { 20 | ray()->exception($exception); 21 | }, 22 | ], 23 | ]); 24 | 25 | if (function_exists('ray') && (!option('debug') && !option('genxbe.ray.enabled'))) { 26 | ray()->disable(); 27 | } 28 | -------------------------------------------------------------------------------- /vendor/autoload.php: -------------------------------------------------------------------------------- 1 | /dev/null) 11 | if [ -z "$self" ]; then 12 | self="$selfArg" 13 | fi 14 | 15 | dir=$(cd "${self%[/\\]*}" > /dev/null; cd '../spatie/ray/bin' && pwd) 16 | 17 | if [ -d /proc/cygdrive ]; then 18 | case $(which php) in 19 | $(readlink -n /proc/cygdrive)/*) 20 | # We are in Cygwin using Windows php, so the path must be translated 21 | dir=$(cygpath -m "$dir"); 22 | ;; 23 | esac 24 | fi 25 | 26 | export COMPOSER_RUNTIME_BIN_DIR="$(cd "${self%[/\\]*}" > /dev/null; pwd)" 27 | 28 | # If bash is sourcing this file, we have to source the target as well 29 | bashSource="$BASH_SOURCE" 30 | if [ -n "$bashSource" ]; then 31 | if [ "$bashSource" != "$0" ]; then 32 | source "${dir}/remove-ray.sh" "$@" 33 | return 34 | fi 35 | fi 36 | 37 | "${dir}/remove-ray.sh" "$@" 38 | -------------------------------------------------------------------------------- /vendor/brick/math/src/Exception/DivisionByZeroException.php: -------------------------------------------------------------------------------- 1 | 126) { 30 | $char = \strtoupper(\dechex($ord)); 31 | 32 | if ($ord < 10) { 33 | $char = '0' . $char; 34 | } 35 | } else { 36 | $char = '"' . $char . '"'; 37 | } 38 | 39 | return new self(\sprintf('Char %s is not a valid character in the given alphabet.', $char)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/brick/math/src/Exception/RoundingNecessaryException.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/symfony/deprecation-contracts/function.php', 10 | '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', 11 | 'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php', 12 | '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', 13 | '3074abeef0bacf5811f59e9dee6311d1' => $vendorDir . '/spatie/ray/src/helpers.php', 14 | ); 15 | -------------------------------------------------------------------------------- /vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($baseDir . '/classes'), 10 | 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 11 | 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), 12 | 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), 13 | 'Symfony\\Component\\Stopwatch\\' => array($vendorDir . '/symfony/stopwatch'), 14 | 'Spatie\\Ray\\' => array($vendorDir . '/spatie/ray/src'), 15 | 'Spatie\\Macroable\\' => array($vendorDir . '/spatie/macroable/src'), 16 | 'Spatie\\Backtrace\\' => array($vendorDir . '/spatie/backtrace/src'), 17 | 'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'), 18 | 'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'), 19 | 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 20 | 'Kirby\\' => array($vendorDir . '/getkirby/composer-installer/src'), 21 | 'Brick\\Math\\' => array($vendorDir . '/brick/math/src'), 22 | ); 23 | -------------------------------------------------------------------------------- /vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | register(true); 35 | 36 | $filesToLoad = \Composer\Autoload\ComposerStaticInit66f4a9c093dfbd6e404a9039967eb044::$files; 37 | $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 38 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 39 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 40 | 41 | require $file; 42 | } 43 | }, null, null); 44 | foreach ($filesToLoad as $fileIdentifier => $file) { 45 | $requireFile($fileIdentifier, $file); 46 | } 47 | 48 | return $loader; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/composer/platform_check.php: -------------------------------------------------------------------------------- 1 | = 80200)) { 8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 8.2.0". You are running ' . PHP_VERSION . '.'; 9 | } 10 | 11 | if ($issues) { 12 | if (!headers_sent()) { 13 | header('HTTP/1.1 500 Internal Server Error'); 14 | } 15 | if (!ini_get('display_errors')) { 16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18 | } elseif (!headers_sent()) { 19 | 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; 20 | } 21 | } 22 | trigger_error( 23 | 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 | E_USER_ERROR 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /vendor/psr/container/src/ContainerExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection; 16 | 17 | /** 18 | * This class contains the basic implementation of a collection that does not 19 | * allow duplicated values (a set), to minimize the effort required to implement 20 | * this specific type of collection. 21 | * 22 | * @template T 23 | * @extends AbstractCollection 24 | */ 25 | abstract class AbstractSet extends AbstractCollection 26 | { 27 | public function add(mixed $element): bool 28 | { 29 | if ($this->contains($element)) { 30 | return false; 31 | } 32 | 33 | // Call offsetSet() on the parent instead of add(), since calling 34 | // parent::add() will invoke $this->offsetSet(), which will call 35 | // $this->contains() a second time. This can cause performance issues 36 | // with extremely large collections. For more information, see 37 | // https://github.com/ramsey/collection/issues/68. 38 | parent::offsetSet(null, $element); 39 | 40 | return true; 41 | } 42 | 43 | public function offsetSet(mixed $offset, mixed $value): void 44 | { 45 | if ($this->contains($value)) { 46 | return; 47 | } 48 | 49 | parent::offsetSet($offset, $value); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/ArrayInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection; 16 | 17 | use ArrayAccess; 18 | use Countable; 19 | use IteratorAggregate; 20 | 21 | /** 22 | * `ArrayInterface` provides traversable array functionality to data types. 23 | * 24 | * @template T 25 | * @extends ArrayAccess 26 | * @extends IteratorAggregate 27 | */ 28 | interface ArrayInterface extends 29 | ArrayAccess, 30 | Countable, 31 | IteratorAggregate 32 | { 33 | /** 34 | * Removes all items from this array. 35 | */ 36 | public function clear(): void; 37 | 38 | /** 39 | * Returns a native PHP array representation of this array object. 40 | * 41 | * @return array 42 | */ 43 | public function toArray(): array; 44 | 45 | /** 46 | * Returns `true` if this array is empty. 47 | */ 48 | public function isEmpty(): bool; 49 | } 50 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Exception/CollectionException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Exception; 16 | 17 | use Throwable; 18 | 19 | interface CollectionException extends Throwable 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Exception/CollectionMismatchException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Exception; 16 | 17 | use RuntimeException; 18 | 19 | /** 20 | * Thrown when attempting to operate on collections of differing types. 21 | */ 22 | class CollectionMismatchException extends RuntimeException implements CollectionException 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Exception/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Exception; 16 | 17 | use InvalidArgumentException as PhpInvalidArgumentException; 18 | 19 | /** 20 | * Thrown to indicate an argument is not of the expected type. 21 | */ 22 | class InvalidArgumentException extends PhpInvalidArgumentException implements CollectionException 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Exception; 16 | 17 | use RuntimeException; 18 | 19 | /** 20 | * Thrown when attempting to evaluate a property, method, or array key 21 | * that doesn't exist on an element or cannot otherwise be evaluated in the 22 | * current context. 23 | */ 24 | class InvalidPropertyOrMethod extends RuntimeException implements CollectionException 25 | { 26 | } 27 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Exception/NoSuchElementException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Exception; 16 | 17 | use RuntimeException; 18 | 19 | /** 20 | * Thrown when attempting to access an element that does not exist. 21 | */ 22 | class NoSuchElementException extends RuntimeException implements CollectionException 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Exception/OutOfBoundsException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Exception; 16 | 17 | use OutOfBoundsException as PhpOutOfBoundsException; 18 | 19 | /** 20 | * Thrown when attempting to access an element out of the range of the collection. 21 | */ 22 | class OutOfBoundsException extends PhpOutOfBoundsException implements CollectionException 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Exception; 16 | 17 | use RuntimeException; 18 | 19 | /** 20 | * Thrown to indicate that the requested operation is not supported. 21 | */ 22 | class UnsupportedOperationException extends RuntimeException implements CollectionException 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/GenericArray.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection; 16 | 17 | /** 18 | * `GenericArray` represents a standard array object. 19 | * 20 | * @extends AbstractArray 21 | */ 22 | class GenericArray extends AbstractArray 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Map/AssociativeArrayMap.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Map; 16 | 17 | /** 18 | * `AssociativeArrayMap` represents a standard associative array object. 19 | * 20 | * @extends AbstractMap 21 | */ 22 | class AssociativeArrayMap extends AbstractMap 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Map/TypedMapInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Map; 16 | 17 | /** 18 | * A `TypedMapInterface` represents a map of elements where key and value are 19 | * typed. 20 | * 21 | * @template K of array-key 22 | * @template T 23 | * @extends MapInterface 24 | */ 25 | interface TypedMapInterface extends MapInterface 26 | { 27 | /** 28 | * Return the type used on the key. 29 | */ 30 | public function getKeyType(): string; 31 | 32 | /** 33 | * Return the type forced on the values. 34 | */ 35 | public function getValueType(): string; 36 | } 37 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Set.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection; 16 | 17 | /** 18 | * A set is a collection that contains no duplicate elements. 19 | * 20 | * Great care must be exercised if mutable objects are used as set elements. 21 | * The behavior of a set is not specified if the value of an object is changed 22 | * in a manner that affects equals comparisons while the object is an element in 23 | * the set. 24 | * 25 | * Example usage: 26 | * 27 | * ``` 28 | * $foo = new \My\Foo(); 29 | * $set = new Set(\My\Foo::class); 30 | * 31 | * $set->add($foo); // returns TRUE, the element doesn't exist 32 | * $set->add($foo); // returns FALSE, the element already exists 33 | * 34 | * $bar = new \My\Foo(); 35 | * $set->add($bar); // returns TRUE, $bar !== $foo 36 | * ``` 37 | * 38 | * @template T 39 | * @extends AbstractSet 40 | */ 41 | class Set extends AbstractSet 42 | { 43 | /** 44 | * Constructs a set object of the specified type, optionally with the 45 | * specified data. 46 | * 47 | * @param string $setType The type or class name associated with this set. 48 | * @param array $data The initial items to store in the set. 49 | */ 50 | public function __construct(private readonly string $setType, array $data = []) 51 | { 52 | parent::__construct($data); 53 | } 54 | 55 | public function getType(): string 56 | { 57 | return $this->setType; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Sort.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection; 16 | 17 | /** 18 | * Collection sorting 19 | */ 20 | enum Sort: string 21 | { 22 | /** 23 | * Sort items in a collection in ascending order. 24 | */ 25 | case Ascending = 'asc'; 26 | 27 | /** 28 | * Sort items in a collection in descending order. 29 | */ 30 | case Descending = 'desc'; 31 | } 32 | -------------------------------------------------------------------------------- /vendor/ramsey/collection/src/Tool/TypeTrait.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Collection\Tool; 16 | 17 | use function is_array; 18 | use function is_bool; 19 | use function is_callable; 20 | use function is_float; 21 | use function is_int; 22 | use function is_numeric; 23 | use function is_object; 24 | use function is_resource; 25 | use function is_scalar; 26 | use function is_string; 27 | 28 | /** 29 | * Provides functionality to check values for specific types. 30 | */ 31 | trait TypeTrait 32 | { 33 | /** 34 | * Returns `true` if value is of the specified type. 35 | * 36 | * @param string $type The type to check the value against. 37 | * @param mixed $value The value to check. 38 | */ 39 | protected function checkType(string $type, mixed $value): bool 40 | { 41 | return match ($type) { 42 | 'array' => is_array($value), 43 | 'bool', 'boolean' => is_bool($value), 44 | 'callable' => is_callable($value), 45 | 'float', 'double' => is_float($value), 46 | 'int', 'integer' => is_int($value), 47 | 'null' => $value === null, 48 | 'numeric' => is_numeric($value), 49 | 'object' => is_object($value), 50 | 'resource' => is_resource($value), 51 | 'scalar' => is_scalar($value), 52 | 'string' => is_string($value), 53 | 'mixed' => true, 54 | default => $value instanceof $type, 55 | }; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Builder; 16 | 17 | use Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; 18 | 19 | /** 20 | * @deprecated Transition to {@see Rfc4122UuidBuilder}. 21 | * 22 | * @psalm-immutable 23 | */ 24 | class DefaultUuidBuilder extends Rfc4122UuidBuilder 25 | { 26 | } 27 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Builder; 16 | 17 | use Ramsey\Uuid\Codec\CodecInterface; 18 | use Ramsey\Uuid\UuidInterface; 19 | 20 | /** 21 | * A UUID builder builds instances of UuidInterface 22 | * 23 | * @psalm-immutable 24 | */ 25 | interface UuidBuilderInterface 26 | { 27 | /** 28 | * Builds and returns a UuidInterface 29 | * 30 | * @param CodecInterface $codec The codec to use for building this UuidInterface instance 31 | * @param string $bytes The byte string from which to construct a UUID 32 | * 33 | * @return UuidInterface Implementations may choose to return more specific 34 | * instances of UUIDs that implement UuidInterface 35 | * 36 | * @psalm-pure 37 | */ 38 | public function build(CodecInterface $codec, string $bytes): UuidInterface; 39 | } 40 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Codec; 16 | 17 | /** 18 | * TimestampLastCombCodec encodes and decodes COMBs, with the timestamp as the 19 | * last 48 bits 20 | * 21 | * The CombGenerator when used with the StringCodec (and, by proxy, the 22 | * TimestampLastCombCodec) adds the timestamp to the last 48 bits of the COMB. 23 | * The TimestampLastCombCodec is provided for the sake of consistency. In 24 | * practice, it is identical to the standard StringCodec but, it may be used 25 | * with the CombGenerator for additional context when reading code. 26 | * 27 | * Consider the following code. By default, the codec used by UuidFactory is the 28 | * StringCodec, but here, we explicitly set the TimestampLastCombCodec. It is 29 | * redundant, but it is clear that we intend this COMB to be generated with the 30 | * timestamp appearing at the end. 31 | * 32 | * ``` php 33 | * $factory = new UuidFactory(); 34 | * 35 | * $factory->setCodec(new TimestampLastCombCodec($factory->getUuidBuilder())); 36 | * 37 | * $factory->setRandomGenerator(new CombGenerator( 38 | * $factory->getRandomGenerator(), 39 | * $factory->getNumberConverter() 40 | * )); 41 | * 42 | * $timestampLastComb = $factory->uuid4(); 43 | * ``` 44 | * 45 | * @link https://www.informit.com/articles/printerfriendly/25862 The Cost of GUIDs as Primary Keys 46 | * 47 | * @psalm-immutable 48 | */ 49 | class TimestampLastCombCodec extends StringCodec 50 | { 51 | } 52 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Converter\Number; 16 | 17 | use Ramsey\Uuid\Converter\NumberConverterInterface; 18 | use Ramsey\Uuid\Math\BrickMathCalculator; 19 | 20 | /** 21 | * Previously used to integrate moontoast/math as a bignum arithmetic library, 22 | * BigNumberConverter is deprecated in favor of GenericNumberConverter 23 | * 24 | * @deprecated Transition to {@see GenericNumberConverter}. 25 | * 26 | * @psalm-immutable 27 | */ 28 | class BigNumberConverter implements NumberConverterInterface 29 | { 30 | private NumberConverterInterface $converter; 31 | 32 | public function __construct() 33 | { 34 | $this->converter = new GenericNumberConverter(new BrickMathCalculator()); 35 | } 36 | 37 | /** 38 | * @inheritDoc 39 | * @psalm-pure 40 | */ 41 | public function fromHex(string $hex): string 42 | { 43 | return $this->converter->fromHex($hex); 44 | } 45 | 46 | /** 47 | * @inheritDoc 48 | * @psalm-pure 49 | */ 50 | public function toHex(string $number): string 51 | { 52 | return $this->converter->toHex($number); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Converter\Number; 16 | 17 | /** 18 | * @deprecated DegradedNumberConverter is no longer necessary for converting 19 | * numbers on 32-bit systems. Transition to {@see GenericNumberConverter}. 20 | * 21 | * @psalm-immutable 22 | */ 23 | class DegradedNumberConverter extends BigNumberConverter 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Converter; 16 | 17 | /** 18 | * A number converter converts UUIDs from hexadecimal characters into 19 | * representations of integers and vice versa 20 | * 21 | * @psalm-immutable 22 | */ 23 | interface NumberConverterInterface 24 | { 25 | /** 26 | * Converts a hexadecimal number into an string integer representation of 27 | * the number 28 | * 29 | * The integer representation returned is a string representation of the 30 | * integer, to accommodate unsigned integers greater than PHP_INT_MAX. 31 | * 32 | * @param string $hex The hexadecimal string representation to convert 33 | * 34 | * @return string String representation of an integer 35 | * 36 | * @psalm-return numeric-string 37 | * 38 | * @psalm-pure 39 | */ 40 | public function fromHex(string $hex): string; 41 | 42 | /** 43 | * Converts a string integer representation into a hexadecimal string 44 | * representation of the number 45 | * 46 | * @param string $number A string integer representation to convert; this 47 | * must be a numeric string to accommodate unsigned integers greater 48 | * than PHP_INT_MAX. 49 | * 50 | * @return string Hexadecimal string 51 | * 52 | * @psalm-return non-empty-string 53 | * 54 | * @psalm-pure 55 | */ 56 | public function toHex(string $number): string; 57 | } 58 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Converter\Time; 16 | 17 | use Ramsey\Uuid\Converter\TimeConverterInterface; 18 | use Ramsey\Uuid\Math\BrickMathCalculator; 19 | use Ramsey\Uuid\Type\Hexadecimal; 20 | use Ramsey\Uuid\Type\Time; 21 | 22 | /** 23 | * Previously used to integrate moontoast/math as a bignum arithmetic library, 24 | * BigNumberTimeConverter is deprecated in favor of GenericTimeConverter 25 | * 26 | * @deprecated Transition to {@see GenericTimeConverter}. 27 | * 28 | * @psalm-immutable 29 | */ 30 | class BigNumberTimeConverter implements TimeConverterInterface 31 | { 32 | private TimeConverterInterface $converter; 33 | 34 | public function __construct() 35 | { 36 | $this->converter = new GenericTimeConverter(new BrickMathCalculator()); 37 | } 38 | 39 | public function calculateTime(string $seconds, string $microseconds): Hexadecimal 40 | { 41 | return $this->converter->calculateTime($seconds, $microseconds); 42 | } 43 | 44 | public function convertTime(Hexadecimal $uuidTimestamp): Time 45 | { 46 | return $this->converter->convertTime($uuidTimestamp); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Converter\Time; 16 | 17 | /** 18 | * @deprecated DegradedTimeConverter is no longer necessary for converting 19 | * time on 32-bit systems. Transition to {@see GenericTimeConverter}. 20 | * 21 | * @psalm-immutable 22 | */ 23 | class DegradedTimeConverter extends BigNumberTimeConverter 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/DegradedUuid.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid; 16 | 17 | /** 18 | * @deprecated DegradedUuid is no longer necessary to represent UUIDs on 32-bit 19 | * systems. Transition typehints to {@see UuidInterface}. 20 | * 21 | * @psalm-immutable 22 | */ 23 | class DegradedUuid extends Uuid 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use RuntimeException as PhpRuntimeException; 18 | 19 | /** 20 | * Thrown to indicate that no suitable builder could be found 21 | */ 22 | class BuilderNotFoundException extends PhpRuntimeException implements UuidExceptionInterface 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/DateTimeException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use RuntimeException as PhpRuntimeException; 18 | 19 | /** 20 | * Thrown to indicate that the PHP DateTime extension encountered an exception/error 21 | */ 22 | class DateTimeException extends PhpRuntimeException implements UuidExceptionInterface 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/DceSecurityException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use RuntimeException as PhpRuntimeException; 18 | 19 | /** 20 | * Thrown to indicate an exception occurred while dealing with DCE Security 21 | * (version 2) UUIDs 22 | */ 23 | class DceSecurityException extends PhpRuntimeException implements UuidExceptionInterface 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use InvalidArgumentException as PhpInvalidArgumentException; 18 | 19 | /** 20 | * Thrown to indicate that the argument received is not valid 21 | */ 22 | class InvalidArgumentException extends PhpInvalidArgumentException implements UuidExceptionInterface 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/InvalidBytesException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use RuntimeException as PhpRuntimeException; 18 | 19 | /** 20 | * Thrown to indicate that the bytes being operated on are invalid in some way 21 | */ 22 | class InvalidBytesException extends PhpRuntimeException implements UuidExceptionInterface 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | /** 18 | * Thrown to indicate that the string received is not a valid UUID 19 | * 20 | * The InvalidArgumentException that this extends is the ramsey/uuid version 21 | * of this exception. It exists in the same namespace as this class. 22 | */ 23 | class InvalidUuidStringException extends InvalidArgumentException implements UuidExceptionInterface 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/NameException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use RuntimeException as PhpRuntimeException; 18 | 19 | /** 20 | * Thrown to indicate that an error occurred while attempting to hash a 21 | * namespace and name 22 | */ 23 | class NameException extends PhpRuntimeException implements UuidExceptionInterface 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/NodeException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use RuntimeException as PhpRuntimeException; 18 | 19 | /** 20 | * Thrown to indicate that attempting to fetch or create a node ID encountered an error 21 | */ 22 | class NodeException extends PhpRuntimeException implements UuidExceptionInterface 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/RandomSourceException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use RuntimeException as PhpRuntimeException; 18 | 19 | /** 20 | * Thrown to indicate that the source of random data encountered an error 21 | * 22 | * This exception is used mostly to indicate that random_bytes() or random_int() 23 | * threw an exception. However, it may be used for other sources of random data. 24 | */ 25 | class RandomSourceException extends PhpRuntimeException implements UuidExceptionInterface 26 | { 27 | } 28 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/TimeSourceException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use RuntimeException as PhpRuntimeException; 18 | 19 | /** 20 | * Thrown to indicate that the source of time encountered an error 21 | */ 22 | class TimeSourceException extends PhpRuntimeException implements UuidExceptionInterface 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use RuntimeException as PhpRuntimeException; 18 | 19 | /** 20 | * Thrown to indicate a builder is unable to build a UUID 21 | */ 22 | class UnableToBuildUuidException extends PhpRuntimeException implements UuidExceptionInterface 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use LogicException as PhpLogicException; 18 | 19 | /** 20 | * Thrown to indicate that the requested operation is not supported 21 | */ 22 | class UnsupportedOperationException extends PhpLogicException implements UuidExceptionInterface 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Exception/UuidExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Exception; 16 | 17 | use Throwable; 18 | 19 | interface UuidExceptionInterface extends Throwable 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Fields/FieldsInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Fields; 16 | 17 | use Serializable; 18 | 19 | /** 20 | * UUIDs are comprised of unsigned integers, the bytes of which are separated 21 | * into fields and arranged in a particular layout defined by the specification 22 | * for the variant 23 | * 24 | * @psalm-immutable 25 | */ 26 | interface FieldsInterface extends Serializable 27 | { 28 | /** 29 | * Returns the bytes that comprise the fields 30 | */ 31 | public function getBytes(): string; 32 | } 33 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | use Ramsey\Uuid\Exception\NameException; 18 | use Ramsey\Uuid\UuidInterface; 19 | use ValueError; 20 | 21 | use function hash; 22 | 23 | /** 24 | * DefaultNameGenerator generates strings of binary data based on a namespace, 25 | * name, and hashing algorithm 26 | */ 27 | class DefaultNameGenerator implements NameGeneratorInterface 28 | { 29 | /** @psalm-pure */ 30 | public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string 31 | { 32 | try { 33 | /** @var string|bool $bytes */ 34 | $bytes = @hash($hashAlgorithm, $ns->getBytes() . $name, true); 35 | } catch (ValueError $e) { 36 | $bytes = false; // keep same behavior than PHP 7 37 | } 38 | 39 | if ($bytes === false) { 40 | throw new NameException(sprintf( 41 | 'Unable to hash namespace and name with algorithm \'%s\'', 42 | $hashAlgorithm 43 | )); 44 | } 45 | 46 | return (string) $bytes; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | /** 18 | * NameGeneratorFactory retrieves a default name generator, based on the 19 | * environment 20 | */ 21 | class NameGeneratorFactory 22 | { 23 | /** 24 | * Returns a default name generator, based on the current environment 25 | */ 26 | public function getGenerator(): NameGeneratorInterface 27 | { 28 | return new DefaultNameGenerator(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | use Ramsey\Uuid\UuidInterface; 18 | 19 | /** 20 | * A name generator generates strings of binary data created by hashing together 21 | * a namespace with a name, according to a hashing algorithm 22 | */ 23 | interface NameGeneratorInterface 24 | { 25 | /** 26 | * Generate a binary string from a namespace and name hashed together with 27 | * the specified hashing algorithm 28 | * 29 | * @param UuidInterface $ns The namespace 30 | * @param string $name The name to use for creating a UUID 31 | * @param string $hashAlgorithm The hashing algorithm to use 32 | * 33 | * @return string A binary string 34 | * 35 | * @psalm-pure 36 | */ 37 | public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string; 38 | } 39 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | use Ramsey\Uuid\Exception\NameException; 18 | use Ramsey\Uuid\UuidInterface; 19 | 20 | use function sprintf; 21 | use function uuid_generate_md5; 22 | use function uuid_generate_sha1; 23 | use function uuid_parse; 24 | 25 | /** 26 | * PeclUuidNameGenerator generates strings of binary data from a namespace and a 27 | * name, using ext-uuid 28 | * 29 | * @link https://pecl.php.net/package/uuid ext-uuid 30 | */ 31 | class PeclUuidNameGenerator implements NameGeneratorInterface 32 | { 33 | /** @psalm-pure */ 34 | public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string 35 | { 36 | $uuid = match ($hashAlgorithm) { 37 | 'md5' => uuid_generate_md5($ns->toString(), $name), 38 | 'sha1' => uuid_generate_sha1($ns->toString(), $name), 39 | default => throw new NameException( 40 | sprintf( 41 | 'Unable to hash namespace and name with algorithm \'%s\'', 42 | $hashAlgorithm 43 | ) 44 | ), 45 | }; 46 | 47 | return uuid_parse($uuid); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | use function uuid_create; 18 | use function uuid_parse; 19 | 20 | use const UUID_TYPE_RANDOM; 21 | 22 | /** 23 | * PeclUuidRandomGenerator generates strings of random binary data using ext-uuid 24 | * 25 | * @link https://pecl.php.net/package/uuid ext-uuid 26 | */ 27 | class PeclUuidRandomGenerator implements RandomGeneratorInterface 28 | { 29 | public function generate(int $length): string 30 | { 31 | $uuid = uuid_create(UUID_TYPE_RANDOM); 32 | 33 | return uuid_parse($uuid); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | use function uuid_create; 18 | use function uuid_parse; 19 | 20 | use const UUID_TYPE_TIME; 21 | 22 | /** 23 | * PeclUuidTimeGenerator generates strings of binary data for time-base UUIDs, 24 | * using ext-uuid 25 | * 26 | * @link https://pecl.php.net/package/uuid ext-uuid 27 | */ 28 | class PeclUuidTimeGenerator implements TimeGeneratorInterface 29 | { 30 | /** 31 | * @inheritDoc 32 | */ 33 | public function generate($node = null, ?int $clockSeq = null): string 34 | { 35 | $uuid = uuid_create(UUID_TYPE_TIME); 36 | 37 | return uuid_parse($uuid); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | use Ramsey\Uuid\Exception\RandomSourceException; 18 | use Throwable; 19 | 20 | /** 21 | * RandomBytesGenerator generates strings of random binary data using the 22 | * built-in `random_bytes()` PHP function 23 | * 24 | * @link http://php.net/random_bytes random_bytes() 25 | */ 26 | class RandomBytesGenerator implements RandomGeneratorInterface 27 | { 28 | /** 29 | * @throws RandomSourceException if random_bytes() throws an exception/error 30 | * 31 | * @inheritDoc 32 | */ 33 | public function generate(int $length): string 34 | { 35 | try { 36 | return random_bytes($length); 37 | } catch (Throwable $exception) { 38 | throw new RandomSourceException( 39 | $exception->getMessage(), 40 | (int) $exception->getCode(), 41 | $exception 42 | ); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | /** 18 | * RandomGeneratorFactory retrieves a default random generator, based on the 19 | * environment 20 | */ 21 | class RandomGeneratorFactory 22 | { 23 | /** 24 | * Returns a default random generator, based on the current environment 25 | */ 26 | public function getGenerator(): RandomGeneratorInterface 27 | { 28 | return new RandomBytesGenerator(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | /** 18 | * A random generator generates strings of random binary data 19 | */ 20 | interface RandomGeneratorInterface 21 | { 22 | /** 23 | * Generates a string of randomized binary data 24 | * 25 | * @param int<1, max> $length The number of bytes of random binary data to generate 26 | * 27 | * @return string A binary string 28 | */ 29 | public function generate(int $length): string; 30 | } 31 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | use RandomLib\Factory; 18 | use RandomLib\Generator; 19 | 20 | /** 21 | * RandomLibAdapter generates strings of random binary data using the 22 | * paragonie/random-lib library 23 | * 24 | * @deprecated This class will be removed in 5.0.0. Use the default 25 | * RandomBytesGenerator or implement your own generator that implements 26 | * RandomGeneratorInterface. 27 | * 28 | * @link https://packagist.org/packages/paragonie/random-lib paragonie/random-lib 29 | */ 30 | class RandomLibAdapter implements RandomGeneratorInterface 31 | { 32 | private Generator $generator; 33 | 34 | /** 35 | * Constructs a RandomLibAdapter 36 | * 37 | * By default, if no Generator is passed in, this creates a high-strength 38 | * generator to use when generating random binary data. 39 | * 40 | * @param Generator|null $generator The generator to use when generating binary data 41 | */ 42 | public function __construct(?Generator $generator = null) 43 | { 44 | if ($generator === null) { 45 | $factory = new Factory(); 46 | $generator = $factory->getHighStrengthGenerator(); 47 | } 48 | 49 | $this->generator = $generator; 50 | } 51 | 52 | public function generate(int $length): string 53 | { 54 | return $this->generator->generate($length); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | use Ramsey\Uuid\Converter\TimeConverterInterface; 18 | use Ramsey\Uuid\Provider\NodeProviderInterface; 19 | use Ramsey\Uuid\Provider\TimeProviderInterface; 20 | 21 | /** 22 | * TimeGeneratorFactory retrieves a default time generator, based on the 23 | * environment 24 | */ 25 | class TimeGeneratorFactory 26 | { 27 | public function __construct( 28 | private NodeProviderInterface $nodeProvider, 29 | private TimeConverterInterface $timeConverter, 30 | private TimeProviderInterface $timeProvider 31 | ) { 32 | } 33 | 34 | /** 35 | * Returns a default time generator, based on the current environment 36 | */ 37 | public function getGenerator(): TimeGeneratorInterface 38 | { 39 | return new DefaultTimeGenerator( 40 | $this->nodeProvider, 41 | $this->timeConverter, 42 | $this->timeProvider 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Generator; 16 | 17 | use Ramsey\Uuid\Type\Hexadecimal; 18 | 19 | /** 20 | * A time generator generates strings of binary data based on a node ID, 21 | * clock sequence, and the current time 22 | */ 23 | interface TimeGeneratorInterface 24 | { 25 | /** 26 | * Generate a binary string from a node ID, clock sequence, and current time 27 | * 28 | * @param Hexadecimal|int|string|null $node A 48-bit number representing the 29 | * hardware address; this number may be represented as an integer or a 30 | * hexadecimal string 31 | * @param int|null $clockSeq A 14-bit number used to help avoid duplicates 32 | * that could arise when the clock is set backwards in time or if the 33 | * node ID changes 34 | * 35 | * @return string A binary string 36 | */ 37 | public function generate($node = null, ?int $clockSeq = null): string; 38 | } 39 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Nonstandard/Uuid.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Nonstandard; 16 | 17 | use Ramsey\Uuid\Codec\CodecInterface; 18 | use Ramsey\Uuid\Converter\NumberConverterInterface; 19 | use Ramsey\Uuid\Converter\TimeConverterInterface; 20 | use Ramsey\Uuid\Uuid as BaseUuid; 21 | 22 | /** 23 | * Nonstandard\Uuid is a UUID that doesn't conform to RFC 4122 24 | * 25 | * @psalm-immutable 26 | */ 27 | final class Uuid extends BaseUuid 28 | { 29 | public function __construct( 30 | Fields $fields, 31 | NumberConverterInterface $numberConverter, 32 | CodecInterface $codec, 33 | TimeConverterInterface $timeConverter 34 | ) { 35 | parent::__construct($fields, $numberConverter, $codec, $timeConverter); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Provider; 16 | 17 | use Ramsey\Uuid\Rfc4122\UuidV2; 18 | use Ramsey\Uuid\Type\Integer as IntegerObject; 19 | 20 | /** 21 | * A DCE provider provides access to local domain identifiers for version 2, 22 | * DCE Security, UUIDs 23 | * 24 | * @see UuidV2 25 | */ 26 | interface DceSecurityProviderInterface 27 | { 28 | /** 29 | * Returns a user identifier for the system 30 | * 31 | * @link https://en.wikipedia.org/wiki/User_identifier User identifier 32 | */ 33 | public function getUid(): IntegerObject; 34 | 35 | /** 36 | * Returns a group identifier for the system 37 | * 38 | * @link https://en.wikipedia.org/wiki/Group_identifier Group identifier 39 | */ 40 | public function getGid(): IntegerObject; 41 | } 42 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Provider\Node; 16 | 17 | use Ramsey\Uuid\Exception\NodeException; 18 | use Ramsey\Uuid\Provider\NodeProviderInterface; 19 | use Ramsey\Uuid\Type\Hexadecimal; 20 | 21 | /** 22 | * FallbackNodeProvider retrieves the system node ID by stepping through a list 23 | * of providers until a node ID can be obtained 24 | */ 25 | class FallbackNodeProvider implements NodeProviderInterface 26 | { 27 | /** 28 | * @param iterable $providers Array of node providers 29 | */ 30 | public function __construct(private iterable $providers) 31 | { 32 | } 33 | 34 | public function getNode(): Hexadecimal 35 | { 36 | $lastProviderException = null; 37 | 38 | foreach ($this->providers as $provider) { 39 | try { 40 | return $provider->getNode(); 41 | } catch (NodeException $exception) { 42 | $lastProviderException = $exception; 43 | 44 | continue; 45 | } 46 | } 47 | 48 | throw new NodeException( 49 | 'Unable to find a suitable node provider', 50 | 0, 51 | $lastProviderException 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Provider; 16 | 17 | use Ramsey\Uuid\Type\Hexadecimal; 18 | 19 | /** 20 | * A node provider retrieves or generates a node ID 21 | */ 22 | interface NodeProviderInterface 23 | { 24 | /** 25 | * Returns a node ID 26 | * 27 | * @return Hexadecimal The node ID as a hexadecimal string 28 | */ 29 | public function getNode(): Hexadecimal; 30 | } 31 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Provider\Time; 16 | 17 | use Ramsey\Uuid\Provider\TimeProviderInterface; 18 | use Ramsey\Uuid\Type\Integer as IntegerObject; 19 | use Ramsey\Uuid\Type\Time; 20 | 21 | /** 22 | * FixedTimeProvider uses a known time to provide the time 23 | * 24 | * This provider allows the use of a previously-generated, or known, time 25 | * when generating time-based UUIDs. 26 | */ 27 | class FixedTimeProvider implements TimeProviderInterface 28 | { 29 | public function __construct(private Time $time) 30 | { 31 | } 32 | 33 | /** 34 | * Sets the `usec` component of the time 35 | * 36 | * @param int|string|IntegerObject $value The `usec` value to set 37 | */ 38 | public function setUsec($value): void 39 | { 40 | $this->time = new Time($this->time->getSeconds(), $value); 41 | } 42 | 43 | /** 44 | * Sets the `sec` component of the time 45 | * 46 | * @param int|string|IntegerObject $value The `sec` value to set 47 | */ 48 | public function setSec($value): void 49 | { 50 | $this->time = new Time($value, $this->time->getMicroseconds()); 51 | } 52 | 53 | public function getTime(): Time 54 | { 55 | return $this->time; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Provider\Time; 16 | 17 | use Ramsey\Uuid\Provider\TimeProviderInterface; 18 | use Ramsey\Uuid\Type\Time; 19 | 20 | use function gettimeofday; 21 | 22 | /** 23 | * SystemTimeProvider retrieves the current time using built-in PHP functions 24 | */ 25 | class SystemTimeProvider implements TimeProviderInterface 26 | { 27 | public function getTime(): Time 28 | { 29 | $time = gettimeofday(); 30 | 31 | return new Time($time['sec'], $time['usec']); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Provider; 16 | 17 | use Ramsey\Uuid\Type\Time; 18 | 19 | /** 20 | * A time provider retrieves the current time 21 | */ 22 | interface TimeProviderInterface 23 | { 24 | /** 25 | * Returns a time object 26 | */ 27 | public function getTime(): Time; 28 | } 29 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Rfc4122/MaxTrait.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Rfc4122; 16 | 17 | /** 18 | * Provides common functionality for max UUIDs 19 | * 20 | * The max UUID is special form of UUID that is specified to have all 128 bits 21 | * set to one. It is the inverse of the nil UUID. 22 | * 23 | * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.10 Max UUID 24 | * 25 | * @psalm-immutable 26 | */ 27 | trait MaxTrait 28 | { 29 | /** 30 | * Returns the bytes that comprise the fields 31 | */ 32 | abstract public function getBytes(): string; 33 | 34 | /** 35 | * Returns true if the byte string represents a max UUID 36 | */ 37 | public function isMax(): bool 38 | { 39 | return $this->getBytes() === "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Rfc4122/MaxUuid.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Rfc4122; 16 | 17 | use Ramsey\Uuid\Uuid; 18 | 19 | /** 20 | * The max UUID is special form of UUID that is specified to have all 128 bits 21 | * set to one 22 | * 23 | * @psalm-immutable 24 | */ 25 | final class MaxUuid extends Uuid implements UuidInterface 26 | { 27 | } 28 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Rfc4122/NilTrait.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Rfc4122; 16 | 17 | /** 18 | * Provides common functionality for nil UUIDs 19 | * 20 | * The nil UUID is special form of UUID that is specified to have all 128 bits 21 | * set to zero. 22 | * 23 | * @link https://tools.ietf.org/html/rfc4122#section-4.1.7 RFC 4122, § 4.1.7: Nil UUID 24 | * 25 | * @psalm-immutable 26 | */ 27 | trait NilTrait 28 | { 29 | /** 30 | * Returns the bytes that comprise the fields 31 | */ 32 | abstract public function getBytes(): string; 33 | 34 | /** 35 | * Returns true if the byte string represents a nil UUID 36 | */ 37 | public function isNil(): bool 38 | { 39 | return $this->getBytes() === "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Rfc4122/NilUuid.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Rfc4122; 16 | 17 | use Ramsey\Uuid\Uuid; 18 | 19 | /** 20 | * The nil UUID is special form of UUID that is specified to have all 128 bits 21 | * set to zero 22 | * 23 | * @psalm-immutable 24 | */ 25 | final class NilUuid extends Uuid implements UuidInterface 26 | { 27 | } 28 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Rfc4122/TimeTrait.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Rfc4122; 16 | 17 | use DateTimeImmutable; 18 | use DateTimeInterface; 19 | use Ramsey\Uuid\Exception\DateTimeException; 20 | use Throwable; 21 | 22 | use function str_pad; 23 | 24 | use const STR_PAD_LEFT; 25 | 26 | /** 27 | * Provides common functionality for getting the time from a time-based UUID 28 | * 29 | * @psalm-immutable 30 | */ 31 | trait TimeTrait 32 | { 33 | /** 34 | * Returns a DateTimeInterface object representing the timestamp associated 35 | * with the UUID 36 | * 37 | * @return DateTimeImmutable A PHP DateTimeImmutable instance representing 38 | * the timestamp of a time-based UUID 39 | */ 40 | public function getDateTime(): DateTimeInterface 41 | { 42 | $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); 43 | 44 | try { 45 | return new DateTimeImmutable( 46 | '@' 47 | . $time->getSeconds()->toString() 48 | . '.' 49 | . str_pad($time->getMicroseconds()->toString(), 6, '0', STR_PAD_LEFT) 50 | ); 51 | } catch (Throwable $e) { 52 | throw new DateTimeException($e->getMessage(), (int) $e->getCode(), $e); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Rfc4122; 16 | 17 | use Ramsey\Uuid\UuidInterface as BaseUuidInterface; 18 | 19 | /** 20 | * Also known as a Leach-Salz variant UUID, an RFC 4122 variant UUID is a 21 | * universally unique identifier defined by RFC 4122 22 | * 23 | * @link https://tools.ietf.org/html/rfc4122 RFC 4122 24 | * 25 | * @psalm-immutable 26 | */ 27 | interface UuidInterface extends BaseUuidInterface 28 | { 29 | } 30 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Rfc4122/UuidV6.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Rfc4122; 16 | 17 | use Ramsey\Uuid\Nonstandard\UuidV6 as NonstandardUuidV6; 18 | 19 | /** 20 | * Reordered time, or version 6, UUIDs include timestamp, clock sequence, and 21 | * node values that are combined into a 128-bit unsigned integer 22 | * 23 | * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.6 UUID Version 6 24 | * 25 | * @psalm-immutable 26 | */ 27 | final class UuidV6 extends NonstandardUuidV6 implements UuidInterface 28 | { 29 | } 30 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Rfc4122/Validator.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Rfc4122; 16 | 17 | use Ramsey\Uuid\Uuid; 18 | use Ramsey\Uuid\Validator\ValidatorInterface; 19 | 20 | use function preg_match; 21 | use function str_replace; 22 | 23 | /** 24 | * Rfc4122\Validator validates strings as UUIDs of the RFC 4122 variant 25 | * 26 | * @psalm-immutable 27 | */ 28 | final class Validator implements ValidatorInterface 29 | { 30 | private const VALID_PATTERN = '\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-' 31 | . '[1-8][0-9A-Fa-f]{3}-[ABab89][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}\z'; 32 | 33 | /** 34 | * @psalm-return non-empty-string 35 | * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty 36 | * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty 37 | */ 38 | public function getPattern(): string 39 | { 40 | return self::VALID_PATTERN; 41 | } 42 | 43 | public function validate(string $uuid): bool 44 | { 45 | $uuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid); 46 | $uuid = strtolower($uuid); 47 | 48 | return $uuid === Uuid::NIL || $uuid === Uuid::MAX || preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Rfc4122; 16 | 17 | use Ramsey\Uuid\Uuid; 18 | 19 | /** 20 | * Provides common functionality for handling the version, as defined by RFC 4122 21 | * 22 | * @psalm-immutable 23 | */ 24 | trait VersionTrait 25 | { 26 | /** 27 | * Returns the version 28 | */ 29 | abstract public function getVersion(): ?int; 30 | 31 | /** 32 | * Returns true if these fields represent a max UUID 33 | */ 34 | abstract public function isMax(): bool; 35 | 36 | /** 37 | * Returns true if these fields represent a nil UUID 38 | */ 39 | abstract public function isNil(): bool; 40 | 41 | /** 42 | * Returns true if the version matches one of those defined by RFC 4122 43 | * 44 | * @return bool True if the UUID version is valid, false otherwise 45 | */ 46 | private function isCorrectVersion(): bool 47 | { 48 | if ($this->isNil() || $this->isMax()) { 49 | return true; 50 | } 51 | 52 | return match ($this->getVersion()) { 53 | Uuid::UUID_TYPE_TIME, Uuid::UUID_TYPE_DCE_SECURITY, 54 | Uuid::UUID_TYPE_HASH_MD5, Uuid::UUID_TYPE_RANDOM, 55 | Uuid::UUID_TYPE_HASH_SHA1, Uuid::UUID_TYPE_REORDERED_TIME, 56 | Uuid::UUID_TYPE_UNIX_TIME, Uuid::UUID_TYPE_CUSTOM => true, 57 | default => false, 58 | }; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Type/NumberInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Type; 16 | 17 | /** 18 | * NumberInterface ensures consistency in numeric values returned by ramsey/uuid 19 | * 20 | * @psalm-immutable 21 | */ 22 | interface NumberInterface extends TypeInterface 23 | { 24 | /** 25 | * Returns true if this number is less than zero 26 | */ 27 | public function isNegative(): bool; 28 | } 29 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Type/TypeInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Type; 16 | 17 | use JsonSerializable; 18 | use Serializable; 19 | 20 | /** 21 | * TypeInterface ensures consistency in typed values returned by ramsey/uuid 22 | * 23 | * @psalm-immutable 24 | */ 25 | interface TypeInterface extends JsonSerializable, Serializable 26 | { 27 | public function toString(): string; 28 | 29 | public function __toString(): string; 30 | } 31 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Validator/GenericValidator.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Validator; 16 | 17 | use Ramsey\Uuid\Uuid; 18 | 19 | use function preg_match; 20 | use function str_replace; 21 | 22 | /** 23 | * GenericValidator validates strings as UUIDs of any variant 24 | * 25 | * @psalm-immutable 26 | */ 27 | final class GenericValidator implements ValidatorInterface 28 | { 29 | /** 30 | * Regular expression pattern for matching a UUID of any variant. 31 | */ 32 | 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'; 33 | 34 | /** 35 | * @psalm-return non-empty-string 36 | * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty 37 | * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty 38 | */ 39 | public function getPattern(): string 40 | { 41 | return self::VALID_PATTERN; 42 | } 43 | 44 | public function validate(string $uuid): bool 45 | { 46 | $uuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid); 47 | 48 | return $uuid === Uuid::NIL || preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/ramsey/uuid/src/Validator/ValidatorInterface.php: -------------------------------------------------------------------------------- 1 | 10 | * @license http://opensource.org/licenses/MIT MIT 11 | */ 12 | 13 | declare(strict_types=1); 14 | 15 | namespace Ramsey\Uuid\Validator; 16 | 17 | /** 18 | * A validator validates a string as a proper UUID 19 | * 20 | * @psalm-immutable 21 | */ 22 | interface ValidatorInterface 23 | { 24 | /** 25 | * Returns the regular expression pattern used by this validator 26 | * 27 | * @return string The regular expression pattern this validator uses 28 | * 29 | * @psalm-return non-empty-string 30 | */ 31 | public function getPattern(): string; 32 | 33 | /** 34 | * Returns true if the provided string represents a UUID 35 | * 36 | * @param string $uuid The string to validate as a UUID 37 | * 38 | * @return bool True if the string is a valid UUID, false otherwise 39 | */ 40 | public function validate(string $uuid): bool; 41 | } 42 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/Arguments/ReduceArgumentPayloadAction.php: -------------------------------------------------------------------------------- 1 | argumentReducers = $argumentReducers; 16 | } 17 | 18 | public function reduce($argument, bool $includeObjectType = false): ReducedArgument 19 | { 20 | foreach ($this->argumentReducers->argumentReducers as $reducer) { 21 | $reduced = $reducer->execute($argument); 22 | 23 | if ($reduced instanceof ReducedArgument) { 24 | return $reduced; 25 | } 26 | } 27 | 28 | if (gettype($argument) === 'object' && $includeObjectType) { 29 | return new ReducedArgument( 30 | 'object ('.get_class($argument).')', 31 | get_debug_type($argument), 32 | ); 33 | } 34 | 35 | if (gettype($argument) === 'object') { 36 | return new ReducedArgument('object', get_debug_type($argument), ); 37 | } 38 | 39 | return new ReducedArgument( 40 | $argument, 41 | get_debug_type($argument), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/Arguments/ReducedArgument/ReducedArgument.php: -------------------------------------------------------------------------------- 1 | originalType = $originalType; 21 | $this->value = $value; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/Arguments/ReducedArgument/ReducedArgumentContract.php: -------------------------------------------------------------------------------- 1 | $item) { 12 | if (! $item instanceof ReducedArgument) { 13 | throw new Exception('VariadicReducedArgument must be an array of ReducedArgument'); 14 | } 15 | 16 | $value[$key] = $item->value; 17 | } 18 | 19 | parent::__construct($value, 'array'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/Arguments/Reducers/ArgumentReducer.php: -------------------------------------------------------------------------------- 1 | getFileName() && $reflection->getStartLine() && $reflection->getEndLine()) { 22 | return new ReducedArgument( 23 | "{$reflection->getFileName()}:{$reflection->getStartLine()}-{$reflection->getEndLine()}", 24 | 'Closure' 25 | ); 26 | } 27 | 28 | return new ReducedArgument("{$reflection->getFileName()}", 'Closure'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/Arguments/Reducers/DateTimeArgumentReducer.php: -------------------------------------------------------------------------------- 1 | format('d M Y H:i:s e'), 20 | get_class($argument), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/Arguments/Reducers/DateTimeZoneArgumentReducer.php: -------------------------------------------------------------------------------- 1 | getName(), 20 | get_class($argument), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/Arguments/Reducers/EnumArgumentReducer.php: -------------------------------------------------------------------------------- 1 | name, 20 | get_class($argument), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/Arguments/Reducers/MinimalArrayArgumentReducer.php: -------------------------------------------------------------------------------- 1 | getValue()).')', 20 | get_class($argument) 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/Arguments/Reducers/StdClassArgumentReducer.php: -------------------------------------------------------------------------------- 1 | getMethod()} {$argument->getUri()}", 20 | get_class($argument), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/CodeSnippets/FileSnippetProvider.php: -------------------------------------------------------------------------------- 1 | file = new SplFileObject($path); 15 | } 16 | 17 | public function numberOfLines(): int 18 | { 19 | $this->file->seek(PHP_INT_MAX); 20 | 21 | return $this->file->key() + 1; 22 | } 23 | 24 | public function getLine(?int $lineNumber = null): string 25 | { 26 | if (is_null($lineNumber)) { 27 | return $this->getNextLine(); 28 | } 29 | 30 | $this->file->seek($lineNumber - 1); 31 | 32 | return $this->file->current(); 33 | } 34 | 35 | public function getNextLine(): string 36 | { 37 | $this->file->next(); 38 | 39 | return $this->file->current(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/CodeSnippets/LaravelSerializableClosureSnippetProvider.php: -------------------------------------------------------------------------------- 1 | */ 8 | protected $lines; 9 | 10 | /** @var int */ 11 | protected $counter = 0; 12 | 13 | public function __construct(string $snippet) 14 | { 15 | $this->lines = preg_split("/\r\n|\n|\r/", $snippet); 16 | 17 | $this->cleanupLines(); 18 | } 19 | 20 | public function numberOfLines(): int 21 | { 22 | return count($this->lines); 23 | } 24 | 25 | public function getLine(?int $lineNumber = null): string 26 | { 27 | if (is_null($lineNumber)) { 28 | return $this->getNextLine(); 29 | } 30 | 31 | $this->counter = $lineNumber - 1; 32 | 33 | return $this->lines[$lineNumber - 1]; 34 | } 35 | 36 | public function getNextLine(): string 37 | { 38 | $this->counter++; 39 | 40 | if ($this->counter >= count($this->lines)) { 41 | return ''; 42 | } 43 | 44 | return $this->lines[$this->counter]; 45 | } 46 | 47 | protected function cleanupLines(): void 48 | { 49 | $spacesOrTabsToRemove = PHP_INT_MAX; 50 | 51 | for ($i = 1; $i < count($this->lines); $i++) { 52 | if (empty($this->lines[$i])) { 53 | continue; 54 | } 55 | 56 | $spacesOrTabsToRemove = min(strspn($this->lines[$i], " \t"), $spacesOrTabsToRemove); 57 | } 58 | 59 | if ($spacesOrTabsToRemove === PHP_INT_MAX) { 60 | $spacesOrTabsToRemove = 0; 61 | } 62 | 63 | for ($i = 1; $i < count($this->lines); $i++) { 64 | $this->lines[$i] = substr($this->lines[$i], $spacesOrTabsToRemove); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/CodeSnippets/NullSnippetProvider.php: -------------------------------------------------------------------------------- 1 | getNextLine(); 15 | } 16 | 17 | public function getNextLine(): string 18 | { 19 | return "File not found for code snippet"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/spatie/backtrace/src/CodeSnippets/SnippetProvider.php: -------------------------------------------------------------------------------- 1 | " 6 | exit 1 7 | fi 8 | 9 | # Execute the Rector command with the provided target 10 | vendor/bin/rector process "$1" --config vendor/spatie/ray/remove-ray-rector.php 11 | -------------------------------------------------------------------------------- /vendor/spatie/ray/phpstan-baseline.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | ignoreErrors: 3 | - 4 | message: "#^Function app not found\\.$#" 5 | count: 1 6 | path: src/helpers.php 7 | 8 | - 9 | message: "#^Instantiated class Spatie\\\\RayBundle\\\\Ray not found\\.$#" 10 | count: 1 11 | path: src/helpers.php 12 | 13 | - 14 | message: "#^Instantiated class Spatie\\\\WordPressRay\\\\Ray not found\\.$#" 15 | count: 1 16 | path: src/helpers.php 17 | -------------------------------------------------------------------------------- /vendor/spatie/ray/remove-ray-rector.php: -------------------------------------------------------------------------------- 1 | rule(RemoveRayCallRector::class); 8 | }; 9 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/ArgumentConverter.php: -------------------------------------------------------------------------------- 1 | cloneVar($argument); 33 | 34 | return $dumper->dump($clonedArgument, true); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Concerns/RayColors.php: -------------------------------------------------------------------------------- 1 | color('green'); 11 | } 12 | 13 | public function orange(): self 14 | { 15 | return $this->color('orange'); 16 | } 17 | 18 | public function red(): self 19 | { 20 | return $this->color('red'); 21 | } 22 | 23 | public function purple(): self 24 | { 25 | return $this->color('purple'); 26 | } 27 | 28 | public function blue(): self 29 | { 30 | return $this->color('blue'); 31 | } 32 | 33 | public function gray(): self 34 | { 35 | return $this->color('gray'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Concerns/RayScreenColors.php: -------------------------------------------------------------------------------- 1 | screenColor('green'); 11 | } 12 | 13 | public function screenOrange(): self 14 | { 15 | return $this->screenColor('orange'); 16 | } 17 | 18 | public function screenRed(): self 19 | { 20 | return $this->screenColor('red'); 21 | } 22 | 23 | public function screenPurple(): self 24 | { 25 | return $this->screenColor('purple'); 26 | } 27 | 28 | public function screenBlue(): self 29 | { 30 | return $this->screenColor('blue'); 31 | } 32 | 33 | public function screenGray(): self 34 | { 35 | return $this->screenColor('gray'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Concerns/RaySizes.php: -------------------------------------------------------------------------------- 1 | size('sm'); 11 | } 12 | 13 | public function large(): self 14 | { 15 | return $this->size('lg'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Concerns/RemovesRayFrames.php: -------------------------------------------------------------------------------- 1 | isRayFrame($frame); 13 | }); 14 | 15 | return array_values($frames); 16 | } 17 | 18 | protected function isRayFrame(Frame $frame): bool 19 | { 20 | foreach ($this->rayNamespaces() as $rayNamespace) { 21 | if (substr((string)$frame->class, 0, strlen($rayNamespace)) === $rayNamespace) { 22 | return true; 23 | } 24 | } 25 | 26 | return false; 27 | } 28 | 29 | protected function rayNamespaces(): array 30 | { 31 | return [ 32 | 'Spatie\Ray', 33 | 'Spatie\LaravelRay', 34 | 'Spatie\WordPressRay', 35 | ]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Exceptions/CouldNotConnectToRay.php: -------------------------------------------------------------------------------- 1 | file = $file; 24 | 25 | $this->lineNumber = $lineNumber; 26 | 27 | $this->hostname = $hostname ?? Hostname::get(); 28 | } 29 | 30 | public function toArray(): array 31 | { 32 | return [ 33 | 'file' => $this->file, 34 | 'line_number' => $this->lineNumber, 35 | 'hostname' => $this->hostname, 36 | ]; 37 | } 38 | 39 | public function fingerPrint(): string 40 | { 41 | return md5(print_r($this->toArray(), true)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Origin/OriginFactory.php: -------------------------------------------------------------------------------- 1 | name, 'getParts')) { 25 | if ($node->name->parts[0] !== 'ray') { 26 | return []; 27 | } 28 | } else { 29 | if ($node->name->getParts()[0] !== 'ray') { 30 | return []; 31 | } 32 | } 33 | 34 | return [ 35 | RuleErrorBuilder::message('Remaining ray call in application code') 36 | ->build(), 37 | ]; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/PayloadFactory.php: -------------------------------------------------------------------------------- 1 | getPayloads(); 23 | } 24 | 25 | public static function registerPayloadFinder(callable $callable) 26 | { 27 | self::$payloadFinder = $callable; 28 | } 29 | 30 | public function __construct(array $values) 31 | { 32 | $this->values = $values; 33 | } 34 | 35 | public function getPayloads(): array 36 | { 37 | return array_map(function ($value) { 38 | return $this->getPayload($value); 39 | }, $this->values); 40 | } 41 | 42 | protected function getPayload($value): Payload 43 | { 44 | if (self::$payloadFinder) { 45 | if ($payload = (static::$payloadFinder)($value)) { 46 | return $payload; 47 | } 48 | } 49 | 50 | if (is_bool($value)) { 51 | return new BoolPayload($value); 52 | } 53 | 54 | if (is_null($value)) { 55 | return new NullPayload(); 56 | } 57 | 58 | if ($value instanceof CarbonInterface) { 59 | return new CarbonPayload($value); 60 | } 61 | 62 | $primitiveValue = ArgumentConverter::convertToPrimitive($value); 63 | 64 | return new LogPayload($primitiveValue, $value); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/ApplicationLogPayload.php: -------------------------------------------------------------------------------- 1 | value = $value; 18 | $this->context = $context; 19 | } 20 | 21 | public function getType(): string 22 | { 23 | return 'application_log'; 24 | } 25 | 26 | public function getContent(): array 27 | { 28 | $content = [ 29 | 'value' => $this->value, 30 | ]; 31 | 32 | if (count($this->context)) { 33 | $content['context'] = ArgumentConverter::convertToPrimitive($this->context); 34 | } 35 | 36 | return $content; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/BoolPayload.php: -------------------------------------------------------------------------------- 1 | bool = $bool; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'custom'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'content' => $this->bool, 24 | 'label' => 'Boolean', 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/CallerPayload.php: -------------------------------------------------------------------------------- 1 | frames = $this->removeRayFrames($frames); 18 | } 19 | 20 | public function getType(): string 21 | { 22 | return 'caller'; 23 | } 24 | 25 | public function getContent(): array 26 | { 27 | $frames = array_slice($this->frames, 1, 1); 28 | 29 | /** @var Frame $frame */ 30 | $frame = array_values($frames)[0]; 31 | 32 | return [ 33 | 'frame' => [ 34 | 'file_name' => $this->replaceRemotePathWithLocalPath($frame->file), 35 | 'line_number' => $frame->lineNumber, 36 | 'class' => $frame->class, 37 | 'method' => $frame->method, 38 | 'vendor_frame' => ! $frame->applicationFrame, 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/CarbonPayload.php: -------------------------------------------------------------------------------- 1 | carbon = $carbon; 18 | 19 | $this->format = $format; 20 | } 21 | 22 | public function getType(): string 23 | { 24 | return 'carbon'; 25 | } 26 | 27 | public function getContent(): array 28 | { 29 | return [ 30 | 'formatted' => $this->carbon ? $this->carbon->format($this->format) : null, 31 | 'timestamp' => $this->carbon ? $this->carbon->timestamp : null, 32 | 'timezone' => $this->carbon ? $this->carbon->timezone->getName() : null, 33 | ]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/ClearAllPayload.php: -------------------------------------------------------------------------------- 1 | color = $color; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'color'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'color' => $this->color, 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/ConfettiPayload.php: -------------------------------------------------------------------------------- 1 | name = $name; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'create_lock'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'name' => $this->name, 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/CustomPayload.php: -------------------------------------------------------------------------------- 1 | content = $content; 16 | 17 | $this->label = $label; 18 | } 19 | 20 | public function getType(): string 21 | { 22 | return 'custom'; 23 | } 24 | 25 | public function getContent(): array 26 | { 27 | return [ 28 | 'content' => $this->content, 29 | 'label' => $this->label, 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/DecodedJsonPayload.php: -------------------------------------------------------------------------------- 1 | value = $value; 15 | } 16 | 17 | public function getType(): string 18 | { 19 | return 'custom'; 20 | } 21 | 22 | public function getContent(): array 23 | { 24 | $decodedJson = json_decode($this->value, true); 25 | 26 | return [ 27 | 'content' => ArgumentConverter::convertToPrimitive($decodedJson), 28 | 'label' => '', 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/ExceptionPayload.php: -------------------------------------------------------------------------------- 1 | exception = $exception; 20 | 21 | $this->meta = $meta; 22 | } 23 | 24 | public function getType(): string 25 | { 26 | return 'exception'; 27 | } 28 | 29 | public function getContent(): array 30 | { 31 | Backtrace::createForThrowable($this->exception); 32 | 33 | return [ 34 | 'class' => get_class($this->exception), 35 | 'message' => $this->exception->getMessage(), 36 | 'frames' => $this->getFrames(), 37 | 'meta' => $this->meta, 38 | ]; 39 | } 40 | 41 | protected function getFrames(): array 42 | { 43 | $frames = Backtrace::createForThrowable($this->exception)->frames(); 44 | 45 | return array_map(function (Frame $frame) { 46 | return [ 47 | 'file_name' => $this->replaceRemotePathWithLocalPath($frame->file), 48 | 'line_number' => $frame->lineNumber, 49 | 'class' => $frame->class, 50 | 'method' => $frame->method, 51 | 'vendor_frame' => ! $frame->applicationFrame, 52 | 'snippet' => $frame->getSnippetProperties(12), 53 | ]; 54 | }, $frames); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/ExpandPayload.php: -------------------------------------------------------------------------------- 1 | level = max($this->level, $value); 18 | 19 | continue; 20 | } 21 | 22 | $this->keys[] = $value; 23 | } 24 | } 25 | 26 | public function getType(): string 27 | { 28 | return 'expand'; 29 | } 30 | 31 | public function getContent(): array 32 | { 33 | return [ 34 | 'keys' => $this->keys, 35 | 'level' => $this->level, 36 | ]; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/FileContentsPayload.php: -------------------------------------------------------------------------------- 1 | file = $file; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'custom'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | if (! file_exists($this->file)) { 23 | return [ 24 | 'content' => "File not found: '{$this->file}'", 25 | 'label' => 'File', 26 | ]; 27 | } 28 | 29 | $contents = file_get_contents($this->file); 30 | 31 | return [ 32 | 'content' => $this->encodeContent($contents), 33 | 'label' => basename($this->file), 34 | ]; 35 | } 36 | 37 | protected function encodeContent(string $content): string 38 | { 39 | $result = htmlentities($content, ENT_QUOTES | ENT_SUBSTITUTE); 40 | 41 | // using nl2br() causes tests to fail on Windows, so use
only 42 | return str_replace(PHP_EOL, '
', $result); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/HideAppPayload.php: -------------------------------------------------------------------------------- 1 | html = $html; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'custom'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'content' => $this->html, 24 | 'label' => 'HTML', 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/ImagePayload.php: -------------------------------------------------------------------------------- 1 | location = $location; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'custom'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | if (file_exists($this->location)) { 23 | $this->location = 'file://' . $this->location; 24 | } 25 | 26 | if ($this->hasBase64Data()) { 27 | $this->location = $this->getLocationForBase64Data(); 28 | } 29 | 30 | $location = str_replace('"', '', $this->location); 31 | 32 | return [ 33 | 'content' => "\"\"", 34 | 'label' => 'Image', 35 | ]; 36 | } 37 | 38 | protected function stripDataPrefix(string $data): string 39 | { 40 | return preg_replace('~^data:image/[a-z]+;base64,~', '', $data); 41 | } 42 | 43 | protected function hasBase64Data(): bool 44 | { 45 | $data = $this->stripDataPrefix($this->location); 46 | 47 | return base64_encode(base64_decode($data, true)) === $data; 48 | } 49 | 50 | protected function getLocationForBase64Data(): string 51 | { 52 | return 'data:image/png;base64,' . $this->stripDataPrefix($this->location); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/JsonStringPayload.php: -------------------------------------------------------------------------------- 1 | value = $value; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'json_string'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'value' => json_encode($this->value), 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/LabelPayload.php: -------------------------------------------------------------------------------- 1 | label = $label; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'label'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'label' => $this->label, 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/LogPayload.php: -------------------------------------------------------------------------------- 1 | = 11111111111111111) { 30 | $values = (string) $values; 31 | } 32 | 33 | $values = [$values]; 34 | } 35 | 36 | $this->meta = [ 37 | [ 38 | 'clipboard_data' => substr($this->getClipboardData($rawValues), 0, 20000), 39 | ], 40 | ]; 41 | 42 | $this->values = $values; 43 | } 44 | 45 | public function getType(): string 46 | { 47 | return 'log'; 48 | } 49 | 50 | public function getContent(): array 51 | { 52 | return [ 53 | 'values' => $this->values, 54 | 'meta' => $this->meta, 55 | ]; 56 | } 57 | 58 | protected function getClipboardData($value): string 59 | { 60 | if (is_string($value) || is_numeric($value)) { 61 | return (string) $value; 62 | } 63 | 64 | try { 65 | return PlainTextDumper::dump($value); 66 | } catch (Exception $ex) { 67 | return ''; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/NewScreenPayload.php: -------------------------------------------------------------------------------- 1 | name = $name; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'new_screen'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'name' => $this->name, 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/NotifyPayload.php: -------------------------------------------------------------------------------- 1 | text = $text; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'notify'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'value' => $this->text, 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/NullPayload.php: -------------------------------------------------------------------------------- 1 | null, 19 | 'label' => 'Null', 20 | ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/Payload.php: -------------------------------------------------------------------------------- 1 | remotePath) || is_null($this->localPath)) { 24 | return $filePath; 25 | } 26 | 27 | $pattern = '~^' . preg_quote($this->remotePath, '~') . '~'; 28 | 29 | return preg_replace($pattern, $this->localPath, $filePath); 30 | } 31 | 32 | public function getContent(): array 33 | { 34 | return []; 35 | } 36 | 37 | public function toArray(): array 38 | { 39 | return [ 40 | 'type' => $this->getType(), 41 | 'content' => $this->getContent(), 42 | 'origin' => $this->getOrigin()->toArray(), 43 | ]; 44 | } 45 | 46 | public function toJson(): string 47 | { 48 | return json_encode($this->toArray()); 49 | } 50 | 51 | protected function getOrigin(): Origin 52 | { 53 | /** @var \Spatie\Ray\Origin\OriginFactory $originFactory */ 54 | $originFactory = new static::$originFactoryClass(); 55 | 56 | $origin = $originFactory->getOrigin(); 57 | 58 | $origin->file = $this->replaceRemotePathWithLocalPath($origin->file); 59 | 60 | return $origin; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/PhpInfoPayload.php: -------------------------------------------------------------------------------- 1 | properties = $properties; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'table'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | $values = array_flip($this->properties); 23 | 24 | foreach ($values as $property => $value) { 25 | $values[$property] = ini_get($property); 26 | } 27 | 28 | if (empty($values)) { 29 | $values = [ 30 | 'PHP version' => phpversion(), 31 | 'Memory limit' => ini_get('memory_limit'), 32 | 'Max file upload size' => ini_get('max_file_uploads'), 33 | 'Max post size' => ini_get('post_max_size'), 34 | 'PHP ini file' => php_ini_loaded_file(), 35 | "PHP scanned ini file" => php_ini_scanned_files(), 36 | 'Extensions' => implode(', ', get_loaded_extensions()), 37 | ]; 38 | } 39 | 40 | return [ 41 | 'values' => $values, 42 | 'label' => 'PHPInfo', 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/RemovePayload.php: -------------------------------------------------------------------------------- 1 | color = $color; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'screen_color'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'color' => $this->color, 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/SeparatorPayload.php: -------------------------------------------------------------------------------- 1 | size = $size; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'size'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'size' => $this->size, 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/TablePayload.php: -------------------------------------------------------------------------------- 1 | values = $values; 18 | 19 | $this->label = $label; 20 | } 21 | 22 | public function getType(): string 23 | { 24 | return 'table'; 25 | } 26 | 27 | public function getContent(): array 28 | { 29 | $values = array_map(function ($value) { 30 | return ArgumentConverter::convertToPrimitive($value); 31 | }, $this->values); 32 | 33 | return [ 34 | 'values' => $values, 35 | 'label' => $this->label, 36 | ]; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/TextPayload.php: -------------------------------------------------------------------------------- 1 | text = $text; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'custom'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | return [ 23 | 'content' => $this->formatContent(), 24 | 'label' => 'Text', 25 | ]; 26 | } 27 | 28 | protected function formatContent(): string 29 | { 30 | $result = htmlspecialchars($this->text, ENT_QUOTES | ENT_HTML5); 31 | 32 | return str_replace([' ', PHP_EOL], [' ', '
'], $result); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/TracePayload.php: -------------------------------------------------------------------------------- 1 | frames = $this->removeRayFrames($frames); 24 | } 25 | 26 | public function startFromIndex(int $index): self 27 | { 28 | $this->startFromIndex = $index; 29 | 30 | return $this; 31 | } 32 | 33 | public function limit(int $limit): self 34 | { 35 | $this->limit = $limit; 36 | 37 | return $this; 38 | } 39 | 40 | public function getType(): string 41 | { 42 | return 'trace'; 43 | } 44 | 45 | public function getContent(): array 46 | { 47 | $frames = array_map(function (Frame $frame) { 48 | return [ 49 | 'file_name' => $this->replaceRemotePathWithLocalPath($frame->file), 50 | 'line_number' => $frame->lineNumber, 51 | 'class' => $frame->class, 52 | 'method' => $frame->method, 53 | 'vendor_frame' => ! $frame->applicationFrame, 54 | ]; 55 | }, $this->frames); 56 | 57 | if (! is_null($this->limit)) { 58 | $frames = array_slice($frames, $this->startFromIndex ?? 0, $this->limit); 59 | } 60 | 61 | return compact('frames'); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Payloads/XmlPayload.php: -------------------------------------------------------------------------------- 1 | value = $value; 13 | } 14 | 15 | public function getType(): string 16 | { 17 | return 'custom'; 18 | } 19 | 20 | public function getContent(): array 21 | { 22 | $content = $this->formatXmlForDisplay($this->value); 23 | 24 | return [ 25 | 'content' => $content, 26 | 'label' => 'XML', 27 | ]; 28 | } 29 | 30 | protected function formatXmlForDisplay(string $xml): string 31 | { 32 | $content = $this->formatAndIndentXml($xml); 33 | 34 | return $this->encodeXml(trim($content)); 35 | } 36 | 37 | protected function encodeXml(string $xml): string 38 | { 39 | $result = htmlentities($xml); 40 | 41 | return str_replace([PHP_EOL, "\n", ' '], ['
', '
', ' '], $result); 42 | } 43 | 44 | protected function formatAndIndentXml(string $xml): string 45 | { 46 | if (! class_exists(\DOMDocument::class)) { 47 | return $xml; 48 | } 49 | 50 | $dom = new \DOMDocument(); 51 | 52 | $dom->preserveWhiteSpace = false; 53 | $dom->strictErrorChecking = false; 54 | $dom->formatOutput = true; 55 | 56 | if (! $dom->loadXML($xml, LIBXML_NOERROR | LIBXML_NOWARNING)) { 57 | return $xml; 58 | } 59 | 60 | return $dom->saveXML(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Rector/RemoveRayCallRector.php: -------------------------------------------------------------------------------- 1 | expr; 37 | 38 | if (! $expr instanceof FuncCall && ! $expr instanceof MethodCall) { 39 | return null; 40 | } 41 | 42 | if ($this->isName($expr->name, 'ray')) { 43 | return NodeTraverser::REMOVE_NODE; 44 | } 45 | 46 | if ($expr->var->name->parts && in_array('ray', $expr->var->name->parts)) { 47 | return NodeTraverser::REMOVE_NODE; 48 | } 49 | 50 | return null; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Request.php: -------------------------------------------------------------------------------- 1 | uuid = $uuid; 21 | 22 | $this->payloads = $payloads; 23 | 24 | $this->meta = $meta; 25 | } 26 | 27 | public function toArray(): array 28 | { 29 | $payloads = array_map(function (Payload $payload) { 30 | return $payload->toArray(); 31 | }, $this->payloads); 32 | 33 | return [ 34 | 'uuid' => $this->uuid, 35 | 'payloads' => $payloads, 36 | 'meta' => $this->meta, 37 | ]; 38 | } 39 | 40 | public function toJson(): string 41 | { 42 | return json_encode($this->toArray()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Settings/Settings.php: -------------------------------------------------------------------------------- 1 | true, 16 | 'host' => 'localhost', 17 | 'port' => 23517, 18 | 'remote_path' => null, 19 | 'local_path' => null, 20 | 'always_send_raw_values' => false, 21 | ]; 22 | 23 | public function __construct(array $settings) 24 | { 25 | $this->settings = array_merge($this->defaultSettings, $settings); 26 | } 27 | 28 | public function markAsLoadedUsingSettingsFile() 29 | { 30 | $this->loadedUsingSettingsFile = true; 31 | 32 | return $this; 33 | } 34 | 35 | public function setDefaultSettings(array $defaults) 36 | { 37 | foreach ($defaults as $name => $value) { 38 | if ($this->wasLoadedUsingConfigFile($name)) { 39 | $this->settings[$name] = $value; 40 | } 41 | } 42 | 43 | return $this; 44 | } 45 | 46 | protected function wasLoadedUsingConfigFile($name) 47 | { 48 | if (! array_key_exists($name, $this->settings)) { 49 | return true; 50 | } 51 | 52 | if (! $this->loadedUsingSettingsFile) { 53 | return true; 54 | } 55 | 56 | return false; 57 | } 58 | 59 | public function __set(string $name, $value) 60 | { 61 | $this->settings[$name] = $value; 62 | } 63 | 64 | public function __get(string $name) 65 | { 66 | return $this->settings[$name] ?? null; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Support/CacheStore.php: -------------------------------------------------------------------------------- 1 | clock = $clock; 16 | } 17 | 18 | public function hit(): self 19 | { 20 | $this->store[] = $this->clock->now(); 21 | 22 | return $this; 23 | } 24 | 25 | public function clear(): self 26 | { 27 | $this->store = []; 28 | 29 | return $this; 30 | } 31 | 32 | public function count(): int 33 | { 34 | return count($this->store); 35 | } 36 | 37 | public function countLastSecond(): int 38 | { 39 | $amount = 0; 40 | 41 | $lastSecond = $this->clock->now()->modify('-1 second'); 42 | 43 | foreach ($this->store as $key => $item) { 44 | if ($this->isBetween( 45 | $item->getTimestamp(), 46 | $lastSecond->getTimestamp(), 47 | $this->clock->now()->getTimestamp() 48 | ) 49 | ) { 50 | $amount++; 51 | } 52 | } 53 | 54 | return $amount; 55 | } 56 | 57 | protected function isBetween($toCheck, $start, $end): bool 58 | { 59 | return $toCheck >= $start && $toCheck <= $end; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Support/Clock.php: -------------------------------------------------------------------------------- 1 | counters[$name])) { 15 | $this->counters[$name] = [ray(), 0]; 16 | } 17 | 18 | [$ray, $times] = $this->counters[$name]; 19 | 20 | $newTimes = $times + 1; 21 | 22 | $this->counters[$name] = [$ray, $newTimes]; 23 | 24 | return [$ray, $newTimes]; 25 | } 26 | 27 | public function get(string $name): int 28 | { 29 | if (! isset($this->counters[$name])) { 30 | return 0; 31 | } 32 | 33 | return $this->counters[$name][1]; 34 | } 35 | 36 | public function clear(): void 37 | { 38 | $this->counters = []; 39 | } 40 | 41 | public function setRay(string $name, Ray $ray): void 42 | { 43 | $this->counters[$name][0] = $ray; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Support/IgnoredValue.php: -------------------------------------------------------------------------------- 1 | obj = $obj; 17 | $this->reflected = new ReflectionClass($obj); 18 | $this->ray = $ray; 19 | } 20 | 21 | public function __get(string $name): Ray 22 | { 23 | $property = $this->reflected->getProperty($name); 24 | 25 | $property->setAccessible(true); 26 | 27 | $value = $property->getValue($this->obj); 28 | 29 | return $this->ray->send($value); 30 | } 31 | 32 | public function __call(string $name, array $params = []): Ray 33 | { 34 | $method = $this->reflected->getMethod($name); 35 | 36 | $method->setAccessible(true); 37 | 38 | $result = $method->invoke($this->obj, ...$params); 39 | 40 | return $this->ray->send($result); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Support/Limiters.php: -------------------------------------------------------------------------------- 1 | counters[$origin->fingerPrint()])) { 15 | $this->counters[$origin->fingerPrint()] = [0, $limit]; 16 | } 17 | 18 | return $this->counters[$origin->fingerPrint()]; 19 | } 20 | 21 | public function increment(Origin $origin): array 22 | { 23 | $name = $origin->fingerPrint(); 24 | 25 | if (! isset($this->counters[$name])) { 26 | return [false, false]; 27 | } 28 | 29 | [$times, $limit] = $this->counters[$name]; 30 | 31 | $newTimes = $times + 1; 32 | 33 | $this->counters[$name] = [$newTimes, $limit]; 34 | 35 | return [$newTimes, $limit]; 36 | } 37 | 38 | public function canSendPayload(Origin $origin): bool 39 | { 40 | $name = $origin->fingerPrint(); 41 | 42 | if (! isset($this->counters[$name])) { 43 | return true; 44 | } 45 | 46 | [$times, $limit] = $this->counters[$name]; 47 | 48 | return $times < $limit || $limit <= 0; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/spatie/ray/src/Support/SystemClock.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | if (!function_exists('trigger_deprecation')) { 13 | /** 14 | * Triggers a silenced deprecation notice. 15 | * 16 | * @param string $package The name of the Composer package that is triggering the deprecation 17 | * @param string $version The version of the package that introduced the deprecation 18 | * @param string $message The message of the deprecation 19 | * @param mixed ...$args Values to insert in the message using printf() formatting 20 | * 21 | * @author Nicolas Grekas 22 | */ 23 | function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void 24 | { 25 | @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-ctype/bootstrap.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Ctype as p; 13 | 14 | if (\PHP_VERSION_ID >= 80000) { 15 | return require __DIR__.'/bootstrap80.php'; 16 | } 17 | 18 | if (!function_exists('ctype_alnum')) { 19 | function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } 20 | } 21 | if (!function_exists('ctype_alpha')) { 22 | function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } 23 | } 24 | if (!function_exists('ctype_cntrl')) { 25 | function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } 26 | } 27 | if (!function_exists('ctype_digit')) { 28 | function ctype_digit($text) { return p\Ctype::ctype_digit($text); } 29 | } 30 | if (!function_exists('ctype_graph')) { 31 | function ctype_graph($text) { return p\Ctype::ctype_graph($text); } 32 | } 33 | if (!function_exists('ctype_lower')) { 34 | function ctype_lower($text) { return p\Ctype::ctype_lower($text); } 35 | } 36 | if (!function_exists('ctype_print')) { 37 | function ctype_print($text) { return p\Ctype::ctype_print($text); } 38 | } 39 | if (!function_exists('ctype_punct')) { 40 | function ctype_punct($text) { return p\Ctype::ctype_punct($text); } 41 | } 42 | if (!function_exists('ctype_space')) { 43 | function ctype_space($text) { return p\Ctype::ctype_space($text); } 44 | } 45 | if (!function_exists('ctype_upper')) { 46 | function ctype_upper($text) { return p\Ctype::ctype_upper($text); } 47 | } 48 | if (!function_exists('ctype_xdigit')) { 49 | function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-ctype/bootstrap80.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Ctype as p; 13 | 14 | if (!function_exists('ctype_alnum')) { 15 | function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); } 16 | } 17 | if (!function_exists('ctype_alpha')) { 18 | function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); } 19 | } 20 | if (!function_exists('ctype_cntrl')) { 21 | function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); } 22 | } 23 | if (!function_exists('ctype_digit')) { 24 | function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); } 25 | } 26 | if (!function_exists('ctype_graph')) { 27 | function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); } 28 | } 29 | if (!function_exists('ctype_lower')) { 30 | function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); } 31 | } 32 | if (!function_exists('ctype_print')) { 33 | function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); } 34 | } 35 | if (!function_exists('ctype_punct')) { 36 | function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); } 37 | } 38 | if (!function_exists('ctype_space')) { 39 | function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); } 40 | } 41 | if (!function_exists('ctype_upper')) { 42 | function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); } 43 | } 44 | if (!function_exists('ctype_xdigit')) { 45 | function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); } 46 | } 47 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php: -------------------------------------------------------------------------------- 1 | flags = $flags; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Php80 as p; 13 | 14 | if (\PHP_VERSION_ID >= 80000) { 15 | return; 16 | } 17 | 18 | if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) { 19 | define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN); 20 | } 21 | 22 | if (!function_exists('fdiv')) { 23 | function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); } 24 | } 25 | if (!function_exists('preg_last_error_msg')) { 26 | function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); } 27 | } 28 | if (!function_exists('str_contains')) { 29 | function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); } 30 | } 31 | if (!function_exists('str_starts_with')) { 32 | function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); } 33 | } 34 | if (!function_exists('str_ends_with')) { 35 | function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); } 36 | } 37 | if (!function_exists('get_debug_type')) { 38 | function get_debug_type($value): string { return p\Php80::get_debug_type($value); } 39 | } 40 | if (!function_exists('get_resource_id')) { 41 | function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php81/Php81.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Polyfill\Php81; 13 | 14 | /** 15 | * @author Nicolas Grekas 16 | * 17 | * @internal 18 | */ 19 | final class Php81 20 | { 21 | public static function array_is_list(array $array): bool 22 | { 23 | if ([] === $array || $array === array_values($array)) { 24 | return true; 25 | } 26 | 27 | $nextKey = -1; 28 | 29 | foreach ($array as $k => $v) { 30 | if ($k !== ++$nextKey) { 31 | return false; 32 | } 33 | } 34 | 35 | return true; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | use Symfony\Polyfill\Php81 as p; 13 | 14 | if (\PHP_VERSION_ID >= 80100) { 15 | return; 16 | } 17 | 18 | if (defined('MYSQLI_REFRESH_SLAVE') && !defined('MYSQLI_REFRESH_REPLICA')) { 19 | define('MYSQLI_REFRESH_REPLICA', 64); 20 | } 21 | 22 | if (!function_exists('array_is_list')) { 23 | function array_is_list(array $array): bool { return p\Php81::array_is_list($array); } 24 | } 25 | 26 | if (!function_exists('enum_exists')) { 27 | function enum_exists(string $enum, bool $autoload = true): bool { return $autoload && class_exists($enum) && false; } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/Attribute/Required.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service\Attribute; 13 | 14 | /** 15 | * A required dependency. 16 | * 17 | * This attribute indicates that a property holds a required dependency. The annotated property or method should be 18 | * considered during the instantiation process of the containing class. 19 | * 20 | * @author Alexander M. Turek 21 | */ 22 | #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] 23 | final class Required 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/Attribute/SubscribedService.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service\Attribute; 13 | 14 | use Symfony\Contracts\Service\ServiceMethodsSubscriberTrait; 15 | use Symfony\Contracts\Service\ServiceSubscriberInterface; 16 | 17 | /** 18 | * For use as the return value for {@see ServiceSubscriberInterface}. 19 | * 20 | * @example new SubscribedService('http_client', HttpClientInterface::class, false, new Target('githubApi')) 21 | * 22 | * Use with {@see ServiceMethodsSubscriberTrait} to mark a method's return type 23 | * as a subscribed service. 24 | * 25 | * @author Kevin Bond 26 | */ 27 | #[\Attribute(\Attribute::TARGET_METHOD)] 28 | final class SubscribedService 29 | { 30 | /** @var object[] */ 31 | public array $attributes; 32 | 33 | /** 34 | * @param string|null $key The key to use for the service 35 | * @param class-string|null $type The service class 36 | * @param bool $nullable Whether the service is optional 37 | * @param object|object[] $attributes One or more dependency injection attributes to use 38 | */ 39 | public function __construct( 40 | public ?string $key = null, 41 | public ?string $type = null, 42 | public bool $nullable = false, 43 | array|object $attributes = [], 44 | ) { 45 | $this->attributes = \is_array($attributes) ? $attributes : [$attributes]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/ResetInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service; 13 | 14 | /** 15 | * Provides a way to reset an object to its initial state. 16 | * 17 | * When calling the "reset()" method on an object, it should be put back to its 18 | * initial state. This usually means clearing any internal buffers and forwarding 19 | * the call to internal dependencies. All properties of the object should be put 20 | * back to the same state it had when it was first ready to use. 21 | * 22 | * This method could be called, for example, to recycle objects that are used as 23 | * services, so that they can be used to handle several requests in the same 24 | * process loop (note that we advise making your services stateless instead of 25 | * implementing this interface when possible.) 26 | */ 27 | interface ResetInterface 28 | { 29 | /** 30 | * @return void 31 | */ 32 | public function reset(); 33 | } 34 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/ServiceCollectionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service; 13 | 14 | /** 15 | * A ServiceProviderInterface that is also countable and iterable. 16 | * 17 | * @author Kevin Bond 18 | * 19 | * @template-covariant T of mixed 20 | * 21 | * @extends ServiceProviderInterface 22 | * @extends \IteratorAggregate 23 | */ 24 | interface ServiceCollectionInterface extends ServiceProviderInterface, \Countable, \IteratorAggregate 25 | { 26 | } 27 | -------------------------------------------------------------------------------- /vendor/symfony/service-contracts/ServiceProviderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Contracts\Service; 13 | 14 | use Psr\Container\ContainerInterface; 15 | 16 | /** 17 | * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container. 18 | * 19 | * @author Nicolas Grekas 20 | * @author Mateusz Sip 21 | * 22 | * @template-covariant T of mixed 23 | */ 24 | interface ServiceProviderInterface extends ContainerInterface 25 | { 26 | /** 27 | * @return T 28 | */ 29 | public function get(string $id): mixed; 30 | 31 | public function has(string $id): bool; 32 | 33 | /** 34 | * Returns an associative array of service types keyed by the identifiers provided by the current container. 35 | * 36 | * Examples: 37 | * 38 | * * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface 39 | * * ['foo' => '?'] means the container provides service name "foo" of unspecified type 40 | * * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null 41 | * 42 | * @return array The provided service types, keyed by service names 43 | */ 44 | public function getProvidedServices(): array; 45 | } 46 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/ConstStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Stub; 15 | 16 | /** 17 | * Represents a PHP constant and its value. 18 | * 19 | * @author Nicolas Grekas 20 | */ 21 | class ConstStub extends Stub 22 | { 23 | public function __construct(string $name, string|int|float|null $value = null) 24 | { 25 | $this->class = $name; 26 | $this->value = 1 < \func_num_args() ? $value : $name; 27 | } 28 | 29 | public function __toString(): string 30 | { 31 | return (string) $this->value; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/CutArrayStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | /** 15 | * Represents a cut array. 16 | * 17 | * @author Nicolas Grekas 18 | */ 19 | class CutArrayStub extends CutStub 20 | { 21 | public array $preservedSubset; 22 | 23 | public function __construct(array $value, array $preservedKeys) 24 | { 25 | parent::__construct($value); 26 | 27 | $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); 28 | $this->cut -= \count($this->preservedSubset); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/DsPairStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Stub; 15 | 16 | /** 17 | * @author Nicolas Grekas 18 | */ 19 | class DsPairStub extends Stub 20 | { 21 | public function __construct(mixed $key, mixed $value) 22 | { 23 | $this->value = [ 24 | Caster::PREFIX_VIRTUAL.'key' => $key, 25 | Caster::PREFIX_VIRTUAL.'value' => $value, 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/EnumStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Stub; 15 | 16 | /** 17 | * Represents an enumeration of values. 18 | * 19 | * @author Nicolas Grekas 20 | */ 21 | class EnumStub extends Stub 22 | { 23 | public function __construct( 24 | array $values, 25 | public bool $dumpKeys = true, 26 | ) { 27 | $this->value = $values; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/FiberCaster.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Stub; 15 | 16 | /** 17 | * Casts Fiber related classes to array representation. 18 | * 19 | * @author Grégoire Pineau 20 | */ 21 | final class FiberCaster 22 | { 23 | public static function castFiber(\Fiber $fiber, array $a, Stub $stub, bool $isNested, int $filter = 0): array 24 | { 25 | $prefix = Caster::PREFIX_VIRTUAL; 26 | 27 | if ($fiber->isTerminated()) { 28 | $status = 'terminated'; 29 | } elseif ($fiber->isRunning()) { 30 | $status = 'running'; 31 | } elseif ($fiber->isSuspended()) { 32 | $status = 'suspended'; 33 | } elseif ($fiber->isStarted()) { 34 | $status = 'started'; 35 | } else { 36 | $status = 'not started'; 37 | } 38 | 39 | $a[$prefix.'status'] = $status; 40 | 41 | return $a; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/FrameStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | /** 15 | * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace(). 16 | * 17 | * @author Nicolas Grekas 18 | */ 19 | class FrameStub extends EnumStub 20 | { 21 | public function __construct( 22 | array $frame, 23 | public bool $keepArgs = true, 24 | public bool $inTraceStub = false, 25 | ) { 26 | parent::__construct($frame); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/GmpCaster.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Stub; 15 | 16 | /** 17 | * Casts GMP objects to array representation. 18 | * 19 | * @author Hamza Amrouche 20 | * @author Nicolas Grekas 21 | * 22 | * @final 23 | */ 24 | class GmpCaster 25 | { 26 | public static function castGmp(\GMP $gmp, array $a, Stub $stub, bool $isNested, int $filter): array 27 | { 28 | $a[Caster::PREFIX_VIRTUAL.'value'] = new ConstStub(gmp_strval($gmp), gmp_strval($gmp)); 29 | 30 | return $a; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/ImagineCaster.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Imagine\Image\ImageInterface; 15 | use Symfony\Component\VarDumper\Cloner\Stub; 16 | 17 | /** 18 | * @author Grégoire Pineau 19 | */ 20 | final class ImagineCaster 21 | { 22 | public static function castImage(ImageInterface $c, array $a, Stub $stub, bool $isNested): array 23 | { 24 | $imgData = $c->get('png'); 25 | if (\strlen($imgData) > 1 * 1000 * 1000) { 26 | $a += [ 27 | Caster::PREFIX_VIRTUAL.'image' => new ConstStub($c->getSize()), 28 | ]; 29 | } else { 30 | $a += [ 31 | Caster::PREFIX_VIRTUAL.'image' => new ImgStub($imgData, 'image/png', $c->getSize()), 32 | ]; 33 | } 34 | 35 | return $a; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/ImgStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | /** 15 | * @author Grégoire Pineau 16 | */ 17 | class ImgStub extends ConstStub 18 | { 19 | public function __construct(string $data, string $contentType, string $size = '') 20 | { 21 | $this->value = ''; 22 | $this->attr['img-data'] = $data; 23 | $this->attr['img-size'] = $size; 24 | $this->attr['content-type'] = $contentType; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/MysqliCaster.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Stub; 15 | 16 | /** 17 | * @author Nicolas Grekas 18 | * 19 | * @internal 20 | */ 21 | final class MysqliCaster 22 | { 23 | public static function castMysqliDriver(\mysqli_driver $c, array $a, Stub $stub, bool $isNested): array 24 | { 25 | foreach ($a as $k => $v) { 26 | if (isset($c->$k)) { 27 | $a[$k] = $c->$k; 28 | } 29 | } 30 | 31 | return $a; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use ProxyManager\Proxy\ProxyInterface; 15 | use Symfony\Component\VarDumper\Cloner\Stub; 16 | 17 | /** 18 | * @author Nicolas Grekas 19 | * 20 | * @final 21 | */ 22 | class ProxyManagerCaster 23 | { 24 | public static function castProxy(ProxyInterface $c, array $a, Stub $stub, bool $isNested): array 25 | { 26 | if ($parent = get_parent_class($c)) { 27 | $stub->class .= ' - '.$parent; 28 | } 29 | $stub->class .= '@proxy'; 30 | 31 | return $a; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/ScalarStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Stub; 15 | 16 | /** 17 | * Represents any arbitrary value. 18 | * 19 | * @author Alexandre Daubois 20 | */ 21 | class ScalarStub extends Stub 22 | { 23 | public function __construct(mixed $value) 24 | { 25 | $this->value = $value; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/TraceStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Stub; 15 | 16 | /** 17 | * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). 18 | * 19 | * @author Nicolas Grekas 20 | */ 21 | class TraceStub extends Stub 22 | { 23 | public function __construct( 24 | array $trace, 25 | public bool $keepArgs = true, 26 | public int $sliceOffset = 0, 27 | public ?int $sliceLength = null, 28 | public int $numberingOffset = 0, 29 | ) { 30 | $this->value = $trace; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/UninitializedStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | /** 15 | * Represents an uninitialized property. 16 | * 17 | * @author Nicolas Grekas 18 | */ 19 | class UninitializedStub extends ConstStub 20 | { 21 | public function __construct(\ReflectionProperty $property) 22 | { 23 | parent::__construct('?'.($property->hasType() ? ' '.$property->getType() : ''), 'Uninitialized property'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/UuidCaster.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | use Ramsey\Uuid\UuidInterface; 15 | use Symfony\Component\VarDumper\Cloner\Stub; 16 | 17 | /** 18 | * @author Grégoire Pineau 19 | */ 20 | final class UuidCaster 21 | { 22 | public static function castRamseyUuid(UuidInterface $c, array $a, Stub $stub, bool $isNested): array 23 | { 24 | $a += [ 25 | Caster::PREFIX_VIRTUAL.'uuid' => (string) $c, 26 | ]; 27 | 28 | return $a; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Caster/VirtualStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Caster; 13 | 14 | class VirtualStub extends ConstStub 15 | { 16 | public function __construct(\ReflectionProperty $property) 17 | { 18 | parent::__construct('~'.($property->hasType() ? ' '.$property->getType() : ''), 'Virtual property'); 19 | $this->attr['virtual'] = true; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Cloner/ClonerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Cloner; 13 | 14 | /** 15 | * @author Nicolas Grekas 16 | */ 17 | interface ClonerInterface 18 | { 19 | /** 20 | * Clones a PHP variable. 21 | */ 22 | public function cloneVar(mixed $var): Data; 23 | } 24 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Cloner/Cursor.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Cloner; 13 | 14 | /** 15 | * Represents the current state of a dumper while dumping. 16 | * 17 | * @author Nicolas Grekas 18 | */ 19 | class Cursor 20 | { 21 | public const HASH_INDEXED = Stub::ARRAY_INDEXED; 22 | public const HASH_ASSOC = Stub::ARRAY_ASSOC; 23 | public const HASH_OBJECT = Stub::TYPE_OBJECT; 24 | public const HASH_RESOURCE = Stub::TYPE_RESOURCE; 25 | 26 | public int $depth = 0; 27 | public int $refIndex = 0; 28 | public int $softRefTo = 0; 29 | public int $softRefCount = 0; 30 | public int $softRefHandle = 0; 31 | public int $hardRefTo = 0; 32 | public int $hardRefCount = 0; 33 | public int $hardRefHandle = 0; 34 | public int $hashType; 35 | public string|int|null $hashKey = null; 36 | public bool $hashKeyIsBinary; 37 | public int $hashIndex = 0; 38 | public int $hashLength = 0; 39 | public int $hashCut = 0; 40 | public bool $stop = false; 41 | public array $attr = []; 42 | public bool $skipChildren = false; 43 | } 44 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Cloner/Internal/NoDefault.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Cloner\Internal; 13 | 14 | /** 15 | * Flags a typed property that has no default value. 16 | * 17 | * This dummy object is used to distinguish a property with a default value of null 18 | * from a property that is uninitialized by default. 19 | * 20 | * @internal 21 | */ 22 | enum NoDefault 23 | { 24 | case NoDefault; 25 | } 26 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Command\Descriptor; 13 | 14 | use Symfony\Component\Console\Output\OutputInterface; 15 | use Symfony\Component\VarDumper\Cloner\Data; 16 | 17 | /** 18 | * @author Maxime Steinhausser 19 | */ 20 | interface DumpDescriptorInterface 21 | { 22 | public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void; 23 | } 24 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Dumper\ContextProvider; 13 | 14 | /** 15 | * Tries to provide context on CLI. 16 | * 17 | * @author Maxime Steinhausser 18 | */ 19 | final class CliContextProvider implements ContextProviderInterface 20 | { 21 | public function getContext(): ?array 22 | { 23 | if ('cli' !== \PHP_SAPI) { 24 | return null; 25 | } 26 | 27 | return [ 28 | 'command_line' => $commandLine = implode(' ', $_SERVER['argv'] ?? []), 29 | 'identifier' => hash('crc32b', $commandLine.$_SERVER['REQUEST_TIME_FLOAT']), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Dumper\ContextProvider; 13 | 14 | /** 15 | * Interface to provide contextual data about dump data clones sent to a server. 16 | * 17 | * @author Maxime Steinhausser 18 | */ 19 | interface ContextProviderInterface 20 | { 21 | public function getContext(): ?array; 22 | } 23 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Dumper\ContextProvider; 13 | 14 | use Symfony\Component\HttpFoundation\RequestStack; 15 | use Symfony\Component\VarDumper\Caster\ReflectionCaster; 16 | use Symfony\Component\VarDumper\Cloner\VarCloner; 17 | 18 | /** 19 | * Tries to provide context from a request. 20 | * 21 | * @author Maxime Steinhausser 22 | */ 23 | final class RequestContextProvider implements ContextProviderInterface 24 | { 25 | private VarCloner $cloner; 26 | 27 | public function __construct( 28 | private RequestStack $requestStack, 29 | ) { 30 | $this->cloner = new VarCloner(); 31 | $this->cloner->setMaxItems(0); 32 | $this->cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); 33 | } 34 | 35 | public function getContext(): ?array 36 | { 37 | if (null === $request = $this->requestStack->getCurrentRequest()) { 38 | return null; 39 | } 40 | 41 | $controller = $request->attributes->get('_controller'); 42 | 43 | return [ 44 | 'uri' => $request->getUri(), 45 | 'method' => $request->getMethod(), 46 | 'controller' => $controller ? $this->cloner->cloneVar($controller) : $controller, 47 | 'identifier' => spl_object_hash($request), 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Dumper; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Data; 15 | use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; 16 | 17 | /** 18 | * @author Kévin Thérage 19 | */ 20 | class ContextualizedDumper implements DataDumperInterface 21 | { 22 | /** 23 | * @param ContextProviderInterface[] $contextProviders 24 | */ 25 | public function __construct( 26 | private DataDumperInterface $wrappedDumper, 27 | private array $contextProviders, 28 | ) { 29 | } 30 | 31 | public function dump(Data $data): ?string 32 | { 33 | $context = $data->getContext(); 34 | foreach ($this->contextProviders as $contextProvider) { 35 | $context[$contextProvider::class] = $contextProvider->getContext(); 36 | } 37 | 38 | return $this->wrappedDumper->dump($data->withContext($context)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Dumper/DataDumperInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Dumper; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Data; 15 | 16 | /** 17 | * DataDumperInterface for dumping Data objects. 18 | * 19 | * @author Nicolas Grekas 20 | */ 21 | interface DataDumperInterface 22 | { 23 | /** 24 | * @return string|null 25 | */ 26 | public function dump(Data $data); 27 | } 28 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Dumper/ServerDumper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Dumper; 13 | 14 | use Symfony\Component\VarDumper\Cloner\Data; 15 | use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; 16 | use Symfony\Component\VarDumper\Server\Connection; 17 | 18 | /** 19 | * ServerDumper forwards serialized Data clones to a server. 20 | * 21 | * @author Maxime Steinhausser 22 | */ 23 | class ServerDumper implements DataDumperInterface 24 | { 25 | private Connection $connection; 26 | 27 | /** 28 | * @param string $host The server host 29 | * @param DataDumperInterface|null $wrappedDumper A wrapped instance used whenever we failed contacting the server 30 | * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name 31 | */ 32 | public function __construct( 33 | string $host, 34 | private ?DataDumperInterface $wrappedDumper = null, 35 | array $contextProviders = [], 36 | ) { 37 | $this->connection = new Connection($host, $contextProviders); 38 | } 39 | 40 | public function getContextProviders(): array 41 | { 42 | return $this->connection->getContextProviders(); 43 | } 44 | 45 | public function dump(Data $data): ?string 46 | { 47 | if (!$this->connection->write($data) && $this->wrappedDumper) { 48 | return $this->wrappedDumper->dump($data); 49 | } 50 | 51 | return null; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Exception/ThrowingCasterException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\VarDumper\Exception; 13 | 14 | /** 15 | * @author Nicolas Grekas 16 | */ 17 | class ThrowingCasterException extends \Exception 18 | { 19 | /** 20 | * @param \Throwable $prev The exception thrown from the caster 21 | */ 22 | public function __construct(\Throwable $prev) 23 | { 24 | parent::__construct('Unexpected '.$prev::class.' thrown from a caster: '.$prev->getMessage(), 0, $prev); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function() { 2 | let prev = null; 3 | Array.from(document.getElementsByTagName('article')).reverse().forEach(function (article) { 4 | const dedupId = article.dataset.dedupId; 5 | if (dedupId === prev) { 6 | article.getElementsByTagName('header')[0].classList.add('hidden'); 7 | } 8 | prev = dedupId; 9 | }); 10 | }); 11 | --------------------------------------------------------------------------------