| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class EtagConditionals |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The callback used to generate the ETag. |
||
| 14 | * |
||
| 15 | * @var \Closure|null |
||
| 16 | */ |
||
| 17 | protected static $etagGenerateCallback; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Set a callback that should be used when generating the ETag. |
||
| 21 | * |
||
| 22 | * @param \Closure|null $callback |
||
| 23 | * @return void |
||
| 24 | */ |
||
| 25 | public static function etagGenerateUsing(?Closure $callback): void |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get ETag value for this request and response. |
||
| 32 | * |
||
| 33 | * @param \Illuminate\Http\Request $request |
||
| 34 | * @param \Symfony\Component\HttpFoundation\Response $response |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | public static function getEtag(Request $request, Response $response): string |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Get default ETag value. |
||
| 50 | * |
||
| 51 | * @param \Symfony\Component\HttpFoundation\Response $response |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | private static function defaultGetEtag(Response $response): string |
||
| 59 |