GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 2.8 ( fdce9e...41d2f7 )
by Thorsten
37:41 queued 22:06
created
phpmyfaq/inc/PMF/Attachment/Abstract.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -433,7 +433,7 @@
 block discarded – undo
433 433
     /**
434 434
      * Validate attached file with the real hash
435 435
      *
436
-     * @return boolean
436
+     * @return boolean|null
437 437
      */
438 438
     public function validate()
439 439
     {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      *
132 132
      * @return PMF_Attachment_Abstract
133 133
      */
134
-    public function __construct ($id = null)
134
+    public function __construct($id = null)
135 135
     {   
136 136
         $this->db = PMF_Db::getInstance();
137 137
         
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      *
149 149
      * @return string
150 150
      */
151
-    public function buildUrl ($forHTML = true)
151
+    public function buildUrl($forHTML = true)
152 152
     {
153 153
         $amp = true == $forHTML ? '&' : '&';
154 154
         
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      *
164 164
      * @return void
165 165
      */
166
-    public function setKey ($key, $default = true)
166
+    public function setKey($key, $default = true)
167 167
     {
168 168
         $this->key = $key;
169 169
         $this->encrypted = null !== $key;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
          * Not default means the key was set explicitly
173 173
          * for this attachment, so lets hash it
174 174
          */
175
-        if($this->encrypted && !$default) {
175
+        if ($this->encrypted && !$default) {
176 176
             $this->passwordHash = sha1($key);
177 177
         }
178 178
     }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      *
185 185
      * @return null
186 186
      */
187
-    public function setRecordId ($id)
187
+    public function setRecordId($id)
188 188
     {
189 189
         $this->recordId = $id;
190 190
     }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      *
197 197
      * @return null
198 198
      */
199
-    public function setRecordLang ($lang)
199
+    public function setRecordLang($lang)
200 200
     {
201 201
         $this->recordLang = $lang;
202 202
     }
@@ -370,18 +370,18 @@  discard block
 block discarded – undo
370 370
      */
371 371
     protected function mkVirtualHash()
372 372
     {
373
-        if($this->encrypted) {
374
-            if(null === $this->id || null === $this->recordId ||
373
+        if ($this->encrypted) {
374
+            if (null === $this->id || null === $this->recordId ||
375 375
                null === $this->realHash || null === $this->filename ||
376 376
                null === $this->key) {
377
-                throw new PMF_Attachment_Exception('All of id, ' .
378
-                                     'recordId, hash, filename, ' .
379
-                                     'key is needed to generate ' . 
377
+                throw new PMF_Attachment_Exception('All of id, '.
378
+                                     'recordId, hash, filename, '.
379
+                                     'key is needed to generate '. 
380 380
                                      'fs hash for encrypted files');
381 381
             }
382 382
             
383
-            $src = $this->id . $this->recordId . $this->realHash .
384
-                        $this->filename . $this->key;
383
+            $src = $this->id.$this->recordId.$this->realHash.
384
+                        $this->filename.$this->key;
385 385
             $this->virtualHash = md5($src);            
386 386
         } else {
387 387
             $this->virtualHash = $this->realHash;
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -375,9 +375,9 @@
 block discarded – undo
375 375
                null === $this->realHash || null === $this->filename ||
376 376
                null === $this->key) {
377 377
                 throw new PMF_Attachment_Exception('All of id, ' .
378
-                                     'recordId, hash, filename, ' .
379
-                                     'key is needed to generate ' . 
380
-                                     'fs hash for encrypted files');
378
+                                        'recordId, hash, filename, ' .
379
+                                        'key is needed to generate ' . 
380
+                                        'fs hash for encrypted files');
381 381
             }
382 382
             
383 383
             $src = $this->id . $this->recordId . $this->realHash .
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Attachment/DB.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     /**
50 50
      * Delete attachment
51 51
      *
52
-     * @return boolean
52
+     * @return boolean|null
53 53
      */
54 54
     function delete()
55 55
     {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     /**
60 60
      * Save current attachment to the appropriate storage
61 61
      *
62
-     * @return boolean
62
+     * @return boolean|null
63 63
      */
64 64
     public function save()
65 65
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      *
41 41
      * @param int $id attachment id
42 42
      */
43
-    public function __construct ($id = null)
43
+    public function __construct($id = null)
44 44
     {
45 45
         // TODO implement this
46 46
         throw new PMF_Attachment_Exception('The database attachment storage type is not yet implemented');
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Attachment handler class for files stored in database
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Attachment
13
- * @author    Anatoliy Belsky <[email protected]>
14
- * @copyright 2009-2016 phpMyFAQ Team
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @since     2009-08-21
18
- */
3
+     * Attachment handler class for files stored in database
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Attachment
13
+     * @author    Anatoliy Belsky <[email protected]>
14
+     * @copyright 2009-2016 phpMyFAQ Team
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @since     2009-08-21
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Attachment/Factory.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
      * @param PMF_Configuration $config
109 109
      * @param integer $recordId ID of the record
110 110
      *
111
-     * @return array
111
+     * @return integer|null
112 112
      */
113 113
     public static function fetchByRecordId(PMF_Configuration $config, $recordId)
114 114
     {
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Attachment handler class
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Attachment
13
- * @author    Anatoliy Belsky <[email protected]>
14
- * @since     2009-08-21
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @copyright 2009-2016 phpMyFAQ Team
18
- */
3
+     * Attachment handler class
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Attachment
13
+     * @author    Anatoliy Belsky <[email protected]>
14
+     * @since     2009-08-21
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @copyright 2009-2016 phpMyFAQ Team
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Attachment/Filesystem/File/Encrypted.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@
 block discarded – undo
51 51
     protected $aes;
52 52
 
53 53
     /**
54
-     * @param $filepath
55
-     * @param $mode
56
-     * @param $key
54
+     * @param string $filepath
55
+     * @param string $mode
56
+     * @param string $key
57 57
      *
58 58
      * @return PMF_Attachment_Filesystem_File_Encrypted
59 59
      */
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     exit();
22 22
 }
23 23
 
24
-require PMF_ROOT_DIR . '/inc/libs/phpseclib/Crypt/AES.php';
24
+require PMF_ROOT_DIR.'/inc/libs/phpseclib/Crypt/AES.php';
25 25
 
26 26
 /**
27 27
  * PMF_Attachment_Abstract
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $chunk   = '';
78 78
         $chunkDelimLen = strlen(self::chunkDelimiter);
79 79
         
80
-        while(!$readEnd && !$this->eof()) {
80
+        while (!$readEnd && !$this->eof()) {
81 81
             $chunk .= fread($this->handle, 1);
82 82
             $readEnd = self::chunkDelimiter == substr($chunk, -$chunkDelimLen);
83 83
         }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function putChunk($chunk)
103 103
     {
104
-        $content = $this->aes->encrypt($chunk) . self::chunkDelimiter;
104
+        $content = $this->aes->encrypt($chunk).self::chunkDelimiter;
105 105
         
106 106
         return fwrite($this->handle, $content);
107 107
     }
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
     {
114 114
         $retval = false;
115 115
 
116
-        if(is_string($target)) {
116
+        if (is_string($target)) {
117 117
             $target = new PMF_Attachment_Filesystem_File_Vanilla($target, self::MODE_WRITE);
118 118
         } else {
119 119
             $target->setMode(self::MODE_WRITE);
120 120
         }
121 121
         
122
-        if($target->isOk()) {
123
-            while(!$this->eof()) {
122
+        if ($target->isOk()) {
123
+            while (!$this->eof()) {
124 124
                 $target->putChunk($this->getChunk());
125 125
             }
126 126
             
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Attachment/Migration.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     }
90 90
 
91 91
     /**
92
-     * @param $dir
92
+     * @param boolean $dir
93 93
      * @return array
94 94
      */
95 95
     protected function getOldFileList($dir)
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
         $records = $faq->faqRecords;
102 102
         
103 103
         reset($records);
104
-        while(list(,$record) = each($records)) {
104
+        while (list(,$record) = each($records)) {
105 105
             
106 106
             $recordDir = "$dir/$record[id]";
107
-            if(file_exists($recordDir) && is_dir($recordDir)) {
107
+            if (file_exists($recordDir) && is_dir($recordDir)) {
108 108
                 
109 109
                 $list[$record['id']]['files'] = array();
110
-                foreach(new DirectoryIterator($recordDir) as $entry) {
111
-                    if(!$entry->isDot() && $entry->isFile()) {
110
+                foreach (new DirectoryIterator($recordDir) as $entry) {
111
+                    if (!$entry->isDot() && $entry->isFile()) {
112 112
                         $list[$record['id']]['files'][] = "$recordDir/{$entry->getFilename()}";
113 113
                     }
114 114
                 }
@@ -129,20 +129,20 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $list = $this->getOldFileList(PMF_ATTACHMENTS_DIR);
131 131
     
132
-        foreach($list as $recordId => $item) {
132
+        foreach ($list as $recordId => $item) {
133 133
             $recordLang = $item['lang'];
134
-            foreach($item['files'] as $file) {
134
+            foreach ($item['files'] as $file) {
135 135
                 $att = PMF_Attachment_Factory::create();
136 136
                 $att->setRecordId($recordId);
137 137
                 $att->setRecordLang($recordLang);
138 138
                 
139
-                if(!$att->save($file)) {
139
+                if (!$att->save($file)) {
140 140
                     $this->error[] = "File $file couldn't be migrated";
141 141
                 }
142 142
             }
143 143
             
144
-            $recordDir = PMF_ATTACHMENTS_DIR . "/$recordId";
145
-            if(!@rmdir(PMF_ATTACHMENTS_DIR . "/$file")) {
144
+            $recordDir = PMF_ATTACHMENTS_DIR."/$recordId";
145
+            if (!@rmdir(PMF_ATTACHMENTS_DIR."/$file")) {
146 146
                 $this->warning[] = "Couldn't remove dir $recordDir after migration";
147 147
             }
148 148
         }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function doMigrate($migrationType, $options)
160 160
     {
161
-        switch($migrationType) {
161
+        switch ($migrationType) {
162 162
             case PMF_Attachment_Migration::MIGRATION_TYPE1:
163 163
                 
164 164
                 PMF_Attachment_Factory::init(PMF_Attachment::STORAGE_TYPE_FILESYSTEM,
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 /**
174 174
                  * Awaiting new default key here
175 175
                  */
176
-                if(isset($options['defaultKey']) && !empty($options['defaultKey'])) {
176
+                if (isset($options['defaultKey']) && !empty($options['defaultKey'])) {
177 177
                     PMF_Attachment_Factory::init(PMF_Attachment::STORAGE_TYPE_FILESYSTEM,
178 178
                                                  $options['defaultKey'],
179 179
                                                  true);
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Attachment migration handler
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Attachment
13
- * @author    Anatoliy Belsky <[email protected]>
14
- * @copyright 2009-2016 phpMyFAQ Team
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @since     2009-09-13
18
- */
3
+     * Attachment migration handler
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Attachment
13
+     * @author    Anatoliy Belsky <[email protected]>
14
+     * @copyright 2009-2016 phpMyFAQ Team
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @since     2009-09-13
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
             case PMF_Attachment_Migration::MIGRATION_TYPE1:
163 163
                 
164 164
                 PMF_Attachment_Factory::init(PMF_Attachment::STORAGE_TYPE_FILESYSTEM,
165
-                                             '',
166
-                                             false);
165
+                                                '',
166
+                                                false);
167 167
                 $this->migrateFromOldFormatToFs();
168 168
                 // FIXME should attachment settings update be triggered here?
169 169
                 
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
                  */
176 176
                 if(isset($options['defaultKey']) && !empty($options['defaultKey'])) {
177 177
                     PMF_Attachment_Factory::init(PMF_Attachment::STORAGE_TYPE_FILESYSTEM,
178
-                                                 $options['defaultKey'],
179
-                                                 true);
178
+                                                    $options['defaultKey'],
179
+                                                    true);
180 180
                     $this->migrateFromOldFormatToFs();
181 181
                 } else {
182 182
                     $this->error[] = 'Default key required to be set for this option';
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Auth/Http.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
      *
115 115
      * @param  string $login        Loginname
116 116
      * @param  array  $optionalData Optional data
117
-     * @return integer
117
+     * @return boolean
118 118
      */
119 119
     public function checkLogin($login, Array $optionalData = null)
120 120
     {
Please login to merge, or discard this patch.
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Manages user authentication with Apache's HTTP authentication
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ 
12
- * @package   Auth
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @author    Alberto Cabello <[email protected]>
15
- * @copyright 2009-2016 phpMyFAQ Team
16
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
- * @link      http://www.phpmyfaq.de
18
- * @since     2009-03-01
19
- */
3
+     * Manages user authentication with Apache's HTTP authentication
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ 
12
+     * @package   Auth
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @author    Alberto Cabello <[email protected]>
15
+     * @copyright 2009-2016 phpMyFAQ Team
16
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
+     * @link      http://www.phpmyfaq.de
18
+     * @since     2009-03-01
19
+     */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     exit();
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @param  string $login Loginname
61 61
      * @param  string $pass  Password
62 62
      * @return boolean
63
-    */
63
+     */
64 64
     public function changePassword($login, $pass)
65 65
     {
66 66
         return true;
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Cache.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
     /**
62 62
      * @static
63
-     * @return null|PMF_Cache
63
+     * @return PMF_Cache
64 64
      */
65 65
     public static function getInstance()
66 66
     {
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Date.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
     /**
127 127
      * Returns date formatted according to user defined format
128 128
      *
129
-     * @param string $date
129
+     * @param string $unformattedDate
130 130
      * @return string
131 131
      */
132 132
     public function format($unformattedDate)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@
 block discarded – undo
68 68
     {
69 69
         if ($pmfFormat) {
70 70
             $dateString = strtotime(
71
-                substr($date, 0, 4) . '-' .
72
-                substr($date, 4, 2) . '-' .
73
-                substr($date, 6, 2) . ' ' .
74
-                substr($date, 8, 2) . ':' .
71
+                substr($date, 0, 4).'-'.
72
+                substr($date, 4, 2).'-'.
73
+                substr($date, 6, 2).' '.
74
+                substr($date, 8, 2).':'.
75 75
                 substr($date, 10, 2)
76 76
             );
77 77
         } else {
Please login to merge, or discard this patch.
Indentation   +17 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,23 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * phpMyFAQ Date class
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   PMF_Date
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @author    Matteo Scaramuccia <[email protected]>
15
- * @copyright 2009-2016 phpMyFAQ Team
16
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
-
18
- * @link      http://www.phpmyfaq.de
19
- * @since     2009-09-24
20
- */
3
+     * phpMyFAQ Date class
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   PMF_Date
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @author    Matteo Scaramuccia <[email protected]>
15
+     * @copyright 2009-2016 phpMyFAQ Team
16
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
+     * @link      http://www.phpmyfaq.de
18
+     * @since     2009-09-24
19
+     */
21 20
 
22 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
23 22
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/DB/Helper.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      * @param string $query
60 60
      * @param string $table
61 61
      *
62
-     * @return   array
62
+     * @return   string[]
63 63
      */
64 64
     public function buildInsertQueries($query, $table)
65 65
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function __construct(PMF_Configuration $config)
52 52
     {
53
-        $this->_config   = $config;
53
+        $this->_config = $config;
54 54
     }
55 55
 
56 56
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                     }
86 86
                 }
87 87
             }
88
-            $ret[] = "INSERT INTO " . $table . " (" . implode(",", $p1) . ") VALUES (" . implode(",", $p2) . ");";
88
+            $ret[] = "INSERT INTO ".$table." (".implode(",", $p1).") VALUES (".implode(",", $p2).");";
89 89
         }
90 90
 
91 91
         return $ret;
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
         $return  = $query;
135 135
         $matches = array();
136 136
 
137
-        PMF_String::preg_match_all("/^" . $startPattern . "\s+(\w+)(\s+|$)/i", $query, $matches);
137
+        PMF_String::preg_match_all("/^".$startPattern."\s+(\w+)(\s+|$)/i", $query, $matches);
138 138
 
139 139
         if (isset($matches[1][0])) {
140 140
             $oldTableFullName = $matches[1][0];
141
-            $newTableFullName = $newValue . PMF_String::substr($oldTableFullName, PMF_String::strlen($oldValue));
141
+            $newTableFullName = $newValue.PMF_String::substr($oldTableFullName, PMF_String::strlen($oldValue));
142 142
             $return           = str_replace($oldTableFullName, $newTableFullName, $query);
143 143
         }
144 144
 
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Helper class for database drivers
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   DB
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @author    Matteo Scaramuccia <[email protected]>
15
- * @copyright 2012-2016 phpMyFAQ Team
16
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
- * @link      http://www.phpmyfaq.de
18
- * @since     2012-04-12
19
- */
3
+     * Helper class for database drivers
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   DB
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @author    Matteo Scaramuccia <[email protected]>
15
+     * @copyright 2012-2016 phpMyFAQ Team
16
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
+     * @link      http://www.phpmyfaq.de
18
+     * @since     2012-04-12
19
+     */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     exit();
Please login to merge, or discard this patch.