| 1 | <?php |
||
| 23 | class PaginationService { |
||
| 24 | |||
| 25 | use ServicePaginatorTrait; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Server Request Object |
||
| 29 | * |
||
| 30 | * @var \Cake\Http\ServerRequest|null $request Server Request |
||
| 31 | */ |
||
| 32 | protected $request; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Constructor |
||
| 36 | * |
||
| 37 | * @param \Cake\Http\ServerRequest $request Server Request |
||
| 38 | */ |
||
| 39 | 1 | public function __construct(ServerRequest $request) |
|
| 48 | } |
||
| 49 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: