From e3849f45abe18f65a073bbc123852b2c04c5b180 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Thu, 15 Nov 2018 19:30:33 +0100 Subject: [PATCH] [Bridge] Use slashes to enclose regex --- lib/Bridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Bridge.php b/lib/Bridge.php index 3c6efabd..92ec6a3c 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -78,7 +78,7 @@ class Bridge { * @return object|bool The bridge object or false if the class is not instantiable. */ public static function create($nameBridge){ - if(!preg_match('@^[A-Z][a-zA-Z0-9-]*$@', $nameBridge)) { + if(!preg_match('/^[A-Z][a-zA-Z0-9-]*$/', $nameBridge)) { throw new \InvalidArgumentException('Bridge name invalid!'); } @@ -156,7 +156,7 @@ class Bridge { if($dirFiles !== false) { foreach($dirFiles as $fileName) { - if(preg_match('@^([^.]+)Bridge\.php$@U', $fileName, $out)) { + if(preg_match('/^([^.]+)Bridge\.php$/U', $fileName, $out)) { $listBridge[] = $out[1]; } }