Skip to content
This repository was archived by the owner on May 26, 2024. It is now read-only.

Commit defbaf3

Browse files
authored
Merge pull request #3 from joserick/master
chore: Added @method tags in agent facade to use in IDE.
2 parents 08e1ed6 + 10579cf commit defbaf3

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

src/Agent.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ public static function getOperatingSystems()
143143
);
144144
}
145145

146+
/**
147+
* Get the platforms array.
148+
* @return array
149+
*/
146150
public static function getPlatforms()
147151
{
148152
return static::mergeRules(
@@ -151,6 +155,10 @@ public static function getPlatforms()
151155
);
152156
}
153157

158+
/**
159+
* Get the desktop devices array.
160+
* @return array
161+
*/
154162
public static function getDesktopDevices()
155163
{
156164
return static::$desktopDevices;

src/Facades/Agent.php

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,55 @@
44

55
use Illuminate\Support\Facades\Facade;
66

7+
/**
8+
* @method static array getDetectionRulesExtended()
9+
* @method static array getRules()
10+
* @method static CrawlerDetect getCrawlerDetect()
11+
* @method static array getBrowsers()
12+
* @method static array getOperatingSystems()
13+
* @method static array getPlatforms()
14+
* @method static array getDesktopDevices()
15+
* @method static array getProperties()
16+
* @method static array languages(string $acceptLanguage = null)
17+
* @method static string|bool browser(string|null $userAgent = null)
18+
* @method static string|bool platform(string|null $userAgent = null)
19+
* @method static string|bool device(string|null $userAgent = null)
20+
* @method static bool isDesktop(string|null $userAgent = null, array $httpHeaders = null)
21+
* @method static bool isPhone(string|null $userAgent = null, array $httpHeaders = null)
22+
* @method static string|bool robot(string|null $userAgent = null)
23+
* @method static bool isRobot(string|null $userAgent = null)
24+
* @method static string deviceType(null $userAgent = null, null $httpHeaders = null)
25+
* @method static string|float|false version($propertyName, $type = \Phattarachai\LaravelMobileDetect\Agent::VERSION_TYPE_STRING)
26+
* @method static string getScriptVersion()
27+
* @method static void setHttpHeaders(array $httpHeaders = null)
28+
* @method static array getHttpHeaders()
29+
* @method static string|null getHttpHeader(string $header)
30+
* @method static array getMobileHeaders()
31+
* @method static array getUaHttpHeaders()
32+
* @method static boolean setCfHeaders(array $cfHeaders = null)
33+
* @method static array getCfHeaders()
34+
* @method static string|null setUserAgent(string $userAgent = null)
35+
* @method static string|null getUserAgent()
36+
* @method static setDetectionType(string $type = null)
37+
* @method static string getMatchingRegex()
38+
* @method static string getMatchesArray()
39+
* @method static array getPhoneDevices()
40+
* @method static array getTabletDevices()
41+
* @method static array getUserAgents()
42+
* @method static array getUtilities()
43+
* @method static array getMobileDetectionRules()
44+
* @method static array getMobileDetectionRulesExtended()
45+
* @method static bool checkHttpHeadersForMobile()
46+
* @method static bool isMobile(null $userAgent = null, null $httpHeaders = null)
47+
* @method static bool isTablet(string $userAgent = null, array $httpHeaders = null)
48+
* @method static bool|int|null is(string $key, string $userAgent = null, string $httpHeaders = null)
49+
* @method static bool match($regex, string $userAgent = null)
50+
* @method static float prepareVersionNo(string $ver)
51+
* @method static string mobileGrade()
52+
*
53+
* @see \Phattarachai\LaravelMobileDetect\Agent
54+
*/
55+
756
class Agent extends Facade
857
{
958
/**

0 commit comments

Comments
 (0)