Skip to content

Commit

Permalink
Deleted unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
SandervdHulst committed Nov 14, 2023
1 parent 5b4b0c6 commit f720a9e
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/Transaction/Request/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,32 +78,6 @@ public function jsonSerialize(): mixed
return $this->data;
}

/**
* Redirect all method calls prefixed with 'get' or 'set'
* to check if a param exists with that name
* Return or set the param if it does
*
* @param string $method
* @param array $args
* @return mixed
*/
public function __call($method, $args)
{
$prefix = substr($method, 0, 3);
$param = substr($method, 3);
$arg = isset($args[0]) ? $args[0] : null;

if ($prefix === 'set')
{
$this->offsetSet($param, $arg);
} elseif ($prefix === 'get')
{
return $this->offsetGet($param);
}

throw new Exception("Call to undefined method " . __CLASS__ . '::' . $method);
}

/** Implement Arrayable */
public function toArray(): array
{
Expand Down

0 comments on commit f720a9e

Please sign in to comment.