@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Rudolf\Component\Hooks\Filter; |
| 4 | 4 | |
| 5 | -Filter::add('head_after', function ($after) { |
|
| 5 | +Filter::add('head_after', function($after) { |
|
| 6 | 6 | $after[] = '<link href="'.DIR.'/rss/" rel="alternate" type="application/rss+xml" title="Kanał z artykułami">'; |
| 7 | 7 | |
| 8 | 8 | return $after; |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | 'published' => '', |
| 27 | 27 | ], $this->data); |
| 28 | 28 | |
| 29 | - $data = array_map(function ($a) { |
|
| 29 | + $data = array_map(function($a) { |
|
| 30 | 30 | return trim($a); |
| 31 | 31 | }, $data); |
| 32 | 32 | |
@@ -92,8 +92,6 @@ |
||
| 92 | 92 | * @since 0.1 |
| 93 | 93 | * |
| 94 | 94 | * @param string $tag The name of the action to be executed. |
| 95 | - * @param mixed $arg,... Optional additional arguments which are passed on to the functions |
|
| 96 | - * hooked to the action. |
|
| 97 | 95 | */ |
| 98 | 96 | public static function dispatch($tag, $arg = '') |
| 99 | 97 | { |
@@ -103,8 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | if (!isset(self::$actions[$tag])) { |
| 105 | 105 | self::$actions[$tag] = 1; |
| 106 | - } else { |
|
| 107 | - ++self::$actions[$tag]; |
|
| 106 | + } else {++self::$actions[$tag]; |
|
| 108 | 107 | } |
| 109 | 108 | |
| 110 | 109 | // Do 'all' actions first |
@@ -137,9 +136,9 @@ discard block |
||
| 137 | 136 | } |
| 138 | 137 | |
| 139 | 138 | // Sort |
| 140 | - if (!isset(Filter::$mergedFilters[ $tag ])) { |
|
| 139 | + if (!isset(Filter::$mergedFilters[$tag])) { |
|
| 141 | 140 | ksort(Filter::$filters[$tag]); |
| 142 | - Filter::$mergedFilters[ $tag ] = true; |
|
| 141 | + Filter::$mergedFilters[$tag] = true; |
|
| 143 | 142 | } |
| 144 | 143 | |
| 145 | 144 | reset(Filter::$filters[$tag]); |
@@ -171,8 +170,7 @@ discard block |
||
| 171 | 170 | |
| 172 | 171 | if (!isset(self::$actions[$tag])) { |
| 173 | 172 | self::$actions[$tag] = 1; |
| 174 | - } else { |
|
| 175 | - ++self::$actions[$tag]; |
|
| 173 | + } else {++self::$actions[$tag]; |
|
| 176 | 174 | } |
| 177 | 175 | |
| 178 | 176 | // Do 'all' actions first |
@@ -195,12 +193,12 @@ discard block |
||
| 195 | 193 | } |
| 196 | 194 | |
| 197 | 195 | // Sort |
| 198 | - if (!isset($merged_filters[ $tag ])) { |
|
| 196 | + if (!isset($merged_filters[$tag])) { |
|
| 199 | 197 | ksort(Filter::$filters[$tag]); |
| 200 | - $merged_filters[ $tag ] = true; |
|
| 198 | + $merged_filters[$tag] = true; |
|
| 201 | 199 | } |
| 202 | 200 | |
| 203 | - reset(Filter::$filters[ $tag ]); |
|
| 201 | + reset(Filter::$filters[$tag]); |
|
| 204 | 202 | |
| 205 | 203 | do { |
| 206 | 204 | foreach ((array) current(Filter::$filters[$tag]) as $the_) { |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @param array $path |
| 13 | 13 | * @param array $pages |
| 14 | 14 | * |
| 15 | - * @return int|bool |
|
| 15 | + * @return integer |
|
| 16 | 16 | */ |
| 17 | 17 | public function getPageIdByPath(array $path, array $pages) |
| 18 | 18 | { |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | /** |
| 42 | 42 | * Returns total number of pages items. |
| 43 | 43 | * |
| 44 | - * @param array|string $where |
|
| 44 | + * @param string $where |
|
| 45 | 45 | * |
| 46 | 46 | * @return int |
| 47 | 47 | */ |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * Session constructor. |
| 36 | 36 | * |
| 37 | 37 | * @param PDO $pdo |
| 38 | - * @param $prefix |
|
| 38 | + * @param string $prefix |
|
| 39 | 39 | * @param array $config |
| 40 | 40 | */ |
| 41 | 41 | public function __construct(PDO $pdo, $prefix, array $config) |
@@ -130,6 +130,9 @@ discard block |
||
| 130 | 130 | $this->guid = $guid; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | + /** |
|
| 134 | + * @param string $pubDate |
|
| 135 | + */ |
|
| 133 | 136 | public function setPubDate($pubDate) |
| 134 | 137 | { |
| 135 | 138 | $this->pubDate = $pubDate; |
@@ -143,7 +146,7 @@ discard block |
||
| 143 | 146 | /** |
| 144 | 147 | * Get item title. |
| 145 | 148 | * |
| 146 | - * @return bool|string |
|
| 149 | + * @return false|string |
|
| 147 | 150 | */ |
| 148 | 151 | public function getTitle() |
| 149 | 152 | { |
@@ -157,7 +160,7 @@ discard block |
||
| 157 | 160 | /** |
| 158 | 161 | * Get item link. |
| 159 | 162 | * |
| 160 | - * @return bool|string |
|
| 163 | + * @return false|string |
|
| 161 | 164 | */ |
| 162 | 165 | public function getLink() |
| 163 | 166 | { |
@@ -171,7 +174,7 @@ discard block |
||
| 171 | 174 | /** |
| 172 | 175 | * Get item description. |
| 173 | 176 | * |
| 174 | - * @return bool|string |
|
| 177 | + * @return false|string |
|
| 175 | 178 | */ |
| 176 | 179 | public function getDescription() |
| 177 | 180 | { |
@@ -187,7 +190,7 @@ discard block |
||
| 187 | 190 | /** |
| 188 | 191 | * Get item author. |
| 189 | 192 | * |
| 190 | - * @return bool|string |
|
| 193 | + * @return false|string |
|
| 191 | 194 | */ |
| 192 | 195 | public function getAuthor() |
| 193 | 196 | { |
@@ -201,7 +204,7 @@ discard block |
||
| 201 | 204 | /** |
| 202 | 205 | * Get item category. |
| 203 | 206 | * |
| 204 | - * @return bool|string |
|
| 207 | + * @return false|string |
|
| 205 | 208 | */ |
| 206 | 209 | public function getCategory() |
| 207 | 210 | { |
@@ -215,7 +218,7 @@ discard block |
||
| 215 | 218 | /** |
| 216 | 219 | * Get item pub date. |
| 217 | 220 | * |
| 218 | - * @return bool|string |
|
| 221 | + * @return false|string |
|
| 219 | 222 | */ |
| 220 | 223 | public function getPubDate() |
| 221 | 224 | { |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | * |
| 37 | 37 | * @param bool $return |
| 38 | 38 | * @param int $nesting |
| 39 | - * @return string|array|null |
|
| 39 | + * @return null|string |
|
| 40 | 40 | */ |
| 41 | 41 | public function make($return = false, $nesting = 1) |
| 42 | 42 | { |
@@ -58,6 +58,9 @@ discard block |
||
| 58 | 58 | return $this->info; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + /** |
|
| 62 | + * @param string $path |
|
| 63 | + */ |
|
| 61 | 64 | public function setPath($path) |
| 62 | 65 | { |
| 63 | 66 | $this->path = $path; |
@@ -81,6 +84,9 @@ discard block |
||
| 81 | 84 | return $this->classes; |
| 82 | 85 | } |
| 83 | 86 | |
| 87 | + /** |
|
| 88 | + * @param integer $nesting |
|
| 89 | + */ |
|
| 84 | 90 | public function setNesting($nesting) |
| 85 | 91 | { |
| 86 | 92 | $this->nesting = $nesting; |