Skip to content

Commit

Permalink
adding types
Browse files Browse the repository at this point in the history
  • Loading branch information
jturbide committed Feb 24, 2024
1 parent 57a6876 commit 8e092e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions src/Support/Exposer/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

class Builder implements BuilderInterface
{
private $value;
private mixed $value;

private $parent;
private mixed $parent;

private ?array $columns = null;

Expand All @@ -29,23 +29,22 @@ class Builder implements BuilderInterface

private bool $protected = false;


public function getValue()
{
return $this->value;
}

public function setValue($value = null): void
public function setValue(mixed $value = null): void
{
$this->value = $value;
}

public function getParent()
public function getParent(): mixed
{
return $this->parent;
}

public function setParent($parent = null): void
public function setParent(mixed $parent = null): void
{
$this->parent = $parent;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Support/Exposer/Exposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*/
class Exposer
{
public static function createBuilder($object, ?array $columns = null, ?bool $expose = null, ?bool $protected = null): Builder
public static function createBuilder(mixed $object, ?array $columns = null, ?bool $expose = null, ?bool $protected = null): Builder
{
$expose ??= true;
$protected ??= false;
Expand All @@ -52,7 +52,7 @@ public static function createBuilder($object, ?array $columns = null, ?bool $exp
return $builder;
}

private static function getValue(string $string, $value): string
private static function getValue(string $string, mixed $value): string
{
return (is_array($value) || is_object($value))
? sprintfn($string, $value)
Expand Down

0 comments on commit 8e092e0

Please sign in to comment.