| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function forRequest(ServerRequestInterface $request): ?QuotaPolicy |
||
| 25 | { |
||
| 26 | $path = $request->getUri()->getPath(); |
||
| 27 | |||
| 28 | foreach ($this->pathPatternQuotaPolicyMap as $pattern => $quotaPolicy) { |
||
| 29 | if (preg_match($pattern, $path)) { |
||
| 30 | return $quotaPolicy; |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | return null; |
||
| 35 | } |
||
| 36 | } |
||
| 37 |