@@ -174,7 +174,7 @@ |
||
174 | 174 | $this->set('sequence', 0); |
175 | 175 | } |
176 | 176 | |
177 | - $this->set('sequence', $this->get('sequence') + 1); |
|
177 | + $this->set('sequence', $this->get('sequence')+1); |
|
178 | 178 | $this->save(); |
179 | 179 | } |
180 | 180 |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | if (isset($codeTypeTag[0])) { |
75 | 75 | $start = mb_strpos($codeTypeTag[0], '['); |
76 | 76 | $end = mb_strpos($codeTypeTag[0], ']'); |
77 | - $language = mb_substr($codeTypeTag[0], $start + 1, $end - ($start + 1)); |
|
77 | + $language = mb_substr($codeTypeTag[0], $start+1, $end-($start+1)); |
|
78 | 78 | } else { |
79 | 79 | // will use php as a defualt language type when none is provided |
80 | 80 | $language = 'php'; |
@@ -100,11 +100,11 @@ discard block |
||
100 | 100 | { |
101 | 101 | $config = ConfigProvider::getInstance(); |
102 | 102 | |
103 | - $whole_match = $matches[1]; |
|
104 | - $link_text = $this->runSpanGamut($matches[2]); |
|
105 | - $url = $matches[3] == '' ? $matches[4] : $matches[3]; |
|
106 | - $title =& $matches[7]; |
|
107 | - $attr = $this->doExtraAttributes("a", $dummy =& $matches[8]); |
|
103 | + $whole_match = $matches[1]; |
|
104 | + $link_text = $this->runSpanGamut($matches[2]); |
|
105 | + $url = $matches[3] == '' ? $matches[4] : $matches[3]; |
|
106 | + $title = & $matches[7]; |
|
107 | + $attr = $this->doExtraAttributes("a", $dummy = & $matches[8]); |
|
108 | 108 | |
109 | 109 | $external = false; |
110 | 110 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $result = "<a href=\"$url\""; |
127 | 127 | if (isset($title)) { |
128 | 128 | $title = $this->encodeAttribute($title); |
129 | - $result .= " title=\"$title\""; |
|
129 | + $result .= " title=\"$title\""; |
|
130 | 130 | } |
131 | 131 | if ($external) { |
132 | 132 | $result .= " target=\"$url\""; |
@@ -205,6 +205,6 @@ discard block |
||
205 | 205 | $text .= "</tbody>\n"; |
206 | 206 | $text .= "</table>"; |
207 | 207 | |
208 | - return $this->hashBlock($text) . "\n"; |
|
208 | + return $this->hashBlock($text)."\n"; |
|
209 | 209 | } |
210 | 210 | } |
@@ -158,14 +158,15 @@ discard block |
||
158 | 158 | # Reading alignement from header underline. |
159 | 159 | $separators = preg_split('/ *[|] */', $underline); |
160 | 160 | foreach ($separators as $n => $s) { |
161 | - if (preg_match('/^ *-+: *$/', $s)) |
|
162 | - $attr[$n] = $this->_doTable_makeAlignAttr('right'); |
|
163 | - else if (preg_match('/^ *:-+: *$/', $s)) |
|
164 | - $attr[$n] = $this->_doTable_makeAlignAttr('center'); |
|
165 | - else if (preg_match('/^ *:-+ *$/', $s)) |
|
166 | - $attr[$n] = $this->_doTable_makeAlignAttr('left'); |
|
167 | - else |
|
168 | - $attr[$n] = ''; |
|
161 | + if (preg_match('/^ *-+: *$/', $s)) { |
|
162 | + $attr[$n] = $this->_doTable_makeAlignAttr('right'); |
|
163 | + } else if (preg_match('/^ *:-+: *$/', $s)) { |
|
164 | + $attr[$n] = $this->_doTable_makeAlignAttr('center'); |
|
165 | + } else if (preg_match('/^ *:-+ *$/', $s)) { |
|
166 | + $attr[$n] = $this->_doTable_makeAlignAttr('left'); |
|
167 | + } else { |
|
168 | + $attr[$n] = ''; |
|
169 | + } |
|
169 | 170 | } |
170 | 171 | |
171 | 172 | # Parsing span elements, including code spans, character escapes, |
@@ -179,8 +180,9 @@ discard block |
||
179 | 180 | $text = "<table class=\"table table-bordered\">\n"; |
180 | 181 | $text .= "<thead>\n"; |
181 | 182 | $text .= "<tr>\n"; |
182 | - foreach ($headers as $n => $header) |
|
183 | - $text .= " <th$attr[$n]>".$this->runSpanGamut(trim($header))."</th>\n"; |
|
183 | + foreach ($headers as $n => $header) { |
|
184 | + $text .= " <th$attr[$n]>".$this->runSpanGamut(trim($header))."</th>\n"; |
|
185 | + } |
|
184 | 186 | $text .= "</tr>\n"; |
185 | 187 | $text .= "</thead>\n"; |
186 | 188 | |
@@ -198,8 +200,9 @@ discard block |
||
198 | 200 | $row_cells = array_pad($row_cells, $col_count, ''); |
199 | 201 | |
200 | 202 | $text .= "<tr>\n"; |
201 | - foreach ($row_cells as $n => $cell) |
|
202 | - $text .= " <td$attr[$n]>".$this->runSpanGamut(trim($cell))."</td>\n"; |
|
203 | + foreach ($row_cells as $n => $cell) { |
|
204 | + $text .= " <td$attr[$n]>".$this->runSpanGamut(trim($cell))."</td>\n"; |
|
205 | + } |
|
203 | 206 | $text .= "</tr>\n"; |
204 | 207 | } |
205 | 208 | $text .= "</tbody>\n"; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | foreach ($attachments[0] as $attachmentURL) { |
123 | 123 | $start = mb_strpos($attachmentURL, '/'); |
124 | 124 | $end = mb_strrpos($attachmentURL, '"'); |
125 | - $fileName = mb_substr($attachmentURL, $start + 1, $end - ($start + 1)); |
|
125 | + $fileName = mb_substr($attachmentURL, $start+1, $end-($start+1)); |
|
126 | 126 | |
127 | 127 | if (method_exists($this->BO, 'getAttachmentSecureURL')) { |
128 | 128 | $this->content = str_replace($attachmentURL, 'href="'.$this->BO->getAttachmentSecureURL($fileName).'" rel="nofollow"', $this->content); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $type = 'png'; |
151 | 151 | } |
152 | 152 | |
153 | - $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean) $config->get('cms.images.widget.secure')); |
|
153 | + $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean)$config->get('cms.images.widget.secure')); |
|
154 | 154 | |
155 | 155 | $this->content = str_replace($attachmentURL, $img->renderHTMLLink(), $this->content); |
156 | 156 | } else { |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $iv |
73 | 73 | ); |
74 | 74 | |
75 | - return $iv . $encryptedData; |
|
75 | + return $iv.$encryptedData; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -60,37 +60,36 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * Handles GET HTTP requests. |
62 | 62 | * |
63 | - * @param Alpha\Util\Http\Request $request |
|
64 | 63 | * |
65 | 64 | * @since Alpha\Util\Http\Response |
66 | 65 | * @since 1.0 |
66 | + * @return \Alpha\Util\Http\Response|null |
|
67 | 67 | */ |
68 | 68 | public function doGET($params); |
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Handles POST HTTP requests. |
72 | 72 | * |
73 | - * @param Alpha\Util\Http\Request $request |
|
74 | 73 | * |
75 | 74 | * @since Alpha\Util\Http\Response |
76 | 75 | * @since 1.0 |
76 | + * @return \Alpha\Util\Http\Response|null |
|
77 | 77 | */ |
78 | 78 | public function doPOST($params); |
79 | 79 | |
80 | 80 | /** |
81 | 81 | * Handles PUT HTTP requests. |
82 | 82 | * |
83 | - * @param Alpha\Util\Http\Request $request |
|
84 | 83 | * |
85 | 84 | * @since Alpha\Util\Http\Response |
86 | 85 | * @since 1.0 |
86 | + * @return \Alpha\Util\Http\Response |
|
87 | 87 | */ |
88 | 88 | public function doPUT($params); |
89 | 89 | |
90 | 90 | /** |
91 | 91 | * Handles PATCH HTTP requests. |
92 | 92 | * |
93 | - * @param Alpha\Util\Http\Request $request |
|
94 | 93 | * |
95 | 94 | * @since Alpha\Util\Http\Response |
96 | 95 | * @since 1.0 |
@@ -100,30 +99,30 @@ discard block |
||
100 | 99 | /** |
101 | 100 | * Handles DELETE HTTP requests. |
102 | 101 | * |
103 | - * @param Alpha\Util\Http\Request $request |
|
104 | 102 | * |
105 | 103 | * @since Alpha\Util\Http\Response |
106 | 104 | * @since 1.0 |
105 | + * @return \Alpha\Util\Http\Response |
|
107 | 106 | */ |
108 | 107 | public function doDELETE($params); |
109 | 108 | |
110 | 109 | /** |
111 | 110 | * Handles OPTIONS HTTP requests. |
112 | 111 | * |
113 | - * @param Alpha\Util\Http\Request $request |
|
114 | 112 | * |
115 | 113 | * @since Alpha\Util\Http\Response |
116 | 114 | * @since 1.0 |
115 | + * @return \Alpha\Util\Http\Response |
|
117 | 116 | */ |
118 | 117 | public function doOPTIONS($params); |
119 | 118 | |
120 | 119 | /** |
121 | 120 | * Handles TRACE HTTP requests. |
122 | 121 | * |
123 | - * @param Alpha\Util\Http\Request $request |
|
124 | 122 | * |
125 | 123 | * @since Alpha\Util\Http\Response |
126 | 124 | * @since 2.0.2 |
125 | + * @return \Alpha\Util\Http\Response |
|
127 | 126 | */ |
128 | 127 | public function doTRACE($params); |
129 | 128 | } |
@@ -88,7 +88,7 @@ |
||
88 | 88 | * |
89 | 89 | * @param Alpha\Util\Http\Request $request |
90 | 90 | * |
91 | - * @return Alpha\Util\Http\Response |
|
91 | + * @return Response |
|
92 | 92 | * |
93 | 93 | * @since 1.0 |
94 | 94 | */ |
@@ -6,7 +6,6 @@ |
||
6 | 6 | use Alpha\Util\Config\ConfigProvider; |
7 | 7 | use Alpha\Util\Http\Request; |
8 | 8 | use Alpha\Util\Http\Response; |
9 | -use Alpha\Util\Http\Session\SessionProviderFactory; |
|
10 | 9 | use Alpha\View\View; |
11 | 10 | use Alpha\Controller\Front\FrontController; |
12 | 11 |