@@ -47,10 +47,10 @@ |
||
47 | 47 | $subDirNameLength = 5; |
48 | 48 | |
49 | 49 | for ($i = 0; $i < $subDirCount; ++$i) { |
50 | - $retval .= DIRECTORY_SEPARATOR.substr($fsHash, $i * $subDirNameLength, $subDirNameLength); |
|
50 | + $retval .= DIRECTORY_SEPARATOR.substr($fsHash, $i*$subDirNameLength, $subDirNameLength); |
|
51 | 51 | } |
52 | 52 | |
53 | - $retval .= DIRECTORY_SEPARATOR.substr($fsHash, $i * $subDirNameLength); |
|
53 | + $retval .= DIRECTORY_SEPARATOR.substr($fsHash, $i*$subDirNameLength); |
|
54 | 54 | |
55 | 55 | return $retval; |
56 | 56 | } |
@@ -242,7 +242,7 @@ |
||
242 | 242 | WHERE |
243 | 243 | id = %d', |
244 | 244 | Db::getTablePrefix(), |
245 | - (int) $this->id); |
|
245 | + (int)$this->id); |
|
246 | 246 | |
247 | 247 | $result = $this->db->query($sql); |
248 | 248 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | public function addSection($name, $description) |
67 | 67 | { |
68 | - $id = $this->config->getDb()->nextId(Db::getTablePrefix() . 'faqsections', 'id'); |
|
68 | + $id = $this->config->getDb()->nextId(Db::getTablePrefix().'faqsections', 'id'); |
|
69 | 69 | |
70 | 70 | $query = sprintf(" |
71 | 71 | INSERT INTO |
@@ -84,8 +84,8 @@ |
||
84 | 84 | $faqdata = $this->faq->get(FAQ_QUERY_TYPE_EXPORT_XML, $categoryId, $downwards, $language); |
85 | 85 | $version = $this->_config->get('main.currentVersion'); |
86 | 86 | $comment = sprintf('XML output by phpMyFAQ %s | Date: %s', |
87 | - $version, |
|
88 | - Date::createIsoDate(date('YmdHis'))); |
|
87 | + $version, |
|
88 | + Date::createIsoDate(date('YmdHis'))); |
|
89 | 89 | |
90 | 90 | $this->xml->startDocument('1.0', 'utf-8', 'yes'); |
91 | 91 | $this->xml->writeComment($comment); |
@@ -85,8 +85,8 @@ |
||
85 | 85 | $faqdata = $this->faq->get(FAQ_QUERY_TYPE_EXPORT_XHTML, $categoryId, $downwards, $language); |
86 | 86 | $version = $this->_config->get('main.currentVersion'); |
87 | 87 | $comment = sprintf('HTML5 output by phpMyFAQ %s | Date: %s', |
88 | - $version, |
|
89 | - Date::createIsoDate(date('YmdHis'))); |
|
88 | + $version, |
|
89 | + Date::createIsoDate(date('YmdHis'))); |
|
90 | 90 | |
91 | 91 | $this->xml->startDTD('html'); |
92 | 92 | $this->xml->startElement('html'); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | /* |
184 | 184 | * reduction factor for small font |
185 | 185 | */ |
186 | -define('K_SMALL_RATIO', 2 / 3); |
|
186 | +define('K_SMALL_RATIO', 2/3); |
|
187 | 187 | |
188 | 188 | require K_PATH_MAIN.'/tcpdf.php'; |
189 | 189 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | |
308 | 308 | // Set font |
309 | 309 | if (array_key_exists($PMF_LANG['metaLanguage'], $this->fontFiles)) { |
310 | - $this->currentFont = (string) $this->fontFiles[$PMF_LANG['metaLanguage']]; |
|
310 | + $this->currentFont = (string)$this->fontFiles[$PMF_LANG['metaLanguage']]; |
|
311 | 311 | } |
312 | 312 | } |
313 | 313 |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function getVersions(): array |
76 | 76 | { |
77 | - $json = file_get_contents($this->apiUrl . '/versions'); |
|
77 | + $json = file_get_contents($this->apiUrl.'/versions'); |
|
78 | 78 | $result = json_decode($json); |
79 | 79 | if ($result instanceof \stdClass) { |
80 | 80 | return [ |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function isVerified(): bool |
97 | 97 | { |
98 | - $this->remoteHashes = file_get_contents($this->apiUrl . '/verify/' . $this->config->get('main.currentVersion')); |
|
98 | + $this->remoteHashes = file_get_contents($this->apiUrl.'/verify/'.$this->config->get('main.currentVersion')); |
|
99 | 99 | |
100 | 100 | if (json_decode($this->remoteHashes) instanceof \stdClass) { |
101 | 101 | if (!is_array(json_decode($this->remoteHashes, true))) { |
@@ -77,21 +77,21 @@ |
||
77 | 77 | $search |
78 | 78 | ->setTable(Db::getTablePrefix().'faqdata AS fd') |
79 | 79 | ->setResultColumns( |
80 | - [ |
|
81 | - 'fd.id AS id', |
|
82 | - 'fd.lang AS lang', |
|
83 | - 'fcr.category_id AS category_id', |
|
84 | - 'fd.thema AS question', |
|
85 | - 'fd.content AS answer', |
|
86 | - 'fd.keywords AS keywords' |
|
87 | - ] |
|
80 | + [ |
|
81 | + 'fd.id AS id', |
|
82 | + 'fd.lang AS lang', |
|
83 | + 'fcr.category_id AS category_id', |
|
84 | + 'fd.thema AS question', |
|
85 | + 'fd.content AS answer', |
|
86 | + 'fd.keywords AS keywords' |
|
87 | + ] |
|
88 | 88 | ) |
89 | 89 | ->setJoinedTable(Db::getTablePrefix().'faqcategoryrelations AS fcr') |
90 | 90 | ->setJoinedColumns( |
91 | - [ |
|
91 | + [ |
|
92 | 92 | 'fd.id = fcr.record_id', |
93 | 93 | 'fd.lang = fcr.record_lang', |
94 | - ] |
|
94 | + ] |
|
95 | 95 | ) |
96 | 96 | ->setConditions( |
97 | 97 | [ |
@@ -149,7 +149,7 @@ |
||
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
152 | - $toBeRemoved = [ '=', '+', '-', 'HYPERLINK']; |
|
152 | + $toBeRemoved = ['=', '+', '-', 'HYPERLINK']; |
|
153 | 153 | $outputString = str_replace($toBeRemoved, '', $outputString); |
154 | 154 | |
155 | 155 | return $outputString; |