Commit 9d3d276b authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[TASK] Use booled value as return instead of "1"

parent c00af786
Pipeline #20464 passed with stages
in 4 minutes and 23 seconds
......@@ -99,7 +99,7 @@ class ExtensionVersion
*/
public function isValidVersionNumber(): bool
{
return preg_match('/^(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})$/', $this->version) === 1;
return (bool)preg_match('/^(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})$/', $this->version);
// alternative (preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $version) !== false) {
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment