Skip to content

Commit f42b811

Browse files
committed
Removed inconsistent and useless methods in Geometry class
1 parent 27891e4 commit f42b811

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/ReferenceClasses/Geometry.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,11 @@ public function __construct(
102102
$this->value = $geometry;
103103
}
104104

105-
public function __toString(): string
106-
{
107-
return (string) $this->value;
108-
}
109-
110105
public function validate(): string
111106
{
112107
$errors = [];
113108

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

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

0 commit comments

Comments
 (0)