Skip to content

Commit

Permalink
Merge pull request #4 from techoner/analysis-8QJb0o
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
leeqvip authored Jan 5, 2019
2 parents 59a463f + 5d20bf6 commit 15d095c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/model/OperationLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public function browserInfo($user_agent = null)

// finally get the correct version number
// Added "|:"
$known = array('Version', $ub, 'other');
$pattern = '#(?<browser>'.join('|', $known).')[/|: ]+(?<version>[0-9.|a-zA-Z.]*)#';
$known = ['Version', $ub, 'other'];
$pattern = '#(?<browser>'.implode('|', $known).')[/|: ]+(?<version>[0-9.|a-zA-Z.]*)#';
if (!preg_match_all($pattern, $user_agent, $matches)) {
// we have no matching number just continue
}
Expand All @@ -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,
);
];
}
}

0 comments on commit 15d095c

Please sign in to comment.