Skip to content

Commit 789a98b

Browse files
committed
Add tests and update regex
1 parent 817f54f commit 789a98b

File tree

2 files changed

+114
-106
lines changed

2 files changed

+114
-106
lines changed

src/Analyser/Header/Useragent/Device/Gaming.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private function detectNintendo($ua)
123123

124124
/* Sony PlayStation */
125125

126-
private function detectPlayStation($ua)
126+
private function detectPlaystation($ua)
127127
{
128128
/* PlayStation Portable */
129129

@@ -144,7 +144,7 @@ private function detectPlayStation($ua)
144144

145145
/* PlayStation Vita */
146146

147-
if (preg_match('/PlayStation Vita/iu', $ua)) {
147+
if (preg_match('/PlayStation Vita/ui', $ua)) {
148148
$this->data->os->reset();
149149
$this->data->os->identifyVersion('/PlayStation Vita ([0-9.]*)/u', $ua);
150150

@@ -163,7 +163,7 @@ private function detectPlayStation($ua)
163163

164164
/* PlayStation 2 */
165165

166-
if (preg_match('/PlayStation2/u', $ua) || preg_match('/\(PS2/u', $ua)) {
166+
if (preg_match('/PlayStation2/ui', $ua) || preg_match('/\(PS2/u', $ua)) {
167167
$this->data->os->reset();
168168

169169
$this->data->device->setIdentification([

0 commit comments

Comments
 (0)