@@ -53,6 +53,10 @@ discard block |
||
53 | 53 | |
54 | 54 | } |
55 | 55 | |
56 | + /** |
|
57 | + * @param string $resourceKey |
|
58 | + * @param string $resourceVal |
|
59 | + */ |
|
56 | 60 | private function accessDenied($role, $resourceKey = null, $resourceVal = null, View $view) |
57 | 61 | { |
58 | 62 | if (in_array($role, ['guest', 'member'])) { |
@@ -71,6 +75,9 @@ discard block |
||
71 | 75 | exit; |
72 | 76 | } |
73 | 77 | |
78 | + /** |
|
79 | + * @param string $resourceKey |
|
80 | + */ |
|
74 | 81 | private function resourceNotFound($resourceKey, View $view) |
75 | 82 | { |
76 | 83 | $view->setViewsDir(__DIR__ . '/../modules/Index/views/'); |
@@ -84,6 +91,9 @@ discard block |
||
84 | 91 | exit; |
85 | 92 | } |
86 | 93 | |
94 | + /** |
|
95 | + * @param string $url |
|
96 | + */ |
|
87 | 97 | private function redirect($url, $code = 302) |
88 | 98 | { |
89 | 99 | switch ($code) { |
@@ -8,10 +8,10 @@ |
||
8 | 8 | |
9 | 9 | namespace YonaCMS\Plugin; |
10 | 10 | |
11 | -use Phalcon\Mvc\Dispatcher, |
|
12 | - Phalcon\Mvc\User\Plugin, |
|
13 | - Phalcon\Mvc\View, |
|
14 | - Application\Acl\DefaultAcl; |
|
11 | +use Phalcon\Mvc\Dispatcher; |
|
12 | +use Phalcon\Mvc\User\Plugin; |
|
13 | +use Phalcon\Mvc\View; |
|
14 | +use Application\Acl\DefaultAcl; |
|
15 | 15 | |
16 | 16 | class Acl extends Plugin |
17 | 17 | { |
@@ -145,7 +145,7 @@ |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
148 | - * @return mixed |
|
148 | + * @return integer |
|
149 | 149 | */ |
150 | 150 | public function getDepth() |
151 | 151 | { |
@@ -47,10 +47,10 @@ |
||
47 | 47 | { |
48 | 48 | $validator = new Validation(); |
49 | 49 | $validator->add('slug', new UniquenessValidator( |
50 | - [ |
|
51 | - "model" => $this, |
|
52 | - "message" => "Category with slug '" . $this->slug . "' is already exists. Take another title" |
|
53 | - ] |
|
50 | + [ |
|
51 | + "model" => $this, |
|
52 | + "message" => "Category with slug '" . $this->slug . "' is already exists. Take another title" |
|
53 | + ] |
|
54 | 54 | )); |
55 | 55 | return $this->validate($validator); |
56 | 56 | } |