File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 77use Illuminate \Support \Facades \Facade ;
88
99/**
10+ * @method static \InteractionDesignFoundation\GeoIP\Location getLocation(string|null $ip)
11+ * @method static string getCurrency(string $iso)
12+ * @method static \InteractionDesignFoundation\GeoIP\Contracts\ServiceInterface getService()
1013 * @mixin \InteractionDesignFoundation\GeoIP\GeoIP
1114 */
1215class GeoIP extends Facade
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ public function getLocation($ip = null)
133133 * @return \InteractionDesignFoundation\GeoIP\Location
134134 * @throws \Exception
135135 */
136- private function find ($ ip = null )
136+ private function find ($ ip = null ): Location
137137 {
138138 // If IP not set, user remote IP
139139 $ ip = $ ip ?: $ this ->remote_ip ;
Original file line number Diff line number Diff line change 2525 * @property string|null $currency
2626 * @property bool $default
2727 * @property bool $cached
28+ * @property-read string $displayName {@see static::getDisplayNameAttribute()}
2829 */
2930class Location implements ArrayAccess
3031{
Original file line number Diff line number Diff line change 66 /**
77 * Get the location of the provided IP.
88 *
9- * @param string $ip
10- *
9+ * @param string|null $ip
1110 * @return \InteractionDesignFoundation\GeoIP\GeoIP|\InteractionDesignFoundation\GeoIP\Location
11+ * @psalm-return ($ip is null ? \InteractionDesignFoundation\GeoIP\GeoIP : \InteractionDesignFoundation\GeoIP\Location)
12+ * @throws \Exception
1213 */
1314 function geoip ($ ip = null )
1415 {
15- if (is_null ( $ ip) ) {
16+ if ($ ip === null ) {
1617 return app ('geoip ' );
1718 }
1819
You can’t perform that action at this time.
0 commit comments