1 | <?php |
||
8 | class MinifyContext |
||
9 | { |
||
10 | /** |
||
11 | * @var \ArjanSchouten\HtmlMinifier\PlaceholderContainer |
||
12 | */ |
||
13 | private $placeholderContainer; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $contents; |
||
19 | |||
20 | /** |
||
21 | * @var \ArjanSchouten\HtmlMinifier\Statistics\StatisticsInterface |
||
22 | */ |
||
23 | private $statistics; |
||
24 | |||
25 | /** |
||
26 | * @param \ArjanSchouten\HtmlMinifier\PlaceholderContainer $placeholderContainer |
||
27 | * @param \ArjanSchouten\HtmlMinifier\Statistics\StatisticsInterface|null $statistics |
||
28 | */ |
||
29 | 30 | public function __construct(PlaceholderContainer $placeholderContainer, StatisticsInterface $statistics = null) |
|
34 | |||
35 | /** |
||
36 | * Get the placeholdercontainer. |
||
37 | * |
||
38 | * @return \ArjanSchouten\HtmlMinifier\PlaceholderContainer |
||
39 | */ |
||
40 | 10 | public function getPlaceholderContainer() |
|
44 | |||
45 | /** |
||
46 | * @return string |
||
47 | */ |
||
48 | 30 | public function getContents() |
|
52 | |||
53 | /** |
||
54 | * @param string $contents |
||
55 | * |
||
56 | * @return $this |
||
57 | */ |
||
58 | 30 | public function setContents($contents) |
|
64 | |||
65 | /** |
||
66 | * Add a minification step. |
||
67 | * |
||
68 | * @param string $input |
||
69 | * @param string $keyName |
||
|
|||
70 | */ |
||
71 | 3 | public function addMinificationStep($input, $keyName = null) |
|
81 | |||
82 | /** |
||
83 | * Get the minification statistics. |
||
84 | * |
||
85 | * @return \ArjanSchouten\HtmlMinifier\Statistics\StatisticsInterface |
||
86 | */ |
||
87 | 1 | public function getStatistics() |
|
91 | } |
||
92 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.