Code Explainers

Code explainers tagged #value-objects

php
<?php
 
namespace App\Http\Requests\DataObjects;
 

Typed request DTOs in Laravel

data-transfer-object validation immutability
Intermediate 6 steps
php
<?php
 
namespace App\Services;
 

Building a valid iCalendar feed in PHP in Laravel

ical serialization formatting
Intermediate 8 steps
php
<?php
 
declare(strict_types=1);
 

Streaming a fixed-width file into typed objects

generators value-objects file-parsing
Intermediate 8 steps
ruby
module DeepImmutable
  module_function
 
  def deep_freeze(obj)

Deep-freezing config with recursive immutability

immutability recursion deep-copy
Intermediate 8 steps
php
<?php
 
declare(strict_types=1);
 

An immutable typed collection in PHP

immutability value-objects iterators
Intermediate 8 steps
php
<?php
 
namespace App\Casts;
 

How a custom Eloquent cast wraps an Address in Laravel

value-objects serialization data-mapping
Intermediate 7 steps