1 | <?php |
||
10 | final class MasterSeoRequest |
||
11 | { |
||
12 | /** @var DestinationInterface */ |
||
13 | private $destination; |
||
14 | /** @var SeoPageInterface */ |
||
15 | private $page; |
||
16 | /** @var DestinationMatcherInterface */ |
||
17 | private $matcher; |
||
18 | |||
19 | /** |
||
20 | * MasterSeoRequest constructor. |
||
21 | * |
||
22 | * @param DestinationMatcherInterface $matcher |
||
23 | */ |
||
24 | public function __construct(DestinationMatcherInterface $matcher) |
||
28 | |||
29 | |||
30 | /** |
||
31 | * @return DestinationInterface|null |
||
32 | * @throws \LogicException |
||
33 | */ |
||
34 | public function getDestination() |
||
42 | |||
43 | /** |
||
44 | * @param DestinationInterface $destination |
||
45 | */ |
||
46 | public function setDestination(DestinationInterface $destination) |
||
50 | |||
51 | /** |
||
52 | * @return SeoPageInterface |
||
53 | * @throws \LogicException |
||
54 | * @throws MatchingException |
||
55 | */ |
||
56 | public function getPage() |
||
64 | } |
||
65 |
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: