Skip to content

Commit

Permalink
Removed inconsistent and useless methods in Geometry class
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Jul 2, 2021
1 parent 27891e4 commit f42b811
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/ReferenceClasses/Geometry.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,11 @@ public function __construct(
$this->value = $geometry;
}

public function __toString(): string
{
return (string) $this->value;
}

public function validate(): string
{
$errors = [];

if (!\preg_match(static::REGEX_VALIDATE, $this->value, $matches)) {
$errors[] = 'Invalid regexp.';
}
\preg_match(static::REGEX_VALIDATE, $this->value, $matches);

$w = isset($matches['w']) && '' !== $matches['w'] ? $matches['w'] : null;
$h = isset($matches['h']) && '' !== $matches['h'] ? $matches['h'] : null;
Expand Down

0 comments on commit f42b811

Please sign in to comment.