|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* This software package is licensed under `AGPL-3.0-only, proprietary` license[s]. |
|
5
|
|
|
* |
|
6
|
|
|
* @package maslosoft/manganel |
|
7
|
|
|
* @license AGPL-3.0-only, proprietary |
|
8
|
|
|
* |
|
9
|
|
|
* @copyright Copyright (c) Peter Maselkowski <[email protected]> |
|
10
|
|
|
* @link https://maslosoft.com/manganel/ |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
namespace Maslosoft\Manganel\Options; |
|
14
|
|
|
|
|
15
|
|
|
use Maslosoft\Addendum\Options\MetaOptions; |
|
16
|
|
|
use Maslosoft\Mangan\Options\ManganMetaOptions; |
|
17
|
|
|
use Maslosoft\Manganel\Annotations\SearchIndexAnnotation; |
|
18
|
|
|
use Maslosoft\Manganel\Meta\DocumentMethodMeta; |
|
19
|
|
|
use Maslosoft\Manganel\Meta\DocumentPropertyMeta; |
|
20
|
|
|
use Maslosoft\Manganel\Meta\DocumentTypeMeta; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* MetaOptions |
|
24
|
|
|
* |
|
25
|
|
|
* @author Piotr Maselkowski <pmaselkowski at gmail.com> |
|
26
|
|
|
*/ |
|
27
|
|
|
class ManganelMetaOptions extends MetaOptions |
|
28
|
|
|
{ |
|
29
|
|
|
|
|
30
|
|
|
/** |
|
31
|
|
|
* Meta container class name for type (class) |
|
32
|
|
|
* @var string |
|
33
|
|
|
*/ |
|
34
|
|
|
public $typeClass = DocumentTypeMeta::class; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* Meta container class name for method |
|
38
|
|
|
* @var string |
|
39
|
|
|
*/ |
|
40
|
|
|
public $methodClass = DocumentMethodMeta::class; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* Meta container class name for property |
|
44
|
|
|
* @var string |
|
45
|
|
|
*/ |
|
46
|
|
|
public $propertyClass = DocumentPropertyMeta::class; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* Namespaces for annotations |
|
50
|
|
|
* @var string |
|
51
|
|
|
*/ |
|
52
|
|
|
public $namespaces = [ |
|
53
|
|
|
SearchIndexAnnotation::Ns |
|
54
|
|
|
]; |
|
55
|
|
|
|
|
56
|
59 |
|
public function __construct() |
|
57
|
|
|
{ |
|
58
|
|
|
// Include Mangan annotations namespaces too |
|
59
|
59 |
|
$manganOptions = new ManganMetaOptions; |
|
60
|
59 |
|
$this->namespaces = array_merge($manganOptions->namespaces, $this->namespaces); |
|
|
|
|
|
|
61
|
59 |
|
} |
|
62
|
|
|
|
|
63
|
|
|
} |
|
64
|
|
|
|
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..