From 5d20bf63b1ec2f2a0ed34385d4074eb9e034ec40 Mon Sep 17 00:00:00 2001 From: Foufou Date: Sat, 5 Jan 2019 17:00:23 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/model/OperationLog.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/OperationLog.php b/src/model/OperationLog.php index 895983b..aa022ad 100644 --- a/src/model/OperationLog.php +++ b/src/model/OperationLog.php @@ -62,8 +62,8 @@ public function browserInfo($user_agent = null) // finally get the correct version number // Added "|:" - $known = array('Version', $ub, 'other'); - $pattern = '#(?'.join('|', $known).')[/|: ]+(?[0-9.|a-zA-Z.]*)#'; + $known = ['Version', $ub, 'other']; + $pattern = '#(?'.implode('|', $known).')[/|: ]+(?[0-9.|a-zA-Z.]*)#'; if (!preg_match_all($pattern, $user_agent, $matches)) { // we have no matching number just continue } @@ -87,12 +87,12 @@ public function browserInfo($user_agent = null) $version = '?'; } - return array( + return [ 'userAgent' => $user_agent, 'name' => $bname, 'version' => $version, 'platform' => $platform, 'pattern' => $pattern, - ); + ]; } }