File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 106106 <code ><![CDATA[ \InteractionDesignFoundation\GeoIP\Contracts\ServiceInterface]]> </code >
107107 </MoreSpecificReturnType >
108108 <PossiblyNullArgument >
109- <code ><![CDATA[ $ip]]> </code >
110109 <code ><![CDATA[ $location->iso_code]]> </code >
111110 <code ><![CDATA[ $this->currencies]]> </code >
112111 </PossiblyNullArgument >
Original file line number Diff line number Diff line change @@ -269,9 +269,14 @@ private function isValid($ip): bool
269269 * @param string|null $ip
270270 *
271271 * @return bool
272+ * @psalm-assert-if-true string $ip
272273 */
273- private function shouldCache (Location $ location , $ ip = null ): bool
274+ private function shouldCache (Location $ location , ? string $ ip = null ): bool
274275 {
276+ if ($ ip === null ) {
277+ return false ;
278+ }
279+
275280 if ($ location ->default === true || $ location ->cached === true ) {
276281 return false ;
277282 }
You can’t perform that action at this time.
0 commit comments