Skip to content

Commit

Permalink
chore: move data casters into Client namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed May 28, 2024
1 parent cd02bef commit 1414261
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
<code><![CDATA[new \SplQueue()]]></code>
</MixedPropertyTypeCoercion>
</file>
<file src="src/Support/Caster/ProtobufCaster.php">
<file src="src/Client/Caster/ProtobufCaster.php">
<MixedArgument>
<code><![CDATA[$ed->getClass()]]></code>
<code><![CDATA[$value]]></code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Buggregator\Trap\Support\Caster;
namespace Buggregator\Trap\Client\Caster;

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Buggregator\Trap\Support\Caster;
namespace Buggregator\Trap\Client\Caster;

use Google\Protobuf\Descriptor as PublicDescriptor;
use Google\Protobuf\Internal\Descriptor as InternalDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Buggregator\Trap\Support\Caster;
namespace Buggregator\Trap\Client\Caster;

/**
* Data object representing a trace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

declare(strict_types=1);

namespace Buggregator\Trap\Support\Caster;
namespace Buggregator\Trap\Client\Caster;

use Symfony\Component\VarDumper\Caster\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;

/**
* @internal
*/
final class TickerCaster
final class TraceCaster
{
public static function cast(Trace $tick, array $a, Stub $stub, bool $isNested): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Buggregator\Trap\Support\Caster;
namespace Buggregator\Trap\Client\Caster;

/**
* @internal
Expand Down
2 changes: 1 addition & 1 deletion src/Client/TrapHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Buggregator\Trap\Client;

use Buggregator\Trap\Client\Caster\Trace;
use Buggregator\Trap\Client\TrapHandle\Counter;
use Buggregator\Trap\Client\TrapHandle\Dumper as VarDumper;
use Buggregator\Trap\Client\TrapHandle\StaticState;
use Buggregator\Trap\Support\Caster\Trace;
use Symfony\Component\VarDumper\Caster\TraceStub;

/**
Expand Down
14 changes: 7 additions & 7 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

declare(strict_types=1);

use Buggregator\Trap\Client\Caster\EnumValue;
use Buggregator\Trap\Client\Caster\ProtobufCaster;
use Buggregator\Trap\Client\Caster\Trace;
use Buggregator\Trap\Client\Caster\TraceCaster;
use Buggregator\Trap\Client\Caster\TraceFile;
use Buggregator\Trap\Client\TrapHandle;
use Buggregator\Trap\Client\TrapHandle\StackTrace;
use Buggregator\Trap\Support\Caster\EnumValue;
use Buggregator\Trap\Support\Caster\ProtobufCaster;
use Buggregator\Trap\Support\Caster\Trace;
use Buggregator\Trap\Support\Caster\TickerCaster;
use Buggregator\Trap\Support\Caster\TraceFile;
use Google\Protobuf\Internal\MapField;
use Google\Protobuf\Internal\Message;
use Google\Protobuf\Internal\RepeatedField;
Expand Down Expand Up @@ -102,7 +102,7 @@ function td(mixed ...$values): never
/** @psalm-suppress MixedAssignment */
AbstractCloner::$defaultCasters[EnumValue::class] ??= [ProtobufCaster::class, 'castEnum'];
/** @psalm-suppress MixedAssignment */
AbstractCloner::$defaultCasters[Trace::class] = [TickerCaster::class, 'cast'];
AbstractCloner::$defaultCasters[Trace::class] = [TraceCaster::class, 'cast'];
/** @psalm-suppress MixedAssignment */
AbstractCloner::$defaultCasters[TraceFile::class] = [TickerCaster::class, 'castLine'];
AbstractCloner::$defaultCasters[TraceFile::class] = [TraceCaster::class, 'castLine'];
}

0 comments on commit 1414261

Please sign in to comment.