1 | <?php |
||
53 | class RequireWriteableContainer |
||
54 | { |
||
55 | /** |
||
56 | * a list of exception functions |
||
57 | * @var FactoryList |
||
58 | */ |
||
59 | private $exceptions; |
||
60 | |||
61 | /** |
||
62 | * a call stack filter to apply |
||
63 | * @var array |
||
64 | */ |
||
65 | private $defaultCallStackFilter = []; |
||
|
|||
66 | |||
67 | /** |
||
68 | * create a requirement that is ready to execute |
||
69 | * |
||
70 | * @param FactoryList|null $exceptions |
||
71 | * the functions to call when we want to throw an exception |
||
72 | * @param array $callStackFilter |
||
73 | * a list of classes to filter from the call stack analysis |
||
74 | * @return RequireWriteableContainer |
||
75 | */ |
||
76 | static public function apply(FactoryList $exceptions = null, array $callStackFilter = []) |
||
80 | |||
81 | /** |
||
82 | * our constructor |
||
83 | * |
||
84 | * @param FactoryList|null $exceptions |
||
85 | * the functions to call when we want to throw an exception |
||
86 | * @param array $callStackFilter |
||
87 | * a list of classes to filter from the call stack analysis |
||
88 | */ |
||
89 | protected function __construct(FactoryList $exceptions = null, array $callStackFilter = []) |
||
97 | |||
98 | /** |
||
99 | * throws exception if our requirement is not met |
||
100 | * |
||
101 | * @param FactoryList $container |
||
102 | * the container to examine |
||
103 | * @param string $fieldOrVarName |
||
104 | * what is the name of $container in the calling code? |
||
105 | * @return void |
||
106 | */ |
||
107 | public function to(FactoryList $container, $fieldOrVarName = '$container') |
||
115 | } |
||
116 |
This check marks private properties in classes that are never used. Those properties can be removed.