repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithCustomCollectionOf.php
tests/Fixtures/Values/BagWithCustomCollectionOf.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Cast; use Bag\Bag; use Bag\Casts\CollectionOf; use Tests\Fixtures\Collections\BagWithCollectionCollection; readonly class BagWithCustomCollectionOf extends Bag { public function __construct( #[Cast(CollectionOf::class, Te...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithUnionTypes.php
tests/Fixtures/Values/BagWithUnionTypes.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; use Tests\Fixtures\Enums\TestBackedEnum; readonly class BagWithUnionTypes extends Bag { public function __construct( public string|TestBackedEnum $name, public string|int $age, public string|bool $email, ) {...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/CastVariadicDatetimeBag.php
tests/Fixtures/Values/CastVariadicDatetimeBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Cast; use Bag\Bag; use Bag\Casts\DateTime; use Carbon\CarbonImmutable; readonly class CastVariadicDatetimeBag extends Bag { public array $values; public function __construct( public string $name, public int $...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithOptionals.php
tests/Fixtures/Values/BagWithOptionals.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; use Bag\Values\Optional; readonly class BagWithOptionals extends Bag { public function __construct( public string $name, public Optional|int $age, public Optional|string|null $email, ) { } }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithMappingAndOptional.php
tests/Fixtures/Values/BagWithMappingAndOptional.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\MapInputName; use Bag\Bag; use Bag\Mappers\SnakeCase; use Bag\Values\Optional; #[MapInputName(SnakeCase::class)] readonly class BagWithMappingAndOptional extends Bag { public function __construct( public string $name, ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/CastVariadicCollectionBag.php
tests/Fixtures/Values/CastVariadicCollectionBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Cast; use Bag\Bag; use Bag\Casts\CollectionOf; use Tests\Fixtures\Collections\BagWithCollectionCollection; readonly class CastVariadicCollectionBag extends Bag { public array $values; public function __construct( pub...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/ValidateUsingAttributesAndRulesMethodBag.php
tests/Fixtures/Values/ValidateUsingAttributesAndRulesMethodBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Validation\Max; use Bag\Attributes\Validation\Required; use Bag\Bag; readonly class ValidateUsingAttributesAndRulesMethodBag extends Bag { public function __construct( #[Required] #[Max(100)] public string...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/OptionalValueBag.php
tests/Fixtures/Values/OptionalValueBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; use Bag\Values\Optional; readonly class OptionalValueBag extends Bag { public function __construct( public Optional|string $name, public Optional|int $age, ) { } }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithCollection.php
tests/Fixtures/Values/BagWithCollection.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Collection; use Bag\Bag; use Tests\Fixtures\Collections\BagWithCollectionCollection; #[Collection(BagWithCollectionCollection::class)] readonly class BagWithCollection extends Bag { public function __construct( public str...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/WrappedJsonBag.php
tests/Fixtures/Values/WrappedJsonBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\WrapJson; use Bag\Bag; #[WrapJson('wrapper')] readonly class WrappedJsonBag extends Bag { public function __construct( public string $name, public int $age, ) { } }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/OptionalBagWithValidation.php
tests/Fixtures/Values/OptionalBagWithValidation.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; use Bag\Validation\Rules\OptionalOr; use Bag\Values\Optional; readonly class OptionalBagWithValidation extends Bag { public function __construct( public string $name, public Optional|int $age, public Optional|st...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithManualSetProperty.php
tests/Fixtures/Values/BagWithManualSetProperty.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; readonly class BagWithManualSetProperty extends Bag { public string $firstName; public string $lastName; public function __construct( public string $fullName, ) { $nameParts = explode(' ', $fullName); ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/ValidateUniqueRuleBag.php
tests/Fixtures/Values/ValidateUniqueRuleBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; readonly class ValidateUniqueRuleBag extends Bag { public function __construct( public string $name, public int $age, public string $email, ) { } public static function rules(): array { ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/MappedPropertyBag.php
tests/Fixtures/Values/MappedPropertyBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\MapName; use Bag\Bag; use Bag\Mappers\CamelCase; use Bag\Mappers\SnakeCase; readonly class MappedPropertyBag extends Bag { public function __construct( #[MapName(input: SnakeCase::class, output: SnakeCase::class)] ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/ValidateExistsRuleBag.php
tests/Fixtures/Values/ValidateExistsRuleBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; readonly class ValidateExistsRuleBag extends Bag { public function __construct( public string $name, public int $age, public string $email, ) { } public static function rules(): array { ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/ComputedPropertyHiddenBag.php
tests/Fixtures/Values/ComputedPropertyHiddenBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Computed; use Bag\Attributes\Hidden; use Bag\Attributes\HiddenFromJson; use Bag\Bag; use Carbon\CarbonImmutable; readonly class ComputedPropertyHiddenBag extends Bag { #[Computed] #[Hidden] #[HiddenFromJson] public Ca...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/ValidateUsingAttributesBag.php
tests/Fixtures/Values/ValidateUsingAttributesBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Validation\Integer; use Bag\Attributes\Validation\Required; use Bag\Attributes\Validation\Str; use Bag\Bag; readonly class ValidateUsingAttributesBag extends Bag { public function __construct( #[Required] #[Str] ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/ObjectToBagPrivate.php
tests/Fixtures/Values/ObjectToBagPrivate.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Bag; use Bag\Traits\HasBag; #[Bag(NullableWithDefaultValueBag::class, Bag::PRIVATE)] class ObjectToBagPrivate { use HasBag; public function __construct( public string $name, protected int $age, privat...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/ValidateUsingRulesMethodBag.php
tests/Fixtures/Values/ValidateUsingRulesMethodBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; readonly class ValidateUsingRulesMethodBag extends Bag { public function __construct( public string $name, public int $age, ) { } public static function rules(): array { return [ 'na...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithRequestParams.php
tests/Fixtures/Values/BagWithRequestParams.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Laravel\FromRouteParameter; use Bag\Attributes\Laravel\FromRouteParameterProperty; use Bag\Bag; use Tests\Fixtures\Models\CastedModel; readonly class BagWithRequestParams extends Bag { public function __construct( #[FromR...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithTransformers.php
tests/Fixtures/Values/BagWithTransformers.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Transforms; use Bag\Bag; use Illuminate\Database\Eloquent\Model; use stdClass; use Tests\Fixtures\Models\TestModel; readonly class BagWithTransformers extends Bag { public function __construct( public string $name, ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/ComputedPropertyMissingBag.php
tests/Fixtures/Values/ComputedPropertyMissingBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Computed; use Bag\Bag; readonly class ComputedPropertyMissingBag extends Bag { #[Computed] public int $dob; public function __construct( public string $name, public int $age, ) { } }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithInvalidFactoryAttribute.php
tests/Fixtures/Values/BagWithInvalidFactoryAttribute.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Factory; use Bag\Bag; use Bag\Traits\HasFactory; #[Factory('InvalidFactoryClass')] readonly class BagWithInvalidFactoryAttribute extends Bag { use HasFactory; }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithArrayTransformer.php
tests/Fixtures/Values/BagWithArrayTransformer.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Transforms; use Bag\Bag; readonly class BagWithArrayTransformer extends Bag { public function __construct( public array $values, ) { } #[Transforms('array')] protected static function fromArray(array|obje...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/CastsInvalidCastBag.php
tests/Fixtures/Values/CastsInvalidCastBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Cast; use Bag\Bag; use Carbon\CarbonImmutable; use DateTime; readonly class CastsInvalidCastBag extends Bag { public function __construct( #[Cast(DateTime::class, format: 'Y-m-d')] public CarbonImmutable $date, ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/TypedVariadicBag.php
tests/Fixtures/Values/TypedVariadicBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; readonly class TypedVariadicBag extends Bag { public array $values; public function __construct( public string $name, public int $age, bool ...$values ) { $this->values = $values; } }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/OptionalPropertiesWithDefaultsBag.php
tests/Fixtures/Values/OptionalPropertiesWithDefaultsBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; readonly class OptionalPropertiesWithDefaultsBag extends Bag { public function __construct( public ?string $name = 'Davey Shafik', public ?int $age = 40, public ?string $email = 'davey@php.net', public ?...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/OptionalNestedBags.php
tests/Fixtures/Values/OptionalNestedBags.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Bag; use Bag\Values\Optional; readonly class OptionalNestedBags extends Bag { public function __construct( public Optional|TestBag $test, public Optional|BagWithSingleArrayParameter $bagWithSingleArrayParameter, ) { ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/CastsDateInputBag.php
tests/Fixtures/Values/CastsDateInputBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\CastInput; use Bag\Bag; use Bag\Casts\DateTime; use Carbon\CarbonImmutable; readonly class CastsDateInputBag extends Bag { public function __construct( #[CastInput(DateTime::class, format: 'Y-m-d')] public CarbonI...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/TypeScriptBag.php
tests/Fixtures/Values/TypeScriptBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\MapOutputName; use Bag\Bag; use Bag\Mappers\SnakeCase; use Bag\Values\Optional; use Spatie\TypeScriptTransformer\Attributes\TypeScript; #[TypeScript] #[MapOutputName(SnakeCase::class)] readonly class TypeScriptBag extends Bag { p...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/CastsDateOutputBag.php
tests/Fixtures/Values/CastsDateOutputBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\CastOutput; use Bag\Bag; use Bag\Casts\DateTime; use Carbon\CarbonImmutable; readonly class CastsDateOutputBag extends Bag { public function __construct( #[CastOutput(DateTime::class, format: 'Y-m-d')] public Carb...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/HiddenJsonParametersBag.php
tests/Fixtures/Values/HiddenJsonParametersBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Hidden; use Bag\Attributes\HiddenFromJson; use Bag\Attributes\MapName; use Bag\Bag; use Bag\Mappers\SnakeCase; #[MapName(output: SnakeCase::class)] readonly class HiddenJsonParametersBag extends Bag { public function __construct(...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/BagWithFactory.php
tests/Fixtures/Values/BagWithFactory.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Factory; use Bag\Bag; use Bag\Traits\HasFactory; use Tests\Fixtures\Factories\BagWithFactoryFactory; #[Factory(BagWithFactoryFactory::class)] readonly class BagWithFactory extends Bag { use HasFactory; public function __cons...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/ValidateMappedNameClassBag.php
tests/Fixtures/Values/ValidateMappedNameClassBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\MapName; use Bag\Attributes\Validation\Integer; use Bag\Attributes\Validation\Required; use Bag\Attributes\Validation\Str; use Bag\Bag; use Bag\Mappers\SnakeCase; #[MapName(input: SnakeCase::class, output: SnakeCase::class)] readonly...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Values/WrappedBag.php
tests/Fixtures/Values/WrappedBag.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Values; use Bag\Attributes\Wrap; use Bag\Bag; #[Wrap('wrapper')] readonly class WrappedBag extends Bag { public function __construct( public string $name, public int $age, ) { } }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Casts/CastInputOnly.php
tests/Fixtures/Casts/CastInputOnly.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Casts; use Bag\Casts\CastsPropertySet; use Bag\Collection; use Illuminate\Support\Collection as LaravelCollection; use Illuminate\Support\Str; class CastInputOnly implements CastsPropertySet { public function set(Collection $propertyTypes, string $property...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Casts/CastOutputOnly.php
tests/Fixtures/Casts/CastOutputOnly.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Casts; use Bag\Casts\CastsPropertyGet; use Illuminate\Support\Collection; use Illuminate\Support\Str; class CastOutputOnly implements CastsPropertyGet { public function get(string $propertyName, Collection $properties): mixed { return Str::of($...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Collections/WrappedCollection.php
tests/Fixtures/Collections/WrappedCollection.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Collections; use Bag\Attributes\Wrap; use Bag\Attributes\WrapJson; use Bag\Collection; #[Wrap('collection_wrapper')] #[WrapJson('collection_json_wrapper')] class WrappedCollection extends Collection { }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Collections/BagWithCollectionCollection.php
tests/Fixtures/Collections/BagWithCollectionCollection.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Collections; use Bag\Collection; class BagWithCollectionCollection extends Collection { }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Collections/BagWithFactoryAndCollectionCollection.php
tests/Fixtures/Collections/BagWithFactoryAndCollectionCollection.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Collections; use Bag\Collection; class BagWithFactoryAndCollectionCollection extends Collection { }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Enums/TestUnitEnum.php
tests/Fixtures/Enums/TestUnitEnum.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Enums; enum TestUnitEnum { case TEST_VALUE; }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Enums/TestBackedEnum.php
tests/Fixtures/Enums/TestBackedEnum.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Enums; enum TestBackedEnum: string { case TEST_VALUE = 'test'; }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Enums/TestCurrencyEnum.php
tests/Fixtures/Enums/TestCurrencyEnum.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Enums; enum TestCurrencyEnum { case USD; }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Models/CastedModel.php
tests/Fixtures/Models/CastedModel.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Models; use Bag\Collection; use Illuminate\Database\Eloquent\Model; use Tests\Fixtures\Collections\BagWithCollectionCollection; use Tests\Fixtures\Values\BagWithCollection; use Tests\Fixtures\Values\HiddenParametersBag; use Tests\Fixtures\Values\NullableWithDef...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Models/AlternativeTestModel.php
tests/Fixtures/Models/AlternativeTestModel.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Models; use Illuminate\Database\Eloquent\Model; class AlternativeTestModel extends Model { protected $fillable = ['name', 'age', 'email']; }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Models/CastedModelLegacy.php
tests/Fixtures/Models/CastedModelLegacy.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Models; use Bag\Collection; use Bag\Eloquent\Casts\AsBagCollection; use Illuminate\Database\Eloquent\Model; use Tests\Fixtures\Collections\BagWithCollectionCollection; use Tests\Fixtures\Values\BagWithCollection; use Tests\Fixtures\Values\HiddenParametersBag; u...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Models/TestModel.php
tests/Fixtures/Models/TestModel.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Models; use Illuminate\Database\Eloquent\Model; class TestModel extends Model { protected $fillable = ['name', 'age', 'email']; }
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Fixtures/Factories/BagWithFactoryFactory.php
tests/Fixtures/Factories/BagWithFactoryFactory.php
<?php declare(strict_types=1); namespace Tests\Fixtures\Factories; use Bag\Factory; use Illuminate\Support\Collection as LaravelCollection; class BagWithFactoryFactory extends Factory { #[\Override] public function definition(): LaravelCollection|array { return LaravelCollection::make([ ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/CollectionTest.php
tests/Feature/CollectionTest.php
<?php declare(strict_types=1); use Bag\Collection; use Bag\Exceptions\ImmutableCollectionException; use Tests\Fixtures\Collections\WrappedCollection; covers(Collection::class); test('it clones on forget', function () { $collection = Collection::make(['foo' => 'bar', 'baz' => 'bat']); $newCollection = $collec...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/BagTest.php
tests/Feature/BagTest.php
<?php declare(strict_types=1); use Bag\Bag; use Bag\Exceptions\AdditionalPropertiesException; use Bag\Exceptions\MissingPropertiesException; use Bag\Values\Optional; use Tests\Fixtures\Enums\TestBackedEnum; use Tests\Fixtures\Values\BagWithMappingAndOptional; use Tests\Fixtures\Values\BagWithOptionals; use Tests\Fixt...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/FactoryTest.php
tests/Feature/FactoryTest.php
<?php declare(strict_types=1); use Bag\Attributes\Factory as FactoryAttribute; use Bag\Collection; use Bag\Exceptions\MissingFactoryException; use Bag\Factory; use Bag\Traits\HasFactory; use Illuminate\Database\Eloquent\Factories\Sequence; use Tests\Fixtures\Collections\BagWithFactoryAndCollectionCollection; use Test...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/BagServiceProviderTest.php
tests/Feature/BagServiceProviderTest.php
<?php declare(strict_types=1); use Bag\Attributes\StripExtraParameters; use Bag\Attributes\WithoutValidation; use Bag\BagServiceProvider; use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; use Symfony\Component\HttpFoundation\Request as SymfonyRequest; use Tests\Fixtures\Values\OptionalValidateUsingAt...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/TypeScript/BagTransformerTest.php
tests/Feature/TypeScript/BagTransformerTest.php
<?php declare(strict_types=1); use Bag\TypeScript\BagTransformer; use Bag\TypeScript\Reflection\BagReflectionProperty; use Bag\TypeScript\Reflection\BagReflectionUnionType; use Spatie\TypeScriptTransformer\TypeScriptTransformerConfig; use Tests\Fixtures\Values\TypeScriptBag; beforeEach()->skip(!class_exists(TypeScri...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Casts/CollectionOfTest.php
tests/Feature/Casts/CollectionOfTest.php
<?php declare(strict_types=1); use Bag\Casts\CollectionOf; use Bag\Values\Optional; use Tests\Fixtures\Collections\BagWithCollectionCollection; use Tests\Fixtures\Values\BagWithCustomCollectionOf; use Tests\Fixtures\Values\BagWithLaravelCollectionOf; use Tests\Fixtures\Values\BagWithOptionalCollection; use Tests\Fixt...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Console/Commands/MakeBagCommandTest.php
tests/Feature/Console/Commands/MakeBagCommandTest.php
<?php declare(strict_types=1); use Bag\Console\Commands\MakeBagCommand; covers(MakeBagCommand::class); test('it creates bag', function () { $this->artisan('make:bag') ->expectsQuestion('Bag class name', 'MyBag') ->expectsQuestion('Namespace', 'App\Values') ->expectsOutputToContain('Bag [...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Concerns/WithArrayableTest.php
tests/Feature/Concerns/WithArrayableTest.php
<?php declare(strict_types=1); use Bag\Concerns\WithArrayable; use Tests\Fixtures\Values\OptionalValueBag; use Tests\Fixtures\Values\TestBag; covers(WithArrayable::class); test('it is arrayable', function () { $value = TestBag::from([ 'name' => 'Davey Shafik', 'age' => 40, 'email' => 'da...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Concerns/CastValuesTest.php
tests/Feature/Concerns/CastValuesTest.php
<?php declare(strict_types=1); use Bag\Attributes\Cast; use Bag\Attributes\CastInput as CastInputAttribute; use Bag\Attributes\CastOutput as CastOutputAttribute; use Bag\Property\CastInput; use Bag\Property\CastOutput; use Carbon\CarbonImmutable; use Tests\Fixtures\Values\BagWithCollection; use Tests\Fixtures\Values\...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Concerns/HasBagTest.php
tests/Feature/Concerns/HasBagTest.php
<?php declare(strict_types=1); use Bag\Attributes\Bag; use Bag\Exceptions\BagAttributeNotFoundException; use Bag\Exceptions\BagNotFoundException; use Bag\Traits\HasBag; use Tests\Fixtures\ObjectToBagAll; use Tests\Fixtures\ObjectToBagInvalidBag; use Tests\Fixtures\ObjectToBagNoAttribute; use Tests\Fixtures\ObjectToBa...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Concerns/WithEloquentCastingTest.php
tests/Feature/Concerns/WithEloquentCastingTest.php
<?php declare(strict_types=1); use Bag\Collection; use Bag\Concerns\WithEloquentCasting; use Bag\Eloquent\Casts\AsBag; use Bag\Eloquent\Casts\AsBagCollection; use Bag\Values\Optional; use Illuminate\Foundation\Application; use function Pest\Laravel\assertDatabaseHas; use Tests\Fixtures\Collections\BagWithCollectionCol...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Concerns/WithValidationTest.php
tests/Feature/Concerns/WithValidationTest.php
<?php declare(strict_types=1); use Bag\Attributes\Validation\Exists; use Bag\Attributes\Validation\Unique; use Bag\Concerns\WithValidation; use Bag\Exceptions\ComputedPropertyUninitializedException; use Bag\Internal\Cache; use Carbon\Carbon; use Carbon\CarbonImmutable; use Illuminate\Validation\ValidationException; u...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Concerns/WithJsonTest.php
tests/Feature/Concerns/WithJsonTest.php
<?php declare(strict_types=1); use Bag\Concerns\WithJson; use Bag\Internal\Cache; use Tests\Fixtures\Values\HiddenJsonParametersBag; use Tests\Fixtures\Values\OptionalValueBag; use Tests\Fixtures\Values\TestBag; covers(WithJson::class); test('it encodes json', function () { $value = TestBag::from([ 'nam...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Concerns/WithOptionalsTest.php
tests/Feature/Concerns/WithOptionalsTest.php
<?php declare(strict_types=1); use Bag\Concerns\WithOptionals; use Tests\Fixtures\Values\BagWithOptionals; covers(WithOptionals::class); test('has returns false with optional', function () { $bag = BagWithOptionals::from(['name' => 'Davey Shafik']); expect($bag->has('age')) ->toBeFalse() ->and(...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Concerns/WithCollectionsTest.php
tests/Feature/Concerns/WithCollectionsTest.php
<?php declare(strict_types=1); use Bag\Attributes\Collection as CollectionAttribute; use Bag\Collection; use Bag\Concerns\WithCollections; use Bag\Internal\Cache; use Tests\Fixtures\Collections\BagWithCollectionCollection; use Tests\Fixtures\Values\BagWithCollection; use Tests\Fixtures\Values\TestBag; covers(WithCol...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Feature/Concerns/WithOutputTest.php
tests/Feature/Concerns/WithOutputTest.php
<?php declare(strict_types=1); use Bag\Concerns\WithOutput; use Tests\Fixtures\Values\HiddenParametersBag; use Tests\Fixtures\Values\MappedOutputNameClassBag; use Tests\Fixtures\Values\WrappedBag; covers(WithOutput::class); test('it maps output names', function () { $value = MappedOutputNameClassBag::from([ ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/DebugBar/Collectors/BagCollectorTest.php
tests/Unit/DebugBar/Collectors/BagCollectorTest.php
<?php declare(strict_types=1); use Bag\DebugBar\Collectors\BagCollector; use DebugBar\DataCollector\MessagesCollector; use Illuminate\Support\Facades\Config; use Tests\Fixtures\Values\TestBag; beforeEach(function () { BagCollector::init(); })->skip(!class_exists(MessagesCollector::class)); if (class_exists(Mess...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Mappers/SnakeCaseMapperTest.php
tests/Unit/Mappers/SnakeCaseMapperTest.php
<?php declare(strict_types=1); use Bag\Mappers\SnakeCase; covers(SnakeCase::class); test('it transforms to snake case', function () { $mapper = new SnakeCase(); expect($mapper('someWordsHere'))->toBe('some_words_here'); }); test('it leaves snake case alone', function () { $mapper = new SnakeCase(); ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Mappers/AliasTest.php
tests/Unit/Mappers/AliasTest.php
<?php declare(strict_types=1); use Bag\Mappers\Alias; covers(Alias::class); test('it maps using single transform', function () { $mapper = new Alias('different_words_go_here'); expect($mapper('some_words_here'))->toBe('different_words_go_here'); });
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Mappers/CamelCaseMapperTest.php
tests/Unit/Mappers/CamelCaseMapperTest.php
<?php declare(strict_types=1); use Bag\Mappers\CamelCase; covers(CamelCase::class); test('it transforms to camel case', function () { $mapper = new CamelCase(); expect($mapper('some_words_here'))->toBe('someWordsHere'); }); test('it leaves camel case alone', function () { $mapper = new CamelCase(); ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Mappers/StringableMapperTest.php
tests/Unit/Mappers/StringableMapperTest.php
<?php declare(strict_types=1); use Bag\Mappers\Stringable; covers(Stringable::class); test('it maps using single transform', function () { $mapper = new Stringable('upper'); expect($mapper('some_words_here'))->toBe('SOME_WORDS_HERE'); }); test('it maps using multiple transforms', function () { $mapper ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Casts/DateTimeTest.php
tests/Unit/Casts/DateTimeTest.php
<?php declare(strict_types=1); use Bag\Casts\DateTime; use Bag\Collection; use Bag\Values\Optional; use Carbon\Carbon; use Carbon\CarbonImmutable; use Carbon\Exceptions\InvalidFormatException; covers(DateTime::class); test('it casts to datetime', function () { $cast = new DateTime(); $datetime = $cast->set(...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Casts/MoneyFromMinorTest.php
tests/Unit/Casts/MoneyFromMinorTest.php
<?php declare(strict_types=1); use Bag\Casts\MoneyFromMinor; use Bag\Collection; use Bag\Values\Optional; use Brick\Money\Exception\UnknownCurrencyException; use Brick\Money\Money; use Laravel\SerializableClosure\Support\ReflectionClosure; use PrinsFrank\Standards\Currency\CurrencyAlpha3; use Tests\Fixtures\Enums\Test...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Casts/MagicCastTest.php
tests/Unit/Casts/MagicCastTest.php
<?php declare(strict_types=1); use Bag\Casts\MagicCast; use Bag\Collection; use Bag\Values\Optional; use Carbon\Carbon; use Carbon\CarbonImmutable; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Carbon as LaravelCarbon; use Illuminate\Support\Collection as LaravelCollection; use Mockery\MockInterface;...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Casts/MoneyFromMajorTest.php
tests/Unit/Casts/MoneyFromMajorTest.php
<?php declare(strict_types=1); use Bag\Casts\MoneyFromMajor; use Bag\Collection; use Bag\Values\Optional; use Brick\Money\Exception\UnknownCurrencyException; use Brick\Money\Money; use Laravel\SerializableClosure\Support\ReflectionClosure; use PrinsFrank\Standards\Currency\CurrencyAlpha3; use Tests\Fixtures\Enums\Test...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Casts/CollectionOfTest.php
tests/Unit/Casts/CollectionOfTest.php
<?php declare(strict_types=1); use Bag\Casts\CollectionOf; use Bag\Collection; use Bag\Exceptions\BagNotFoundException; use Bag\Exceptions\InvalidBag; use Bag\Exceptions\InvalidCollection; use Illuminate\Support\Collection as LaravelCollection; use Laravel\SerializableClosure\Support\ReflectionClosure; use Tests\Fixtu...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Validation/Rules/OptionalOrTest.php
tests/Unit/Validation/Rules/OptionalOrTest.php
<?php declare(strict_types=1); use Bag\Validation\Rules\OptionalOr; use Bag\Values\Optional; use Illuminate\Support\Facades\Validator; covers(OptionalOr::class); test('it validates optionals with types', function () { $validator = Validator::make([ 'name' => 'Davey Shafik', 'age' => new Optional...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Internal/CacheTest.php
tests/Unit/Internal/CacheTest.php
<?php declare(strict_types=1); use Bag\Internal\Cache; use Mockery\MockInterface; covers(Cache::class); test('it creates mock', function () { expect(Cache::fake())->toBeInstanceOf(MockInterface::class); }); test('it creates spy', function () { expect(Cache::spy())->toBeInstanceOf(MockInterface::class); }); ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Internal/ValidatorTest.php
tests/Unit/Internal/ValidatorTest.php
<?php declare(strict_types=1); use Bag\Internal\Validator; use Illuminate\Validation\ValidationException; covers(Validator::class); test('it does not throw when valid', function () { Validator::validate(['name' => 'Davey Shafik'], collect(['name' => ['string']])); })->throwsNoExceptions(); test('it does throw ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Internal/ReflectionTest.php
tests/Unit/Internal/ReflectionTest.php
<?php declare(strict_types=1); use Bag\Attributes\Collection as AttributesCollection; use Bag\Collection; use Bag\Internal\Reflection; use PHPUnit\Framework\Attributes\CoversClass; use Tests\Fixtures\Values\BagWithCollection; covers(Reflection::class); test('it gets class', function () { $class = Reflection::ge...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Internal/UtilTest.php
tests/Unit/Internal/UtilTest.php
<?php declare(strict_types=1); use Bag\Exceptions\InvalidPropertyType; use Bag\Internal\Util; use Bag\Mappers\CamelCase; use Bag\Mappers\Stringable; use Illuminate\Pipeline\Pipeline; covers(Util::class); test('it gets property type', function () { $types = Util::getPropertyTypes(new \ReflectionParameter(fn (stri...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Attributes/MapOutputNameTest.php
tests/Unit/Attributes/MapOutputNameTest.php
<?php declare(strict_types=1); use Bag\Attributes\MapOutputName; use Bag\Mappers\Stringable; covers(MapOutputName::class); test('it instantiates', function () { $map = new MapOutputName(Stringable::class, 'foo', 'bar', 'baz'); expect($map->output)->toBe(Stringable::class) ->and($map->outputParams)->...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Attributes/MapInputNameTest.php
tests/Unit/Attributes/MapInputNameTest.php
<?php declare(strict_types=1); use Bag\Attributes\MapInputName; use Bag\Mappers\Stringable; covers(MapInputName::class); test('it instantiates', function () { $map = new MapInputName(Stringable::class, 'foo', 'bar', 'baz'); expect($map->input)->toBe(Stringable::class) ->and($map->inputParams)->toBe(...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Attributes/Validation/RuleTest.php
tests/Unit/Attributes/Validation/RuleTest.php
<?php declare(strict_types=1); use Bag\Attributes\Validation\Between; use Bag\Attributes\Validation\Boolean; use Bag\Attributes\Validation\Decimal; use Bag\Attributes\Validation\Email; use Bag\Attributes\Validation\Enum; use Bag\Attributes\Validation\Exists; use Bag\Attributes\Validation\In; use Bag\Attributes\Validat...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/ValidationPipelineTest.php
tests/Unit/Pipelines/ValidationPipelineTest.php
<?php declare(strict_types=1); use Bag\Pipelines\ValidationPipeline; use Bag\Pipelines\Values\BagInput; use Bag\Values\Optional; use Illuminate\Validation\ValidationException; use Tests\Fixtures\Values\OptionalBagWithValidation; use Tests\Fixtures\Values\TestBag; use Tests\Fixtures\Values\ValidateUsingAttributesAndRul...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/WithoutValidationPipelineTest.php
tests/Unit/Pipelines/WithoutValidationPipelineTest.php
<?php declare(strict_types=1); use Bag\Pipelines\Values\BagInput; use Bag\Pipelines\WithoutValidationPipeline; use Tests\Fixtures\Values\OptionalValidateUsingAttributesAndRulesMethodBag; use Tests\Fixtures\Values\TestBag; covers(BagInput::class, WithoutValidationPipeline::class); test('it creates bag', function () {...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/InputPipelineTest.php
tests/Unit/Pipelines/InputPipelineTest.php
<?php declare(strict_types=1); use Bag\Pipelines\InputPipeline; use Bag\Pipelines\Values\BagInput; use Tests\Fixtures\Values\TestBag; covers(BagInput::class, InputPipeline::class); test('it creates bag', function () { $input = new BagInput(TestBag::class, collect([ 'name' => 'Davey Shafik', 'age'...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/OutputCollectionPipelineTest.php
tests/Unit/Pipelines/OutputCollectionPipelineTest.php
<?php declare(strict_types=1); use Bag\Enums\OutputType; use Bag\Pipelines\OutputCollectionPipeline; use Bag\Pipelines\Values\CollectionOutput; use Tests\Fixtures\Collections\WrappedCollection; use Tests\Fixtures\Values\TestBag; use Tests\Fixtures\Values\WrappedBag; use Tests\Fixtures\Values\WrappedJsonBag; covers(Ou...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/OutputPipelineTest.php
tests/Unit/Pipelines/OutputPipelineTest.php
<?php declare(strict_types=1); use Bag\Enums\OutputType; use Bag\Pipelines\OutputPipeline; use Bag\Pipelines\Values\BagOutput; use Tests\Fixtures\Values\TestBag; use Tests\Fixtures\Values\WrappedBag; use Tests\Fixtures\Values\WrappedBothBag; use Tests\Fixtures\Values\WrappedJsonBag; covers(BagOutput::class, OutputPip...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/MissingPropertiesTest.php
tests/Unit/Pipelines/Pipes/MissingPropertiesTest.php
<?php declare(strict_types=1); use Bag\Exceptions\MissingPropertiesException; use Bag\Pipelines\Pipes\IsVariadic; use Bag\Pipelines\Pipes\MapInput; use Bag\Pipelines\Pipes\MissingProperties; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Values\BagInput; use Tests\Fixtures\Values\NullableWithDefaultValue...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/ProcessPropertiesTest.php
tests/Unit/Pipelines/Pipes/ProcessPropertiesTest.php
<?php declare(strict_types=1); use Bag\Enums\OutputType; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Pipes\ProcessProperties; use Bag\Pipelines\Values\BagOutput; use Bag\Property\Value; use Bag\Property\ValueCollection; use Tests\Fixtures\Values\ComputedPropertyBag; covers(ProcessProperties::class); ...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/IsVariadicTest.php
tests/Unit/Pipelines/Pipes/IsVariadicTest.php
<?php declare(strict_types=1); use Bag\Pipelines\Pipes\IsVariadic; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Values\BagInput; use Tests\Fixtures\Values\TestBag; use Tests\Fixtures\Values\VariadicBag; covers(IsVariadic::class); test('it is variadic', function () { $input = new BagInput(Variadic...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/GetValuesTest.php
tests/Unit/Pipelines/Pipes/GetValuesTest.php
<?php declare(strict_types=1); use Bag\Enums\OutputType; use Bag\Pipelines\Pipes\GetValues; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Pipes\ProcessProperties; use Bag\Pipelines\Values\BagOutput; use Tests\Fixtures\Values\MappedOutputNameClassBag; covers(GetValues::class); test('it gets values', fu...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/FillBagTest.php
tests/Unit/Pipelines/Pipes/FillBagTest.php
<?php declare(strict_types=1); use Bag\Pipelines\Pipes\FillBag; use Bag\Pipelines\Pipes\MapInput; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Values\BagInput; use Tests\Fixtures\Values\TestBag; covers(FillBag::class); test('it creates bag instance', function () { $input = new BagInput(TestBag::c...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/CastOutputValuesTest.php
tests/Unit/Pipelines/Pipes/CastOutputValuesTest.php
<?php declare(strict_types=1); use Bag\Enums\OutputType; use Bag\Pipelines\Pipes\CastOutputValues; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Pipes\ProcessProperties; use Bag\Pipelines\Values\BagOutput; use Carbon\CarbonImmutable; use Tests\Fixtures\Values\BagWithManualSetProperty; use Tests\Fixtures...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/MapInputTest.php
tests/Unit/Pipelines/Pipes/MapInputTest.php
<?php declare(strict_types=1); use Bag\Pipelines\Pipes\IsVariadic; use Bag\Pipelines\Pipes\MapInput; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Values\BagInput; use Tests\Fixtures\Values\MappedInputNameClassBag; use Tests\Fixtures\Values\MappedNameClassBag; covers(MapInput::class); test('it maps in...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/HideOptionalValuesTest.php
tests/Unit/Pipelines/Pipes/HideOptionalValuesTest.php
<?php declare(strict_types=1); use Bag\Enums\OutputType; use Bag\Pipelines\Pipes\HideOptionalValues; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Pipes\ProcessProperties; use Bag\Pipelines\Values\BagOutput; use Tests\Fixtures\Values\BagWithOptionals; covers(HideOptionalValues::class); test('it hides...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/DebugCollectionTest.php
tests/Unit/Pipelines/Pipes/DebugCollectionTest.php
<?php declare(strict_types=1); use Bag\DebugBar\Collectors\BagCollector; use Bag\Pipelines\Pipes\DebugCollection; use Bag\Pipelines\Values\BagInput; use DebugBar\DataCollector\MessagesCollector; use Illuminate\Support\Collection; use Tests\Fixtures\Values\TestBag; covers(DebugCollection::class); beforeEach()->skip(...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/CastInputValuesTest.php
tests/Unit/Pipelines/Pipes/CastInputValuesTest.php
<?php declare(strict_types=1); use Bag\Pipelines\Pipes\CastInputValues; use Bag\Pipelines\Pipes\MapInput; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Values\BagInput; use Carbon\CarbonImmutable; use Illuminate\Support\Stringable; use Tests\Fixtures\Values\CastInputOutputBag; use Tests\Fixtures\Values\...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/WrapCollectionTest.php
tests/Unit/Pipelines/Pipes/WrapCollectionTest.php
<?php declare(strict_types=1); use Bag\Enums\OutputType; use Bag\Pipelines\Pipes\WrapCollection; use Bag\Pipelines\Values\CollectionOutput; use Tests\Fixtures\Collections\WrappedCollection; use Tests\Fixtures\Values\TestBag; covers(WrapCollection::class, CollectionOutput::class); test('it does not wrap collection wi...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/ProcessParametersTest.php
tests/Unit/Pipelines/Pipes/ProcessParametersTest.php
<?php declare(strict_types=1); use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Values\BagInput; use Bag\Property\Value; use Bag\Property\ValueCollection; use Tests\Fixtures\Values\NoConstructorBag; use Tests\Fixtures\Values\NoPropertiesBag; use Tests\Fixtures\Values\TestBag; covers(ProcessParameters::cla...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false
beacon-hq/bag
https://github.com/beacon-hq/bag/blob/0737331b1c0f0511101b0b73b3316620277a5ec1/tests/Unit/Pipelines/Pipes/ComputedValuesTest.php
tests/Unit/Pipelines/Pipes/ComputedValuesTest.php
<?php declare(strict_types=1); use Bag\Exceptions\ComputedPropertyUninitializedException; use Bag\Pipelines\Pipes\ComputedValues; use Bag\Pipelines\Pipes\MapInput; use Bag\Pipelines\Pipes\ProcessParameters; use Bag\Pipelines\Values\BagInput; use Carbon\Carbon; use Carbon\CarbonImmutable; use Tests\Fixtures\Values\Comp...
php
MIT
0737331b1c0f0511101b0b73b3316620277a5ec1
2026-01-05T03:36:05.543212Z
false