@@ -132,39 +132,39 @@ private function detectPlaystation($ua)
132132
133133 $ this ->data ->device ->setIdentification ([
134134 'manufacturer ' => 'Sony ' ,
135- 'model ' => 'Playstation Portable ' ,
135+ 'model ' => 'PlayStation Portable ' ,
136136 'type ' => Constants \DeviceType::GAMING ,
137137 'subtype ' => Constants \DeviceSubType::PORTABLE
138138 ]);
139139 }
140140
141141 /* PlayStation Vita */
142142
143- if (preg_match ('/PlayStation Vita/iu ' , $ ua )) {
143+ if (preg_match ('/PlayStation Vita/ui ' , $ ua )) {
144144 $ this ->data ->os ->reset ();
145145 $ this ->data ->os ->identifyVersion ('/PlayStation Vita ([0-9.]*)/u ' , $ ua );
146146
147147 $ this ->data ->device ->setIdentification ([
148148 'manufacturer ' => 'Sony ' ,
149- 'model ' => 'Playstation Vita ' ,
149+ 'model ' => 'PlayStation Vita ' ,
150150 'type ' => Constants \DeviceType::GAMING ,
151151 'subtype ' => Constants \DeviceSubType::PORTABLE
152152 ]);
153153
154154 if (preg_match ('/VTE\//u ' , $ ua )) {
155- $ this ->data ->device ->model = 'Playstation TV ' ;
155+ $ this ->data ->device ->model = 'PlayStation TV ' ;
156156 $ this ->data ->device ->subtype = Constants \DeviceSubType::CONSOLE ;
157157 }
158158 }
159159
160160 /* PlayStation 2 */
161161
162- if (preg_match ('/Playstation2/u ' , $ ua ) || preg_match ('/\(PS2/u ' , $ ua )) {
162+ if (preg_match ('/PlayStation2/ui ' , $ ua ) || preg_match ('/\(PS2/u ' , $ ua )) {
163163 $ this ->data ->os ->reset ();
164164
165165 $ this ->data ->device ->setIdentification ([
166166 'manufacturer ' => 'Sony ' ,
167- 'model ' => 'Playstation 2 ' ,
167+ 'model ' => 'PlayStation 2 ' ,
168168 'type ' => Constants \DeviceType::GAMING ,
169169 'subtype ' => Constants \DeviceSubType::CONSOLE
170170 ]);
@@ -184,7 +184,7 @@ private function detectPlaystation($ua)
184184
185185 $ this ->data ->device ->setIdentification ([
186186 'manufacturer ' => 'Sony ' ,
187- 'model ' => 'Playstation 3 ' ,
187+ 'model ' => 'PlayStation 3 ' ,
188188 'type ' => Constants \DeviceType::GAMING ,
189189 'subtype ' => Constants \DeviceSubType::CONSOLE
190190 ]);
@@ -198,7 +198,21 @@ private function detectPlaystation($ua)
198198
199199 $ this ->data ->device ->setIdentification ([
200200 'manufacturer ' => 'Sony ' ,
201- 'model ' => 'Playstation 4 ' ,
201+ 'model ' => 'PlayStation 4 ' ,
202+ 'type ' => Constants \DeviceType::GAMING ,
203+ 'subtype ' => Constants \DeviceSubType::CONSOLE
204+ ]);
205+ }
206+
207+ /* PlayStation 5 */
208+
209+ if (preg_match ('/PlayStation 5/ui ' , $ ua ) || preg_match ('/\(PS5/u ' , $ ua )) {
210+ $ this ->data ->os ->reset ();
211+ $ this ->data ->os ->identifyVersion ('/PlayStation 5 ([0-9.]*)/u ' , $ ua );
212+
213+ $ this ->data ->device ->setIdentification ([
214+ 'manufacturer ' => 'Sony ' ,
215+ 'model ' => 'PlayStation 5 ' ,
202216 'type ' => Constants \DeviceType::GAMING ,
203217 'subtype ' => Constants \DeviceSubType::CONSOLE
204218 ]);
0 commit comments