@@ -13,19 +13,19 @@ |
||
13 | 13 | */ |
14 | 14 | class MatchAnyRouteSpecification extends MultiRouteSpecification |
15 | 15 | { |
16 | - /** |
|
17 | - * returns true if current request matches specification |
|
18 | - * |
|
19 | - * @since 4.9.71.p |
|
20 | - * @return boolean |
|
21 | - */ |
|
22 | - public function isMatchingRoute() |
|
23 | - { |
|
24 | - foreach ($this->specifications as $specification) { |
|
25 | - if ($specification->isMatchingRoute()) { |
|
26 | - return true; |
|
27 | - } |
|
28 | - } |
|
29 | - return false; |
|
30 | - } |
|
16 | + /** |
|
17 | + * returns true if current request matches specification |
|
18 | + * |
|
19 | + * @since 4.9.71.p |
|
20 | + * @return boolean |
|
21 | + */ |
|
22 | + public function isMatchingRoute() |
|
23 | + { |
|
24 | + foreach ($this->specifications as $specification) { |
|
25 | + if ($specification->isMatchingRoute()) { |
|
26 | + return true; |
|
27 | + } |
|
28 | + } |
|
29 | + return false; |
|
30 | + } |
|
31 | 31 | } |
@@ -12,18 +12,18 @@ |
||
12 | 12 | */ |
13 | 13 | abstract class RouteMatchSpecificationDecorator implements RouteMatchSpecificationInterface |
14 | 14 | { |
15 | - /** |
|
16 | - * @var RouteMatchSpecificationInterface $specification |
|
17 | - */ |
|
18 | - protected $specification; |
|
15 | + /** |
|
16 | + * @var RouteMatchSpecificationInterface $specification |
|
17 | + */ |
|
18 | + protected $specification; |
|
19 | 19 | |
20 | - /** |
|
21 | - * RouteMatchSpecificationDecorator constructor. |
|
22 | - * |
|
23 | - * @param RouteMatchSpecificationInterface $specification |
|
24 | - */ |
|
25 | - public function __construct(RouteMatchSpecificationInterface $specification) |
|
26 | - { |
|
27 | - $this->specification = $specification; |
|
28 | - } |
|
20 | + /** |
|
21 | + * RouteMatchSpecificationDecorator constructor. |
|
22 | + * |
|
23 | + * @param RouteMatchSpecificationInterface $specification |
|
24 | + */ |
|
25 | + public function __construct(RouteMatchSpecificationInterface $specification) |
|
26 | + { |
|
27 | + $this->specification = $specification; |
|
28 | + } |
|
29 | 29 | } |
@@ -23,17 +23,17 @@ |
||
23 | 23 | */ |
24 | 24 | abstract class RouteMatchSpecification implements RouteMatchSpecificationInterface |
25 | 25 | { |
26 | - /** |
|
27 | - * @var RequestInterface $request |
|
28 | - */ |
|
29 | - protected $request; |
|
26 | + /** |
|
27 | + * @var RequestInterface $request |
|
28 | + */ |
|
29 | + protected $request; |
|
30 | 30 | |
31 | - /** |
|
32 | - * RouteMatch constructor. |
|
33 | - * @param RequestInterface $request |
|
34 | - */ |
|
35 | - public function __construct(RequestInterface $request) |
|
36 | - { |
|
37 | - $this->request = $request; |
|
38 | - } |
|
31 | + /** |
|
32 | + * RouteMatch constructor. |
|
33 | + * @param RequestInterface $request |
|
34 | + */ |
|
35 | + public function __construct(RequestInterface $request) |
|
36 | + { |
|
37 | + $this->request = $request; |
|
38 | + } |
|
39 | 39 | } |
@@ -21,20 +21,20 @@ |
||
21 | 21 | */ |
22 | 22 | class RouteMatchSpecificationDependencyResolver extends DependencyResolver |
23 | 23 | { |
24 | - /** |
|
25 | - * Used to configure and/or setup any aliases or namespace roots required by the DependencyResolver |
|
26 | - * |
|
27 | - * @since 4.9.71.p |
|
28 | - * @throws InvalidAliasException |
|
29 | - */ |
|
30 | - public function initialize() |
|
31 | - { |
|
32 | - $this->addAlias( |
|
33 | - new ClassAlias( |
|
34 | - 'EventEspresso\core\services\request\RequestInterface', |
|
35 | - 'EventEspresso\core\services\request\Request' |
|
36 | - ) |
|
37 | - ); |
|
38 | - $this->addNamespaceRoot('EventEspresso\core\domain\entities\route_match\specifications'); |
|
39 | - } |
|
24 | + /** |
|
25 | + * Used to configure and/or setup any aliases or namespace roots required by the DependencyResolver |
|
26 | + * |
|
27 | + * @since 4.9.71.p |
|
28 | + * @throws InvalidAliasException |
|
29 | + */ |
|
30 | + public function initialize() |
|
31 | + { |
|
32 | + $this->addAlias( |
|
33 | + new ClassAlias( |
|
34 | + 'EventEspresso\core\services\request\RequestInterface', |
|
35 | + 'EventEspresso\core\services\request\Request' |
|
36 | + ) |
|
37 | + ); |
|
38 | + $this->addNamespaceRoot('EventEspresso\core\domain\entities\route_match\specifications'); |
|
39 | + } |
|
40 | 40 | } |
@@ -23,46 +23,46 @@ |
||
23 | 23 | */ |
24 | 24 | class RouteMatchSpecificationFactory extends FactoryWithDependencyResolver |
25 | 25 | { |
26 | - /** |
|
27 | - * RouteMatchSpecificationFactory constructor |
|
28 | - * |
|
29 | - * @param RouteMatchSpecificationDependencyResolver $dependency_resolver |
|
30 | - * @param LoaderInterface $loader |
|
31 | - */ |
|
32 | - public function __construct(RouteMatchSpecificationDependencyResolver $dependency_resolver, LoaderInterface $loader) |
|
33 | - { |
|
34 | - parent::__construct($dependency_resolver, $loader); |
|
35 | - } |
|
26 | + /** |
|
27 | + * RouteMatchSpecificationFactory constructor |
|
28 | + * |
|
29 | + * @param RouteMatchSpecificationDependencyResolver $dependency_resolver |
|
30 | + * @param LoaderInterface $loader |
|
31 | + */ |
|
32 | + public function __construct(RouteMatchSpecificationDependencyResolver $dependency_resolver, LoaderInterface $loader) |
|
33 | + { |
|
34 | + parent::__construct($dependency_resolver, $loader); |
|
35 | + } |
|
36 | 36 | |
37 | - /** |
|
38 | - * @param $fqcn |
|
39 | - * @return RouteMatchSpecification |
|
40 | - * @throws InvalidDataTypeException |
|
41 | - * @throws ReflectionException |
|
42 | - * @since 4.9.71.p |
|
43 | - */ |
|
44 | - public function createNewRouteMatchSpecification($fqcn) |
|
45 | - { |
|
46 | - $this->dependencyResolver()->resolveDependenciesForClass($fqcn); |
|
47 | - return $this->loader()->getShared($fqcn); |
|
48 | - } |
|
37 | + /** |
|
38 | + * @param $fqcn |
|
39 | + * @return RouteMatchSpecification |
|
40 | + * @throws InvalidDataTypeException |
|
41 | + * @throws ReflectionException |
|
42 | + * @since 4.9.71.p |
|
43 | + */ |
|
44 | + public function createNewRouteMatchSpecification($fqcn) |
|
45 | + { |
|
46 | + $this->dependencyResolver()->resolveDependenciesForClass($fqcn); |
|
47 | + return $this->loader()->getShared($fqcn); |
|
48 | + } |
|
49 | 49 | |
50 | 50 | |
51 | - /** |
|
52 | - * @param $fqcn |
|
53 | - * @return RouteMatchSpecification |
|
54 | - * @throws InvalidArgumentException |
|
55 | - * @throws InvalidDataTypeException |
|
56 | - * @throws InvalidInterfaceException |
|
57 | - * @throws ReflectionException |
|
58 | - * @since 4.9.71.p |
|
59 | - */ |
|
60 | - public static function create($fqcn) |
|
61 | - { |
|
62 | - /** @var RouteMatchSpecificationFactory $specification_factory */ |
|
63 | - $specification_factory = LoaderFactory::getLoader()->getShared( |
|
64 | - 'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' |
|
65 | - ); |
|
66 | - return $specification_factory->createNewRouteMatchSpecification($fqcn); |
|
67 | - } |
|
51 | + /** |
|
52 | + * @param $fqcn |
|
53 | + * @return RouteMatchSpecification |
|
54 | + * @throws InvalidArgumentException |
|
55 | + * @throws InvalidDataTypeException |
|
56 | + * @throws InvalidInterfaceException |
|
57 | + * @throws ReflectionException |
|
58 | + * @since 4.9.71.p |
|
59 | + */ |
|
60 | + public static function create($fqcn) |
|
61 | + { |
|
62 | + /** @var RouteMatchSpecificationFactory $specification_factory */ |
|
63 | + $specification_factory = LoaderFactory::getLoader()->getShared( |
|
64 | + 'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' |
|
65 | + ); |
|
66 | + return $specification_factory->createNewRouteMatchSpecification($fqcn); |
|
67 | + } |
|
68 | 68 | } |
@@ -15,36 +15,36 @@ |
||
15 | 15 | */ |
16 | 16 | class RouteMatchSpecificationCollection extends Collection |
17 | 17 | { |
18 | - const COLLECTION_NAME = 'route_match_specifications'; |
|
18 | + const COLLECTION_NAME = 'route_match_specifications'; |
|
19 | 19 | |
20 | 20 | |
21 | - /** |
|
22 | - * RouteMatchSpecificationCollection constructor |
|
23 | - * |
|
24 | - * @throws InvalidInterfaceException |
|
25 | - */ |
|
26 | - public function __construct() |
|
27 | - { |
|
28 | - parent::__construct( |
|
29 | - 'EventEspresso\core\domain\entities\route_match\RouteMatchSpecificationInterface', |
|
30 | - RouteMatchSpecificationCollection::COLLECTION_NAME |
|
31 | - ); |
|
32 | - } |
|
21 | + /** |
|
22 | + * RouteMatchSpecificationCollection constructor |
|
23 | + * |
|
24 | + * @throws InvalidInterfaceException |
|
25 | + */ |
|
26 | + public function __construct() |
|
27 | + { |
|
28 | + parent::__construct( |
|
29 | + 'EventEspresso\core\domain\entities\route_match\RouteMatchSpecificationInterface', |
|
30 | + RouteMatchSpecificationCollection::COLLECTION_NAME |
|
31 | + ); |
|
32 | + } |
|
33 | 33 | |
34 | 34 | |
35 | - /** |
|
36 | - * getIdentifier |
|
37 | - * Overrides EventEspresso\core\services\collections\Collection::getIdentifier() |
|
38 | - * If no $identifier is supplied, then the fully qualified class name is used |
|
39 | - * |
|
40 | - * @param $object |
|
41 | - * @param mixed $identifier |
|
42 | - * @return bool |
|
43 | - */ |
|
44 | - public function getIdentifier($object, $identifier = null) |
|
45 | - { |
|
46 | - return ! empty($identifier) |
|
47 | - ? $identifier |
|
48 | - : get_class($object); |
|
49 | - } |
|
35 | + /** |
|
36 | + * getIdentifier |
|
37 | + * Overrides EventEspresso\core\services\collections\Collection::getIdentifier() |
|
38 | + * If no $identifier is supplied, then the fully qualified class name is used |
|
39 | + * |
|
40 | + * @param $object |
|
41 | + * @param mixed $identifier |
|
42 | + * @return bool |
|
43 | + */ |
|
44 | + public function getIdentifier($object, $identifier = null) |
|
45 | + { |
|
46 | + return ! empty($identifier) |
|
47 | + ? $identifier |
|
48 | + : get_class($object); |
|
49 | + } |
|
50 | 50 | } |
@@ -13,218 +13,218 @@ |
||
13 | 13 | */ |
14 | 14 | class NoticesContainer implements NoticesContainerInterface |
15 | 15 | { |
16 | - /** |
|
17 | - * @var NoticeInterface[] $information |
|
18 | - */ |
|
19 | - private $information = array(); |
|
20 | - |
|
21 | - |
|
22 | - /** |
|
23 | - * @var NoticeInterface[] $attention |
|
24 | - */ |
|
25 | - private $attention = array(); |
|
26 | - |
|
27 | - |
|
28 | - /** |
|
29 | - * @var NoticeInterface[] $error |
|
30 | - */ |
|
31 | - private $error = array(); |
|
32 | - |
|
33 | - |
|
34 | - /** |
|
35 | - * @var NoticeInterface[] $success |
|
36 | - */ |
|
37 | - private $success = array(); |
|
38 | - |
|
39 | - |
|
40 | - /** |
|
41 | - * @param string $notice |
|
42 | - * @param bool $dismissible |
|
43 | - * @param string $file |
|
44 | - * @param string $func |
|
45 | - * @param string $line |
|
46 | - * @throws InvalidDataTypeException |
|
47 | - */ |
|
48 | - public function addInformation($notice, $dismissible = true, $file = '', $func = '', $line = '') |
|
49 | - { |
|
50 | - $this->information[] = new Notice( |
|
51 | - Notice::INFORMATION, |
|
52 | - $notice, |
|
53 | - $dismissible, |
|
54 | - $file, |
|
55 | - $func, |
|
56 | - $line |
|
57 | - ); |
|
58 | - } |
|
59 | - |
|
60 | - |
|
61 | - /** |
|
62 | - * @param string $notice |
|
63 | - * @param bool $dismissible |
|
64 | - * @param string $file |
|
65 | - * @param string $func |
|
66 | - * @param string $line |
|
67 | - * @throws InvalidDataTypeException |
|
68 | - */ |
|
69 | - public function addAttention($notice, $dismissible = true, $file = '', $func = '', $line = '') |
|
70 | - { |
|
71 | - $this->attention[] = new Notice( |
|
72 | - Notice::ATTENTION, |
|
73 | - $notice, |
|
74 | - $dismissible, |
|
75 | - $file, |
|
76 | - $func, |
|
77 | - $line |
|
78 | - ); |
|
79 | - } |
|
80 | - |
|
81 | - // phpcs:disable PEAR.Functions.ValidDefaultValue.NotAtEnd |
|
82 | - /** |
|
83 | - * @param string $notice |
|
84 | - * @param bool $dismissible |
|
85 | - * @param string $file |
|
86 | - * @param string $func |
|
87 | - * @param string $line |
|
88 | - * @throws InvalidDataTypeException |
|
89 | - */ |
|
90 | - public function addError($notice, $dismissible = true, $file = '', $func = '', $line = '') |
|
91 | - { |
|
92 | - $this->error[] = new Notice( |
|
93 | - Notice::ERROR, |
|
94 | - $notice, |
|
95 | - $dismissible, |
|
96 | - $file, |
|
97 | - $func, |
|
98 | - $line |
|
99 | - ); |
|
100 | - } |
|
101 | - |
|
102 | - |
|
103 | - /** |
|
104 | - * @param string $notice |
|
105 | - * @param bool $dismissible |
|
106 | - * @param string $file |
|
107 | - * @param string $func |
|
108 | - * @param string $line |
|
109 | - * @throws InvalidDataTypeException |
|
110 | - */ |
|
111 | - public function addSuccess($notice, $dismissible = true, $file = '', $func = '', $line = '') |
|
112 | - { |
|
113 | - $this->success[] = new Notice( |
|
114 | - Notice::SUCCESS, |
|
115 | - $notice, |
|
116 | - $dismissible, |
|
117 | - $file, |
|
118 | - $func, |
|
119 | - $line |
|
120 | - ); |
|
121 | - } |
|
122 | - |
|
123 | - |
|
124 | - /** |
|
125 | - * @return boolean |
|
126 | - */ |
|
127 | - public function hasInformation() |
|
128 | - { |
|
129 | - return ! empty($this->information); |
|
130 | - } |
|
131 | - |
|
132 | - |
|
133 | - /** |
|
134 | - * @return boolean |
|
135 | - */ |
|
136 | - public function hasAttention() |
|
137 | - { |
|
138 | - return ! empty($this->attention); |
|
139 | - } |
|
140 | - |
|
141 | - |
|
142 | - /** |
|
143 | - * @return boolean |
|
144 | - */ |
|
145 | - public function hasError() |
|
146 | - { |
|
147 | - return ! empty($this->error); |
|
148 | - } |
|
149 | - |
|
150 | - |
|
151 | - /** |
|
152 | - * @return boolean |
|
153 | - */ |
|
154 | - public function hasSuccess() |
|
155 | - { |
|
156 | - return ! empty($this->success); |
|
157 | - } |
|
158 | - |
|
159 | - |
|
160 | - /** |
|
161 | - * @return int |
|
162 | - */ |
|
163 | - public function countInformation() |
|
164 | - { |
|
165 | - return count($this->information); |
|
166 | - } |
|
167 | - |
|
168 | - |
|
169 | - /** |
|
170 | - * @return int |
|
171 | - */ |
|
172 | - public function countAttention() |
|
173 | - { |
|
174 | - return count($this->attention); |
|
175 | - } |
|
176 | - |
|
177 | - |
|
178 | - /** |
|
179 | - * @return int |
|
180 | - */ |
|
181 | - public function countError() |
|
182 | - { |
|
183 | - return count($this->error); |
|
184 | - } |
|
185 | - |
|
186 | - |
|
187 | - /** |
|
188 | - * @return int |
|
189 | - */ |
|
190 | - public function countSuccess() |
|
191 | - { |
|
192 | - return count($this->success); |
|
193 | - } |
|
194 | - |
|
195 | - |
|
196 | - /** |
|
197 | - * @return NoticeInterface[] |
|
198 | - */ |
|
199 | - public function getInformation() |
|
200 | - { |
|
201 | - return $this->information; |
|
202 | - } |
|
203 | - |
|
204 | - |
|
205 | - /** |
|
206 | - * @return NoticeInterface[] |
|
207 | - */ |
|
208 | - public function getAttention() |
|
209 | - { |
|
210 | - return $this->attention; |
|
211 | - } |
|
212 | - |
|
213 | - |
|
214 | - /** |
|
215 | - * @return NoticeInterface[] |
|
216 | - */ |
|
217 | - public function getError() |
|
218 | - { |
|
219 | - return $this->error; |
|
220 | - } |
|
221 | - |
|
222 | - |
|
223 | - /** |
|
224 | - * @return NoticeInterface[] |
|
225 | - */ |
|
226 | - public function getSuccess() |
|
227 | - { |
|
228 | - return $this->success; |
|
229 | - } |
|
16 | + /** |
|
17 | + * @var NoticeInterface[] $information |
|
18 | + */ |
|
19 | + private $information = array(); |
|
20 | + |
|
21 | + |
|
22 | + /** |
|
23 | + * @var NoticeInterface[] $attention |
|
24 | + */ |
|
25 | + private $attention = array(); |
|
26 | + |
|
27 | + |
|
28 | + /** |
|
29 | + * @var NoticeInterface[] $error |
|
30 | + */ |
|
31 | + private $error = array(); |
|
32 | + |
|
33 | + |
|
34 | + /** |
|
35 | + * @var NoticeInterface[] $success |
|
36 | + */ |
|
37 | + private $success = array(); |
|
38 | + |
|
39 | + |
|
40 | + /** |
|
41 | + * @param string $notice |
|
42 | + * @param bool $dismissible |
|
43 | + * @param string $file |
|
44 | + * @param string $func |
|
45 | + * @param string $line |
|
46 | + * @throws InvalidDataTypeException |
|
47 | + */ |
|
48 | + public function addInformation($notice, $dismissible = true, $file = '', $func = '', $line = '') |
|
49 | + { |
|
50 | + $this->information[] = new Notice( |
|
51 | + Notice::INFORMATION, |
|
52 | + $notice, |
|
53 | + $dismissible, |
|
54 | + $file, |
|
55 | + $func, |
|
56 | + $line |
|
57 | + ); |
|
58 | + } |
|
59 | + |
|
60 | + |
|
61 | + /** |
|
62 | + * @param string $notice |
|
63 | + * @param bool $dismissible |
|
64 | + * @param string $file |
|
65 | + * @param string $func |
|
66 | + * @param string $line |
|
67 | + * @throws InvalidDataTypeException |
|
68 | + */ |
|
69 | + public function addAttention($notice, $dismissible = true, $file = '', $func = '', $line = '') |
|
70 | + { |
|
71 | + $this->attention[] = new Notice( |
|
72 | + Notice::ATTENTION, |
|
73 | + $notice, |
|
74 | + $dismissible, |
|
75 | + $file, |
|
76 | + $func, |
|
77 | + $line |
|
78 | + ); |
|
79 | + } |
|
80 | + |
|
81 | + // phpcs:disable PEAR.Functions.ValidDefaultValue.NotAtEnd |
|
82 | + /** |
|
83 | + * @param string $notice |
|
84 | + * @param bool $dismissible |
|
85 | + * @param string $file |
|
86 | + * @param string $func |
|
87 | + * @param string $line |
|
88 | + * @throws InvalidDataTypeException |
|
89 | + */ |
|
90 | + public function addError($notice, $dismissible = true, $file = '', $func = '', $line = '') |
|
91 | + { |
|
92 | + $this->error[] = new Notice( |
|
93 | + Notice::ERROR, |
|
94 | + $notice, |
|
95 | + $dismissible, |
|
96 | + $file, |
|
97 | + $func, |
|
98 | + $line |
|
99 | + ); |
|
100 | + } |
|
101 | + |
|
102 | + |
|
103 | + /** |
|
104 | + * @param string $notice |
|
105 | + * @param bool $dismissible |
|
106 | + * @param string $file |
|
107 | + * @param string $func |
|
108 | + * @param string $line |
|
109 | + * @throws InvalidDataTypeException |
|
110 | + */ |
|
111 | + public function addSuccess($notice, $dismissible = true, $file = '', $func = '', $line = '') |
|
112 | + { |
|
113 | + $this->success[] = new Notice( |
|
114 | + Notice::SUCCESS, |
|
115 | + $notice, |
|
116 | + $dismissible, |
|
117 | + $file, |
|
118 | + $func, |
|
119 | + $line |
|
120 | + ); |
|
121 | + } |
|
122 | + |
|
123 | + |
|
124 | + /** |
|
125 | + * @return boolean |
|
126 | + */ |
|
127 | + public function hasInformation() |
|
128 | + { |
|
129 | + return ! empty($this->information); |
|
130 | + } |
|
131 | + |
|
132 | + |
|
133 | + /** |
|
134 | + * @return boolean |
|
135 | + */ |
|
136 | + public function hasAttention() |
|
137 | + { |
|
138 | + return ! empty($this->attention); |
|
139 | + } |
|
140 | + |
|
141 | + |
|
142 | + /** |
|
143 | + * @return boolean |
|
144 | + */ |
|
145 | + public function hasError() |
|
146 | + { |
|
147 | + return ! empty($this->error); |
|
148 | + } |
|
149 | + |
|
150 | + |
|
151 | + /** |
|
152 | + * @return boolean |
|
153 | + */ |
|
154 | + public function hasSuccess() |
|
155 | + { |
|
156 | + return ! empty($this->success); |
|
157 | + } |
|
158 | + |
|
159 | + |
|
160 | + /** |
|
161 | + * @return int |
|
162 | + */ |
|
163 | + public function countInformation() |
|
164 | + { |
|
165 | + return count($this->information); |
|
166 | + } |
|
167 | + |
|
168 | + |
|
169 | + /** |
|
170 | + * @return int |
|
171 | + */ |
|
172 | + public function countAttention() |
|
173 | + { |
|
174 | + return count($this->attention); |
|
175 | + } |
|
176 | + |
|
177 | + |
|
178 | + /** |
|
179 | + * @return int |
|
180 | + */ |
|
181 | + public function countError() |
|
182 | + { |
|
183 | + return count($this->error); |
|
184 | + } |
|
185 | + |
|
186 | + |
|
187 | + /** |
|
188 | + * @return int |
|
189 | + */ |
|
190 | + public function countSuccess() |
|
191 | + { |
|
192 | + return count($this->success); |
|
193 | + } |
|
194 | + |
|
195 | + |
|
196 | + /** |
|
197 | + * @return NoticeInterface[] |
|
198 | + */ |
|
199 | + public function getInformation() |
|
200 | + { |
|
201 | + return $this->information; |
|
202 | + } |
|
203 | + |
|
204 | + |
|
205 | + /** |
|
206 | + * @return NoticeInterface[] |
|
207 | + */ |
|
208 | + public function getAttention() |
|
209 | + { |
|
210 | + return $this->attention; |
|
211 | + } |
|
212 | + |
|
213 | + |
|
214 | + /** |
|
215 | + * @return NoticeInterface[] |
|
216 | + */ |
|
217 | + public function getError() |
|
218 | + { |
|
219 | + return $this->error; |
|
220 | + } |
|
221 | + |
|
222 | + |
|
223 | + /** |
|
224 | + * @return NoticeInterface[] |
|
225 | + */ |
|
226 | + public function getSuccess() |
|
227 | + { |
|
228 | + return $this->success; |
|
229 | + } |
|
230 | 230 | } |
@@ -12,129 +12,129 @@ |
||
12 | 12 | */ |
13 | 13 | interface NoticesContainerInterface |
14 | 14 | { |
15 | - /** |
|
16 | - * @param string $notice |
|
17 | - * @param bool $dismissible |
|
18 | - * @param string $file |
|
19 | - * @param string $func |
|
20 | - * @param string $line |
|
21 | - */ |
|
22 | - public function addInformation($notice, $dismissible = true, $file = '', $func = '', $line = ''); |
|
15 | + /** |
|
16 | + * @param string $notice |
|
17 | + * @param bool $dismissible |
|
18 | + * @param string $file |
|
19 | + * @param string $func |
|
20 | + * @param string $line |
|
21 | + */ |
|
22 | + public function addInformation($notice, $dismissible = true, $file = '', $func = '', $line = ''); |
|
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * @param string $notice |
|
27 | - * @param bool $dismissible |
|
28 | - * @param string $file |
|
29 | - * @param string $func |
|
30 | - * @param string $line |
|
31 | - * @return |
|
32 | - */ |
|
33 | - public function addAttention($notice, $dismissible = true, $file = '', $func = '', $line = ''); |
|
25 | + /** |
|
26 | + * @param string $notice |
|
27 | + * @param bool $dismissible |
|
28 | + * @param string $file |
|
29 | + * @param string $func |
|
30 | + * @param string $line |
|
31 | + * @return |
|
32 | + */ |
|
33 | + public function addAttention($notice, $dismissible = true, $file = '', $func = '', $line = ''); |
|
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | - /** |
|
38 | - * @param string $notice |
|
39 | - * @param bool $dismissible |
|
40 | - * @param string $file |
|
41 | - * @param string $func |
|
42 | - * @param string $line |
|
43 | - */ |
|
44 | - public function addError($notice, $dismissible = true, $file = '', $func = '', $line = ''); |
|
37 | + /** |
|
38 | + * @param string $notice |
|
39 | + * @param bool $dismissible |
|
40 | + * @param string $file |
|
41 | + * @param string $func |
|
42 | + * @param string $line |
|
43 | + */ |
|
44 | + public function addError($notice, $dismissible = true, $file = '', $func = '', $line = ''); |
|
45 | 45 | |
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * @param string $notice |
|
50 | - * @param bool $dismissible |
|
51 | - * @param string $file |
|
52 | - * @param string $func |
|
53 | - * @param string $line |
|
54 | - */ |
|
55 | - public function addSuccess($notice, $dismissible = true, $file = '', $func = '', $line = ''); |
|
48 | + /** |
|
49 | + * @param string $notice |
|
50 | + * @param bool $dismissible |
|
51 | + * @param string $file |
|
52 | + * @param string $func |
|
53 | + * @param string $line |
|
54 | + */ |
|
55 | + public function addSuccess($notice, $dismissible = true, $file = '', $func = '', $line = ''); |
|
56 | 56 | |
57 | 57 | |
58 | 58 | |
59 | - /** |
|
60 | - * @return boolean |
|
61 | - */ |
|
62 | - public function hasInformation(); |
|
59 | + /** |
|
60 | + * @return boolean |
|
61 | + */ |
|
62 | + public function hasInformation(); |
|
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | - /** |
|
67 | - * @return boolean |
|
68 | - */ |
|
69 | - public function hasAttention(); |
|
66 | + /** |
|
67 | + * @return boolean |
|
68 | + */ |
|
69 | + public function hasAttention(); |
|
70 | 70 | |
71 | 71 | |
72 | 72 | |
73 | - /** |
|
74 | - * @return boolean |
|
75 | - */ |
|
76 | - public function hasError(); |
|
73 | + /** |
|
74 | + * @return boolean |
|
75 | + */ |
|
76 | + public function hasError(); |
|
77 | 77 | |
78 | 78 | |
79 | 79 | |
80 | - /** |
|
81 | - * @return boolean |
|
82 | - */ |
|
83 | - public function hasSuccess(); |
|
80 | + /** |
|
81 | + * @return boolean |
|
82 | + */ |
|
83 | + public function hasSuccess(); |
|
84 | 84 | |
85 | 85 | |
86 | 86 | |
87 | - /** |
|
88 | - * @return int |
|
89 | - */ |
|
90 | - public function countInformation(); |
|
87 | + /** |
|
88 | + * @return int |
|
89 | + */ |
|
90 | + public function countInformation(); |
|
91 | 91 | |
92 | 92 | |
93 | 93 | |
94 | - /** |
|
95 | - * @return int |
|
96 | - */ |
|
97 | - public function countAttention(); |
|
94 | + /** |
|
95 | + * @return int |
|
96 | + */ |
|
97 | + public function countAttention(); |
|
98 | 98 | |
99 | 99 | |
100 | 100 | |
101 | - /** |
|
102 | - * @return int |
|
103 | - */ |
|
104 | - public function countError(); |
|
101 | + /** |
|
102 | + * @return int |
|
103 | + */ |
|
104 | + public function countError(); |
|
105 | 105 | |
106 | 106 | |
107 | 107 | |
108 | - /** |
|
109 | - * @return int |
|
110 | - */ |
|
111 | - public function countSuccess(); |
|
108 | + /** |
|
109 | + * @return int |
|
110 | + */ |
|
111 | + public function countSuccess(); |
|
112 | 112 | |
113 | 113 | |
114 | 114 | |
115 | - /** |
|
116 | - * @return NoticeInterface[] |
|
117 | - */ |
|
118 | - public function getInformation(); |
|
115 | + /** |
|
116 | + * @return NoticeInterface[] |
|
117 | + */ |
|
118 | + public function getInformation(); |
|
119 | 119 | |
120 | 120 | |
121 | 121 | |
122 | - /** |
|
123 | - * @return NoticeInterface[] |
|
124 | - */ |
|
125 | - public function getAttention(); |
|
122 | + /** |
|
123 | + * @return NoticeInterface[] |
|
124 | + */ |
|
125 | + public function getAttention(); |
|
126 | 126 | |
127 | 127 | |
128 | 128 | |
129 | - /** |
|
130 | - * @return NoticeInterface[] |
|
131 | - */ |
|
132 | - public function getError(); |
|
129 | + /** |
|
130 | + * @return NoticeInterface[] |
|
131 | + */ |
|
132 | + public function getError(); |
|
133 | 133 | |
134 | 134 | |
135 | 135 | |
136 | - /** |
|
137 | - * @return NoticeInterface[] |
|
138 | - */ |
|
139 | - public function getSuccess(); |
|
136 | + /** |
|
137 | + * @return NoticeInterface[] |
|
138 | + */ |
|
139 | + public function getSuccess(); |
|
140 | 140 | } |
@@ -16,41 +16,41 @@ |
||
16 | 16 | */ |
17 | 17 | abstract class Locator implements LocatorInterface, Countable |
18 | 18 | { |
19 | - /** |
|
20 | - * @var array $flags |
|
21 | - */ |
|
22 | - protected $flags = []; |
|
19 | + /** |
|
20 | + * @var array $flags |
|
21 | + */ |
|
22 | + protected $flags = []; |
|
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * FileLocator constructor. |
|
27 | - * |
|
28 | - * @param array $flags controls how files are found and/or file data is returned |
|
29 | - * @throws InvalidDataTypeException |
|
30 | - */ |
|
31 | - public function __construct(array $flags = []) |
|
32 | - { |
|
33 | - if (empty($flags)) { |
|
34 | - $flags = [ |
|
35 | - FilesystemIterator::SKIP_DOTS, |
|
36 | - FilesystemIterator::UNIX_PATHS, |
|
37 | - FilesystemIterator::CURRENT_AS_PATHNAME, |
|
38 | - ]; |
|
39 | - } |
|
40 | - $this->setFlags($flags); |
|
41 | - } |
|
25 | + /** |
|
26 | + * FileLocator constructor. |
|
27 | + * |
|
28 | + * @param array $flags controls how files are found and/or file data is returned |
|
29 | + * @throws InvalidDataTypeException |
|
30 | + */ |
|
31 | + public function __construct(array $flags = []) |
|
32 | + { |
|
33 | + if (empty($flags)) { |
|
34 | + $flags = [ |
|
35 | + FilesystemIterator::SKIP_DOTS, |
|
36 | + FilesystemIterator::UNIX_PATHS, |
|
37 | + FilesystemIterator::CURRENT_AS_PATHNAME, |
|
38 | + ]; |
|
39 | + } |
|
40 | + $this->setFlags($flags); |
|
41 | + } |
|
42 | 42 | |
43 | 43 | |
44 | - /** |
|
45 | - * @see http://php.net/manual/en/class.filesystemiterator.php#filesystemiterator.constants |
|
46 | - * @param array|null $flags |
|
47 | - * @throws InvalidDataTypeException |
|
48 | - */ |
|
49 | - public function setFlags(?array $flags) |
|
50 | - { |
|
51 | - if (! is_array($flags)) { |
|
52 | - throw new InvalidDataTypeException('$flags', $flags, 'array'); |
|
53 | - } |
|
54 | - $this->flags = $flags; |
|
55 | - } |
|
44 | + /** |
|
45 | + * @see http://php.net/manual/en/class.filesystemiterator.php#filesystemiterator.constants |
|
46 | + * @param array|null $flags |
|
47 | + * @throws InvalidDataTypeException |
|
48 | + */ |
|
49 | + public function setFlags(?array $flags) |
|
50 | + { |
|
51 | + if (! is_array($flags)) { |
|
52 | + throw new InvalidDataTypeException('$flags', $flags, 'array'); |
|
53 | + } |
|
54 | + $this->flags = $flags; |
|
55 | + } |
|
56 | 56 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function setFlags(?array $flags) |
50 | 50 | { |
51 | - if (! is_array($flags)) { |
|
51 | + if ( ! is_array($flags)) { |
|
52 | 52 | throw new InvalidDataTypeException('$flags', $flags, 'array'); |
53 | 53 | } |
54 | 54 | $this->flags = $flags; |