1 | <?php |
||
8 | class QueryResult implements CacheableDependencyInterface { |
||
9 | |||
10 | /** |
||
11 | * The query result. |
||
12 | * |
||
13 | * @var mixed |
||
14 | */ |
||
15 | protected $data; |
||
16 | |||
17 | /** |
||
18 | * Merged cache metadata from the response and the schema. |
||
19 | * |
||
20 | * @var \Drupal\Core\Cache\CacheableDependencyInterface |
||
21 | */ |
||
22 | protected $metadata; |
||
23 | |||
24 | /** |
||
25 | * Cache metadata collected during query execution. |
||
26 | * |
||
27 | * @var \Drupal\Core\Cache\CacheableDependencyInterface |
||
28 | */ |
||
29 | protected $responseMetadata; |
||
30 | |||
31 | /** |
||
32 | * Static response cache metadata from the schema. |
||
33 | * |
||
34 | * @var \Drupal\Core\Cache\CacheableDependencyInterface |
||
35 | */ |
||
36 | protected $schemaResponseMetadata; |
||
37 | |||
38 | /** |
||
39 | * QueryResult constructor. |
||
40 | * |
||
41 | * @param $data |
||
42 | * Result data. |
||
43 | * @param \Drupal\Core\Cache\CacheableDependencyInterface $responseMetadata |
||
44 | * The cache metadata collected during query execution. |
||
45 | * @param \Drupal\Core\Cache\CacheableDependencyInterface $schemaResponseMetadata |
||
46 | * The schema's response cache metadata. |
||
47 | */ |
||
48 | public function __construct($data, CacheableDependencyInterface $responseMetadata, CacheableDependencyInterface $schemaResponseMetadata) { |
||
57 | |||
58 | /** |
||
59 | * Retrieve query result data. |
||
60 | * |
||
61 | * @return mixed |
||
62 | * The result data object. |
||
63 | */ |
||
64 | public function getData() { |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function getCacheContexts() { |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function getCacheTags() { |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function getCacheMaxAge() { |
||
88 | |||
89 | /** |
||
90 | * Gets the response cache metadata. |
||
91 | * |
||
92 | * @return \Drupal\Core\Cache\CacheableDependencyInterface |
||
93 | * The response cache metadata. |
||
94 | */ |
||
95 | public function getResponseMetadata() { |
||
98 | |||
99 | /** |
||
100 | * Gets the schema's response cache metadata. |
||
101 | * |
||
102 | * @return \Drupal\Core\Cache\CacheableDependencyInterface |
||
103 | * The schema's response cache metadata. |
||
104 | */ |
||
105 | public function getSchemaResponseMetadata() { |
||
108 | |||
109 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..