Skip to content

Commit

Permalink
Fix missing arguments from image transform specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Feb 17, 2025
1 parent 68cecd0 commit c7af341
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion formwork/src/Images/Transform/AbstractTransform.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@

use Formwork\Parsers\Php;
use Formwork\Utils\Str;
use ReflectionClass;

abstract class AbstractTransform implements TransformInterface
{
public function toArray(): array
{
return get_object_vars($this);
$data = [];

foreach ((new ReflectionClass($this))->getProperties() as $property) {
$data[$property->getName()] = $property->getValue($this);
}

return $data;
}

public function getSpecifier(): string
Expand Down

0 comments on commit c7af341

Please sign in to comment.