File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 106
106
<code ><![CDATA[ \InteractionDesignFoundation\GeoIP\Contracts\ServiceInterface]]> </code >
107
107
</MoreSpecificReturnType >
108
108
<PossiblyNullArgument >
109
- <code ><![CDATA[ $ip]]> </code >
110
109
<code ><![CDATA[ $location->iso_code]]> </code >
111
110
<code ><![CDATA[ $this->currencies]]> </code >
112
111
</PossiblyNullArgument >
Original file line number Diff line number Diff line change @@ -269,9 +269,14 @@ private function isValid($ip): bool
269
269
* @param string|null $ip
270
270
*
271
271
* @return bool
272
+ * @psalm-assert-if-true string $ip
272
273
*/
273
- private function shouldCache (Location $ location , $ ip = null ): bool
274
+ private function shouldCache (Location $ location , ? string $ ip = null ): bool
274
275
{
276
+ if ($ ip === null ) {
277
+ return false ;
278
+ }
279
+
275
280
if ($ location ->default === true || $ location ->cached === true ) {
276
281
return false ;
277
282
}
You can’t perform that action at this time.
0 commit comments