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 ( 41d2f7...b9ed1f )
by Thorsten
25:52 queued 10:52
created
phpmyfaq/inc/PMF/Instance/Setup.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     /**
82 82
      * Checks basic folders and creates them if necessary
83 83
      *
84
-     * @param array $dirs
84
+     * @param string[] $dirs
85 85
      *
86 86
      * @return array
87 87
      */
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * @param string $name Name of the new folder
163 163
      * @param string $path Path to the new folder
164 164
      *
165
-     * @return bool
165
+     * @return boolean|null
166 166
      */
167 167
     public function createFolder($name, $path)
168 168
     {
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -90,16 +90,16 @@  discard block
 block discarded – undo
90 90
         $failedDirs = array();
91 91
 
92 92
         foreach ($dirs as $dir) {
93
-            if (false === is_writable($this->_rootDir . $dir)) {
93
+            if (false === is_writable($this->_rootDir.$dir)) {
94 94
                 $failedDirs[] = $dir;
95
-            } elseif (false === is_dir($this->_rootDir . $dir)) {
96
-                if (false === mkdir($this->_rootDir . $dir, 0775)) {
95
+            } elseif (false === is_dir($this->_rootDir.$dir)) {
96
+                if (false === mkdir($this->_rootDir.$dir, 0775)) {
97 97
                     $failedDirs[] = $dir;
98 98
                 }
99 99
             } else {
100 100
                 copy(
101
-                    $this->_rootDir . '/install/index.html',
102
-                    $this->_rootDir . $dir . '/index.html'
101
+                    $this->_rootDir.'/install/index.html',
102
+                    $this->_rootDir.$dir.'/index.html'
103 103
                 );
104 104
             }
105 105
         }
@@ -118,14 +118,14 @@  discard block
 block discarded – undo
118 118
     public function createDatabaseFile(Array $data, $folder = '/config')
119 119
     {
120 120
         $ret = file_put_contents(
121
-            $this->_rootDir . $folder . '/database.php',
122
-            "<?php\n" .
123
-            "\$DB['server'] = '" . $data['dbServer'] . "';\n" .
124
-            "\$DB['user'] = '" . $data['dbUser'] . "';\n" .
125
-            "\$DB['password'] = '" . $data['dbPassword'] . "';\n" .
126
-            "\$DB['db'] = '" . $data['dbDatabaseName'] . "';\n" .
127
-            "\$DB['prefix'] = '" . $data['dbPrefix'] . "';\n" .
128
-            "\$DB['type'] = '" . $data['dbType'] . "';",
121
+            $this->_rootDir.$folder.'/database.php',
122
+            "<?php\n".
123
+            "\$DB['server'] = '".$data['dbServer']."';\n".
124
+            "\$DB['user'] = '".$data['dbUser']."';\n".
125
+            "\$DB['password'] = '".$data['dbPassword']."';\n".
126
+            "\$DB['db'] = '".$data['dbDatabaseName']."';\n".
127
+            "\$DB['prefix'] = '".$data['dbPrefix']."';\n".
128
+            "\$DB['type'] = '".$data['dbType']."';",
129 129
             LOCK_EX
130 130
         );
131 131
 
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
     public function createLdapFile(Array $data, $folder = '/config')
144 144
     {
145 145
         $ret = file_put_contents(
146
-            $this->_rootDir . $folder . '/config/ldap.php',
147
-            "<?php\n" .
148
-            "\$PMF_LDAP['ldap_server'] = '" . $data['ldapServer'] . "';\n" .
149
-            "\$PMF_LDAP['ldap_port'] = '" . $data['ldapPort'] . "';\n" .
150
-            "\$PMF_LDAP['ldap_user'] = '" . $data['ldapUser'] . "';\n" .
151
-            "\$PMF_LDAP['ldap_password'] = '" . $data['ldapPassword'] . "';\n" .
152
-            "\$PMF_LDAP['ldap_base'] = '" . $data['ldapBase'] . "';",
146
+            $this->_rootDir.$folder.'/config/ldap.php',
147
+            "<?php\n".
148
+            "\$PMF_LDAP['ldap_server'] = '".$data['ldapServer']."';\n".
149
+            "\$PMF_LDAP['ldap_port'] = '".$data['ldapPort']."';\n".
150
+            "\$PMF_LDAP['ldap_user'] = '".$data['ldapUser']."';\n".
151
+            "\$PMF_LDAP['ldap_password'] = '".$data['ldapPassword']."';\n".
152
+            "\$PMF_LDAP['ldap_base'] = '".$data['ldapBase']."';",
153 153
             LOCK_EX
154 154
         );
155 155
 
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
- * The phpMyFAQ instances setup 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_Instance
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @copyright 2012-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     2012-04-04
18
- */
3
+     * The phpMyFAQ instances setup 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_Instance
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @copyright 2012-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     2012-04-04
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Link.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
     /**
354 354
      * Returns the HTTP GET parameters
355 355
      *
356
-     * @return array
356
+     * @return string
357 357
      */
358 358
     protected function getHttpGetParameters()
359 359
     {
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
      * @param string $text   Text
748 748
      * @param bool   $active Add CSS class named "active"?
749 749
      *
750
-     * @return string
750
+     * @return integer
751 751
      */
752 752
     public static function renderNavigationLink($url, $text, $active = false)
753 753
     {
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 
363 363
         if (!empty($query)) {
364 364
             // Check fragment
365
-            if (isset($query['fragment']) ) {
365
+            if (isset($query['fragment'])) {
366 366
                 $parameters[self::PMF_LINK_FRAGMENT_SEPARATOR] = urldecode($query['fragment']);
367 367
             }
368 368
             // Check if query string contains &amp;
@@ -479,11 +479,11 @@  discard block
 block discarded – undo
479 479
         //           being requested, as obtained from the original URI given by the user or referring resource
480 480
 
481 481
         // Remove any ref to standard ports 80 and 443.
482
-        $pattern[0] = '/:80$/';   // HTTP: port 80
482
+        $pattern[0] = '/:80$/'; // HTTP: port 80
483 483
         $pattern[1] = '/:443$/'; // HTTPS: port 443
484
-        $sysUri = $this->getSystemScheme() . preg_replace($pattern, '', $_SERVER['HTTP_HOST']);
484
+        $sysUri = $this->getSystemScheme().preg_replace($pattern, '', $_SERVER['HTTP_HOST']);
485 485
 
486
-        return $sysUri . PMF_link::getSystemRelativeUri($path);
486
+        return $sysUri.PMF_link::getSystemRelativeUri($path);
487 487
     }
488 488
 
489 489
     /**
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
                      self::PMF_LINK_SEARCHPART_SEPARATOR 
553 553
                      : 
554 554
                      self::PMF_LINK_AMPERSAND;
555
-        return $url . $separator . self::PMF_LINK_GET_SIDS . self::PMF_LINK_EQUAL . $sids;
555
+        return $url.$separator.self::PMF_LINK_GET_SIDS.self::PMF_LINK_EQUAL.$sids;
556 556
     }
557 557
     
558 558
     /**
@@ -583,22 +583,22 @@  discard block
 block discarded – undo
583 583
                             break;
584 584
                             
585 585
                         case self::PMF_LINK_GET_ACTION_ARTIKEL:
586
-                            $url .= self::PMF_LINK_CONTENT . 
587
-                                    $getParams[self::PMF_LINK_GET_CATEGORY] . 
588
-                                    self::PMF_LINK_HTML_SLASH . 
589
-                                    $getParams[self::PMF_LINK_GET_ID] . 
590
-                                    self::PMF_LINK_HTML_SLASH . 
591
-                                    $getParams[self::PMF_LINK_GET_ARTLANG] . 
592
-                                    self::PMF_LINK_SLASH . 
593
-                                    $this->getSEOItemTitle() . 
586
+                            $url .= self::PMF_LINK_CONTENT. 
587
+                                    $getParams[self::PMF_LINK_GET_CATEGORY]. 
588
+                                    self::PMF_LINK_HTML_SLASH. 
589
+                                    $getParams[self::PMF_LINK_GET_ID]. 
590
+                                    self::PMF_LINK_HTML_SLASH. 
591
+                                    $getParams[self::PMF_LINK_GET_ARTLANG]. 
592
+                                    self::PMF_LINK_SLASH. 
593
+                                    $this->getSEOItemTitle(). 
594 594
                                     self::PMF_LINK_HTML_EXTENSION;
595 595
                             if (isset($getParams[self::PMF_LINK_GET_HIGHLIGHT])) {
596
-                                $url .= self::PMF_LINK_SEARCHPART_SEPARATOR . 
597
-                                        self::PMF_LINK_GET_HIGHLIGHT . '=' . 
596
+                                $url .= self::PMF_LINK_SEARCHPART_SEPARATOR. 
597
+                                        self::PMF_LINK_GET_HIGHLIGHT.'='. 
598 598
                                         $getParams[self::PMF_LINK_GET_HIGHLIGHT];
599 599
                             }
600 600
                             if (isset($getParams[self::PMF_LINK_FRAGMENT_SEPARATOR])) {
601
-                                $url .= self::PMF_LINK_FRAGMENT_SEPARATOR . 
601
+                                $url .= self::PMF_LINK_FRAGMENT_SEPARATOR. 
602 602
                                         $getParams[self::PMF_LINK_FRAGMENT_SEPARATOR];
603 603
                             }
604 604
                             break;
@@ -630,37 +630,37 @@  discard block
 block discarded – undo
630 630
                                 if (isset($getParams[self::PMF_LINK_GET_PAGE])) {
631 631
                                     $url .= self::PMF_LINK_HTML_SLASH.$getParams[self::PMF_LINK_GET_PAGE];
632 632
                                 }
633
-                                $url .= self::PMF_LINK_SLASH . 
634
-                                        $this->getSEOItemTitle() . 
633
+                                $url .= self::PMF_LINK_SLASH. 
634
+                                        $this->getSEOItemTitle(). 
635 635
                                         self::PMF_LINK_HTML_EXTENSION; 
636 636
                             } elseif (isset($getParams[self::PMF_LINK_GET_ACTION_SEARCH])) {
637 637
                                 $url .= self::PMF_LINK_HTML_SEARCH;
638
-                                $url .= self::PMF_LINK_SEARCHPART_SEPARATOR . 
639
-                                        self::PMF_LINK_GET_ACTION_SEARCH . '=' . 
638
+                                $url .= self::PMF_LINK_SEARCHPART_SEPARATOR. 
639
+                                        self::PMF_LINK_GET_ACTION_SEARCH.'='. 
640 640
                                         $getParams[self::PMF_LINK_GET_ACTION_SEARCH];
641 641
                                 if (isset($getParams[self::PMF_LINK_GET_PAGE])) {
642
-                                    $url .= self::PMF_LINK_AMPERSAND.self::PMF_LINK_GET_PAGE . '=' . 
642
+                                    $url .= self::PMF_LINK_AMPERSAND.self::PMF_LINK_GET_PAGE.'='. 
643 643
                                             $getParams[self::PMF_LINK_GET_PAGE];
644 644
                                 }
645 645
                             }
646 646
                             if (isset($getParams[self::PMF_LINK_GET_LANGS])) {
647
-                                $url .= self::PMF_LINK_AMPERSAND . 
648
-                                        self::PMF_LINK_GET_LANGS . '=' . 
647
+                                $url .= self::PMF_LINK_AMPERSAND. 
648
+                                        self::PMF_LINK_GET_LANGS.'='. 
649 649
                                         $getParams[self::PMF_LINK_GET_LANGS];
650 650
                             }
651 651
                             break;
652 652
                             
653 653
                         case self::PMF_LINK_GET_ACTION_SITEMAP:
654 654
                             if (isset($getParams[self::PMF_LINK_GET_LETTER])) {
655
-                                $url .= self::PMF_LINK_SITEMAP . 
656
-                                        $getParams[self::PMF_LINK_GET_LETTER] . 
657
-                                        self::PMF_LINK_HTML_SLASH . 
658
-                                        $getParams[self::PMF_LINK_GET_LANG] . 
655
+                                $url .= self::PMF_LINK_SITEMAP. 
656
+                                        $getParams[self::PMF_LINK_GET_LETTER]. 
657
+                                        self::PMF_LINK_HTML_SLASH. 
658
+                                        $getParams[self::PMF_LINK_GET_LANG]. 
659 659
                                         self::PMF_LINK_HTML_EXTENSION;
660 660
                             } else {
661
-                                $url .= self::PMF_LINK_SITEMAP . 'A' . 
662
-                                        self::PMF_LINK_HTML_SLASH . 
663
-                                        $getParams[self::PMF_LINK_GET_LANG] . 
661
+                                $url .= self::PMF_LINK_SITEMAP.'A'. 
662
+                                        self::PMF_LINK_HTML_SLASH. 
663
+                                        $getParams[self::PMF_LINK_GET_LANG]. 
664 664
                                         self::PMF_LINK_HTML_EXTENSION;
665 665
                             }
666 666
                             break;
@@ -671,25 +671,25 @@  discard block
 block discarded – undo
671 671
                                 (0 == $getParams[self::PMF_LINK_GET_CATEGORY]))) {
672 672
                                 $url .= self::PMF_LINK_HTML_SHOWCAT;
673 673
                             } else {
674
-                                $url .= self::PMF_LINK_CATEGORY . 
674
+                                $url .= self::PMF_LINK_CATEGORY. 
675 675
                                         $getParams[self::PMF_LINK_GET_CATEGORY];
676 676
                                 if (isset($getParams[self::PMF_LINK_GET_PAGE])) {
677
-                                    $url .= self::PMF_LINK_HTML_SLASH . 
677
+                                    $url .= self::PMF_LINK_HTML_SLASH. 
678 678
                                             $getParams[self::PMF_LINK_GET_PAGE];
679 679
                                 }
680
-                                $url .= self::PMF_LINK_HTML_SLASH . 
681
-                                        $this->getSEOItemTitle() .
680
+                                $url .= self::PMF_LINK_HTML_SLASH. 
681
+                                        $this->getSEOItemTitle().
682 682
                                         self::PMF_LINK_HTML_EXTENSION;
683 683
                             }
684 684
                             break;
685 685
                             
686 686
                         case self::PMF_LINK_GET_ACTION_NEWS:
687
-                            $url .= self::PMF_LINK_NEWS . 
688
-                                    $getParams[self::PMF_LINK_GET_NEWS_ID] . 
689
-                                    self::PMF_LINK_HTML_SLASH .
690
-                                    $getParams[self::PMF_LINK_GET_NEWS_LANG] .
691
-                                    self::PMF_LINK_SLASH .
692
-                                    $this->getSEOItemTitle() .
687
+                            $url .= self::PMF_LINK_NEWS. 
688
+                                    $getParams[self::PMF_LINK_GET_NEWS_ID]. 
689
+                                    self::PMF_LINK_HTML_SLASH.
690
+                                    $getParams[self::PMF_LINK_GET_NEWS_LANG].
691
+                                    self::PMF_LINK_SLASH.
692
+                                    $this->getSEOItemTitle().
693 693
                                     self::PMF_LINK_HTML_EXTENSION;
694 694
                             break;
695 695
                     }
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
         $url = $this->url;
719 719
         if (!empty($this->url)) {
720 720
             if ((!$this->hasScheme()) && (!$this->isInternalReference())) {
721
-                $url = $this->getDefaultScheme() . $this->url;
721
+                $url = $this->getDefaultScheme().$this->url;
722 722
             }
723 723
         }
724 724
 
@@ -733,9 +733,9 @@  discard block
 block discarded – undo
733 733
     public function getCurrentUrl()
734 734
     {
735 735
         if (!empty($_SERVER['HTTPS'])) {
736
-            return 'https://' . $_SERVER['SERVER_NAME'] . PMF_String::htmlentities($_SERVER['REQUEST_URI']);
736
+            return 'https://'.$_SERVER['SERVER_NAME'].PMF_String::htmlentities($_SERVER['REQUEST_URI']);
737 737
         } else {
738
-            return 'http://' . $_SERVER['SERVER_NAME'] . PMF_String::htmlentities($_SERVER['REQUEST_URI']);
738
+            return 'http://'.$_SERVER['SERVER_NAME'].PMF_String::htmlentities($_SERVER['REQUEST_URI']);
739 739
         }
740 740
     }
741 741
     
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
- * Link management - Functions and Classes
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_Link  
13
- * @author    Matteo Scaramuccia <[email protected]>
14
- * @author    Thorsten Rinne <[email protected]>
15
- * @copyright 2005-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     2005-11-02
19
- */
3
+     * Link management - Functions and Classes
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_Link  
13
+     * @author    Matteo Scaramuccia <[email protected]>
14
+     * @author    Thorsten Rinne <[email protected]>
15
+     * @copyright 2005-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     2005-11-02
19
+     */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Linkverifier.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@
 block discarded – undo
276 276
      *
277 277
      * @param string $string String
278 278
      *
279
-     * @return mixed  false if URL is not found, otherwise returns the number of URLs found.
279
+     * @return integer  false if URL is not found, otherwise returns the number of URLs found.
280 280
      */
281 281
     public function parse_string($string = "")
282 282
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -257,14 +257,14 @@  discard block
 block discarded – undo
257 257
 
258 258
         // If path is not specified in reference uri, set as blank
259 259
         if (isset($pathparts['path'])) {
260
-            $pathparts['path'] = str_replace("\\","/",$pathparts['path']);
261
-            $pathparts['path'] = preg_replace("/^.*(\/)$/i","", $pathparts['path']);
260
+            $pathparts['path'] = str_replace("\\", "/", $pathparts['path']);
261
+            $pathparts['path'] = preg_replace("/^.*(\/)$/i", "", $pathparts['path']);
262 262
         } else {
263 263
             $pathparts['path'] = "";
264 264
         }
265 265
 
266 266
         // Recombine urls
267
-        if (PMF_String::substr($relativeuri,0,1) == "/") {
267
+        if (PMF_String::substr($relativeuri, 0, 1) == "/") {
268 268
             return $pathparts['scheme']."://".$pathparts['host'].$pathparts['port'].$relativeuri;
269 269
         } else {
270 270
             return $pathparts['scheme']."://".$pathparts['host'].$pathparts['port'].$pathparts['path']."/".$relativeuri;
@@ -286,10 +286,10 @@  discard block
 block discarded – undo
286 286
 
287 287
         // Clean $this->urlpool
288 288
         $this->urlpool = array();
289
-        while(list(,$type) = each($types)) {
289
+        while (list(,$type) = each($types)) {
290 290
             preg_match_all("|[^?&]$type\=(\"?'?`?)([[:alnum:]\:\#%?=;&@/\ \.\_\-\{\}]+)\\1|i", $string, $matches); 
291 291
             $sz = sizeof($matches[2]);
292
-            for ($i = 0;$i < $sz; $i++) {
292
+            for ($i = 0; $i < $sz; $i++) {
293 293
                 $this->urlpool[$type][] = $matches[2][$i];
294 294
                 $urlcount++;
295 295
             }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
         // parse URL
342 342
         $urlParts = @parse_url($url);
343
-        foreach(array(
343
+        foreach (array(
344 344
                     'scheme' => 'http',
345 345
                     'host' => $_SERVER['HTTP_HOST'],
346 346
                     'user' => '',
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
         switch ($code) {
460 460
             // TODO: Add more explicit http status management
461 461
             case '200': // OK
462
-                $_reason = ($redirectCount > 0) ? sprintf($PMF_LANG['ad_linkcheck_openurl_redirected'],PMF_String::htmlspecialchars($url)) : "";
462
+                $_reason = ($redirectCount > 0) ? sprintf($PMF_LANG['ad_linkcheck_openurl_redirected'], PMF_String::htmlspecialchars($url)) : "";
463 463
                 return array(true, $redirectCount, $_reason);
464 464
                 break;
465 465
             case '301': // Moved Permanently (go recursive ?)
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
                         $inforeasons[] = sprintf(
775 775
                             $PMF_LANG['ad_linkcheck_openurl_infoprefix'],
776 776
                             PMF_String::htmlspecialchars($value['absurl'])
777
-                         ) . $value['reason'];
777
+                         ).$value['reason'];
778 778
                     }
779 779
                 } else {
780 780
                     $_classname = "urlfail";
Please login to merge, or discard this patch.
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The PMF_Linkverifier class provides methods and functions for verifying URLs
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
- * The Initial Developer of the Original Code is released for external use
12
- * with permission from NetJapan, Inc. IT Administration Group.
13
- *
14
- * @category  phpMyFAQ
15
- * @package   PMF_Linkverifier
16
- * @author    Minoru TODA <[email protected]>
17
- * @author    Matteo Scaramuccia <[email protected]>
18
- * @author    Thorsten Rinne <[email protected]>
19
- * @copyright 2005-2016 NetJapan, Inc. and phpMyFAQ Team
20
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
21
- * @link      http://www.phpmyfaq.de
22
- * @since     2005-08-01
23
- */
3
+     * The PMF_Linkverifier class provides methods and functions for verifying URLs
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
+     * The Initial Developer of the Original Code is released for external use
12
+     * with permission from NetJapan, Inc. IT Administration Group.
13
+     *
14
+     * @category  phpMyFAQ
15
+     * @package   PMF_Linkverifier
16
+     * @author    Minoru TODA <[email protected]>
17
+     * @author    Matteo Scaramuccia <[email protected]>
18
+     * @author    Thorsten Rinne <[email protected]>
19
+     * @copyright 2005-2016 NetJapan, Inc. and phpMyFAQ Team
20
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
21
+     * @link      http://www.phpmyfaq.de
22
+     * @since     2005-08-01
23
+     */
24 24
 
25 25
 if (!defined('IS_VALID_PHPMYFAQ')) {
26 26
     exit();
@@ -712,15 +712,15 @@  discard block
 block discarded – undo
712 712
     }
713 713
 
714 714
     /**
715
-    * Verifies specified article content and update links_state database entry
716
-    *
717
-    * @param   string  $contents
718
-    * @param   integer $id
719
-    * @param   string  $artlang
720
-    * @param   boolean $cron
721
-    *
722
-    * @return  string  HTML text, if $cron is false (default)
723
-    */
715
+     * Verifies specified article content and update links_state database entry
716
+     *
717
+     * @param   string  $contents
718
+     * @param   integer $id
719
+     * @param   string  $artlang
720
+     * @param   boolean $cron
721
+     *
722
+     * @return  string  HTML text, if $cron is false (default)
723
+     */
724 724
     public function verifyArticleURL($contents = '', $id = 0, $artlang = '', $cron = false)
725 725
     {
726 726
         global $PMF_LANG;
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
                         $inforeasons[] = sprintf(
775 775
                             $PMF_LANG['ad_linkcheck_openurl_infoprefix'],
776 776
                             PMF_String::htmlspecialchars($value['absurl'])
777
-                         ) . $value['reason'];
777
+                            ) . $value['reason'];
778 778
                     }
779 779
                 } else {
780 780
                     $_classname = "urlfail";
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Relation.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      * @param string  $question FAQ title
63 63
      * @param string  $keywords FAQ keywords
64 64
      *
65
-     * @return array
65
+     * @return PMF_DB_Driver
66 66
      */
67 67
     public function getAllRelatedById($recordId, $question, $keywords)
68 68
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,27 +66,27 @@
 block discarded – undo
66 66
      */
67 67
     public function getAllRelatedById($recordId, $question, $keywords)
68 68
     {
69
-        $terms  = str_replace('-', ' ', $question) . $keywords;
69
+        $terms  = str_replace('-', ' ', $question).$keywords;
70 70
         $search = PMF_Search_Factory::create(
71 71
             $this->_config,
72 72
             array('database' => PMF_Db::getType())
73 73
         );
74 74
 
75
-        $search->setTable(PMF_Db::getTablePrefix() . 'faqdata AS fd')
75
+        $search->setTable(PMF_Db::getTablePrefix().'faqdata AS fd')
76 76
                ->setResultColumns(array(
77 77
                     'fd.id AS id',
78 78
                     'fd.lang AS lang',
79 79
                     'fcr.category_id AS category_id',
80 80
                     'fd.thema AS question',
81 81
                     'fd.content AS answer'))
82
-               ->setJoinedTable(PMF_Db::getTablePrefix() . 'faqcategoryrelations AS fcr')
82
+               ->setJoinedTable(PMF_Db::getTablePrefix().'faqcategoryrelations AS fcr')
83 83
                ->setJoinedColumns(array(
84 84
                     'fd.id = fcr.record_id', 
85 85
                     'fd.lang = fcr.record_lang'))
86 86
                ->setConditions(
87 87
                     array(
88 88
                         'fd.active' => "'yes'",
89
-                        'fd.lang'   => "'" . $this->_config->getLanguage()->getLanguage() . "'"
89
+                        'fd.lang'   => "'".$this->_config->getLanguage()->getLanguage()."'"
90 90
                     )
91 91
                )
92 92
                ->setMatchingColumns(array('fd.thema', 'fd.content', 'fd.keywords')
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The Relation class for dynamic related record linking
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_Relation
13
- * @author    Marco Enders <[email protected]>
14
- * @author    Thorsten Rinne <[email protected]>
15
- * @copyright 2006-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     2006-06-18
19
- */
3
+     * The Relation class for dynamic related record linking
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_Relation
13
+     * @author    Marco Enders <[email protected]>
14
+     * @author    Thorsten Rinne <[email protected]>
15
+     * @copyright 2006-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     2006-06-18
19
+     */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     exit();
@@ -73,23 +73,23 @@  discard block
 block discarded – undo
73 73
         );
74 74
 
75 75
         $search->setTable(PMF_Db::getTablePrefix() . 'faqdata AS fd')
76
-               ->setResultColumns(array(
76
+                ->setResultColumns(array(
77 77
                     'fd.id AS id',
78 78
                     'fd.lang AS lang',
79 79
                     'fcr.category_id AS category_id',
80 80
                     'fd.thema AS question',
81 81
                     'fd.content AS answer'))
82
-               ->setJoinedTable(PMF_Db::getTablePrefix() . 'faqcategoryrelations AS fcr')
83
-               ->setJoinedColumns(array(
82
+                ->setJoinedTable(PMF_Db::getTablePrefix() . 'faqcategoryrelations AS fcr')
83
+                ->setJoinedColumns(array(
84 84
                     'fd.id = fcr.record_id', 
85 85
                     'fd.lang = fcr.record_lang'))
86
-               ->setConditions(
86
+                ->setConditions(
87 87
                     array(
88 88
                         'fd.active' => "'yes'",
89 89
                         'fd.lang'   => "'" . $this->_config->getLanguage()->getLanguage() . "'"
90 90
                     )
91
-               )
92
-               ->setMatchingColumns(array('fd.thema', 'fd.content', 'fd.keywords')
91
+                )
92
+                ->setMatchingColumns(array('fd.thema', 'fd.content', 'fd.keywords')
93 93
         );
94 94
 
95 95
         $result = $search->search($terms);
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Search/Database/Pgsql.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
     /**
125 125
      * Add the matching columns into the columns for the resultset
126 126
      *
127
-     * @return PMF_Search_Database
127
+     * @return string
128 128
      */
129 129
     public function getMatchingColumnsAsResult()
130 130
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
         } else {
61 61
             $enableRelevance = $this->_config->get('search.enableRelevance');
62 62
 
63
-            $columns  =  $this->getResultColumns();
63
+            $columns  = $this->getResultColumns();
64 64
             $columns .= ($enableRelevance) ? $this->getMatchingColumnsAsResult($searchTerm) : '';
65
-            $orderBy  = ($enableRelevance) ? 'ORDER BY ' . $this->getMatchingOrder() : '';
65
+            $orderBy  = ($enableRelevance) ? 'ORDER BY '.$this->getMatchingOrder() : '';
66 66
 
67 67
             $query = sprintf("
68 68
                 SELECT
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 $this->getJoinedTable(),
79 79
                 $this->getJoinedColumns(),
80 80
                 ($enableRelevance)
81
-                    ? ", plainto_tsquery('" . $this->_config->getDb()->escape($searchTerm) . "') query "
81
+                    ? ", plainto_tsquery('".$this->_config->getDb()->escape($searchTerm)."') query "
82 82
                     : '',
83 83
                 $this->getMatchingColumns(),
84 84
                 $this->_config->getDb()->escape($searchTerm),
@@ -106,14 +106,14 @@  discard block
 block discarded – undo
106 106
             foreach ($this->matchingColumns as $matchColumn) {
107 107
                 $match = sprintf("to_tsvector(coalesce(%s,''))", $matchColumn);
108 108
                 if (empty($machColumns)) {
109
-                    $machColumns .= '(' . $match;
109
+                    $machColumns .= '('.$match;
110 110
                 } else {
111
-                    $machColumns .= ' || ' . $match;
111
+                    $machColumns .= ' || '.$match;
112 112
                 }
113 113
             }
114 114
 
115 115
             // Add the ILIKE since the FULLTEXT looks for the exact phrase only
116
-            $machColumns .= ') @@ query) OR (' . implode(" || ' ' || ", $this->matchingColumns);
116
+            $machColumns .= ') @@ query) OR ('.implode(" || ' ' || ", $this->matchingColumns);
117 117
         } else {
118 118
             $machColumns = implode(" || ' ' || ", $this->matchingColumns);
119 119
         }
@@ -143,12 +143,12 @@  discard block
 block discarded – undo
143 143
             $columnName = substr(strstr($matchColumn, '.'), 1);
144 144
 
145 145
             if (isset($weight[$columnName])) {
146
-                $column = sprintf("ts_rank_cd(setweight(to_tsvector(coalesce(%s,'')), '" . $weight[$columnName]
146
+                $column = sprintf("ts_rank_cd(setweight(to_tsvector(coalesce(%s,'')), '".$weight[$columnName]
147 147
                     . "'), query) AS rel_%s",
148 148
                     $matchColumn,
149 149
                     $columnName);
150 150
 
151
-                $resultColumns .= ', ' . $column;
151
+                $resultColumns .= ', '.$column;
152 152
             }
153 153
         }
154 154
 
@@ -168,11 +168,11 @@  discard block
 block discarded – undo
168 168
         $order = '';
169 169
 
170 170
         foreach ($list as $field) {
171
-            $string = 'rel_' . $field . ' DESC';
171
+            $string = 'rel_'.$field.' DESC';
172 172
             if (empty($order)) {
173 173
                 $order .= $string;
174 174
             } else {
175
-                $order .= ', ' . $string;
175
+                $order .= ', '.$string;
176 176
             }
177 177
         }
178 178
 
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
- * phpMyFAQ PostgreSQL search classes
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_Search_Database
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @copyright 2010-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     2010-06-06
18
- */
3
+     * phpMyFAQ PostgreSQL search classes
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_Search_Database
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @copyright 2010-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     2010-06-06
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/Sitemap.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     /**
103 103
      * Returns all available first letters
104 104
      *
105
-     * @return array
105
+     * @return string
106 106
      * @since  2007-03-30
107 107
      * @author Thorsten Rinne <[email protected]>
108 108
      */
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      * Returns all records from the current first letter
209 209
      *
210 210
      * @param  string $letter Letter
211
-     * @return array
211
+     * @return string
212 212
      * @since  2007-03-30
213 213
      * @author Thorsten Rinne <[email protected]>
214 214
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                     $this->_config->getLanguage()->getLanguage());
197 197
                 $oLink         = new PMF_Link($url, $this->_config);
198 198
                 $oLink->text   = (string)$letters;
199
-                $writeLetters .= '<li>' . $oLink->toHtmlAnchor().'</li>';
199
+                $writeLetters .= '<li>'.$oLink->toHtmlAnchor().'</li>';
200 200
             }
201 201
         }
202 202
         $writeLetters .= '</ul>';
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
         $writeMap = '';
234 234
 
235
-        switch(PMF_Db::getType()) {
235
+        switch (PMF_Db::getType()) {
236 236
             case 'sqlite':
237 237
             case 'sqlite3':
238 238
                 $query = sprintf("
@@ -331,12 +331,12 @@  discard block
 block discarded – undo
331 331
                 $oLink->tooltip   = $title;
332 332
 
333 333
                 $writeMap .= '<li>'.$oLink->toHtmlAnchor().'<br />'."\n";
334
-                $writeMap .= PMF_Utils::chopString(strip_tags($row->snap), 25). " ...</li>\n";
334
+                $writeMap .= PMF_Utils::chopString(strip_tags($row->snap), 25)." ...</li>\n";
335 335
             }
336 336
             $oldId = $row->id;
337 337
         }
338 338
 
339
-        $writeMap = empty($writeMap) ? '' : '<ul>' . $writeMap . '</ul>';
339
+        $writeMap = empty($writeMap) ? '' : '<ul>'.$writeMap.'</ul>';
340 340
 
341 341
         return $writeMap;
342 342
     }
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
- * The main Sitemap 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_Sitemap
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @copyright 2007-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     2007-03-30
18
- */
3
+     * The main Sitemap 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_Sitemap
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @copyright 2007-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     2007-03-30
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/String.php 3 patches
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,7 +104,6 @@  discard block
 block discarded – undo
104 104
     /**
105 105
      * Get a part of string
106 106
      *
107
-     * @param string  $str    String
108 107
      * @param integer $start  Start
109 108
      * @param integer $length Length
110 109
      *
@@ -121,7 +120,7 @@  discard block
 block discarded – undo
121 120
      *
122 121
      * @param string $haystack Haystack
123 122
      * @param string $needle   Needle
124
-     * @param string $offset   Offset
123
+     * @param integer $offset   Offset
125 124
      *
126 125
      * @return int
127 126
      */
@@ -298,7 +297,7 @@  discard block
 block discarded – undo
298 297
     /**
299 298
      * Search and replace by a regexp using a callback
300 299
      *
301
-     * @param string|array $pattern
300
+     * @param string $pattern
302 301
      * @param function $callback
303 302
      * @param string|array $subject
304 303
      * @param int $limit
@@ -333,7 +332,7 @@  discard block
 block discarded – undo
333 332
      *
334 333
      * @param string $str String
335 334
      *
336
-     * @return boolean
335
+     * @return string|boolean
337 336
      */
338 337
     public static function isUTF8($str)
339 338
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         if (!self::$instance) {
69 69
             if (extension_loaded('mbstring') && function_exists('mb_regex_encoding')) {
70 70
                 self::$instance = PMF_String_Mbstring::getInstance($language);
71
-            } elseif(self::isLangUTF8ToLatinConvertable($language)) {
71
+            } elseif (self::isLangUTF8ToLatinConvertable($language)) {
72 72
                 self::$instance = PMF_String_UTF8ToLatinConvertable::getInstance($language);
73 73
             } else {
74 74
                 self::$instance = PMF_String_Basic::getInstance($language);
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      *
307 307
      * @return array|string
308 308
      */
309
-    public static function preg_replace_callback($pattern, $callback, $subject, $limit= -1, &$count = 0)
309
+    public static function preg_replace_callback($pattern, $callback, $subject, $limit = -1, &$count = 0)
310 310
     {
311 311
         return self::$instance->preg_replace_callback($pattern, $callback, $subject, $limit, $count);
312 312
     }
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
      *
324 324
      * @return array|string|null
325 325
      */
326
-    public static function preg_replace($pattern, $replacement, $subject, $limit= -1, &$count = 0)
326
+    public static function preg_replace($pattern, $replacement, $subject, $limit = -1, &$count = 0)
327 327
     {
328 328
         return self::$instance->preg_replace($pattern, $replacement, $subject, $limit, $count);
329 329
     }
Please login to merge, or discard this patch.
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The main string wrapper class. 
4
- *
5
- * PHP Version 5.3.0
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   String
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-04-06
18
- */
3
+     * The main string wrapper class. 
4
+     *
5
+     * PHP Version 5.3.0
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   String
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-04-06
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
@@ -184,18 +184,18 @@  discard block
 block discarded – undo
184 184
     
185 185
     
186 186
     /**
187
-	 * Check if a language could be converted to iso-8859-1
188
-	 *
189
-	 * @param string $language
190
-	 *
191
-	 * @return boolean
187
+     * Check if a language could be converted to iso-8859-1
188
+     *
189
+     * @param string $language
190
+     *
191
+     * @return boolean
192 192
      */
193 193
     public static function isLangUTF8ToLatinConvertable($language)
194 194
     {
195 195
         $iso_languages = array('af', 'sq', 'br', 'ca', 'da', 'en', 'fo', 'gl', 'de', 'is', 'it',
196
-                               'ku', 'la', 'lb', 'nb', 'oc', 'pt', 'es', 'sw', 'sv', 'wa', 'eu',
197
-                               // NOTE this languages are not fully supported by latin1 
198
-                               'nl', 'fr', 'et', 'fi', 'cy'
196
+                                'ku', 'la', 'lb', 'nb', 'oc', 'pt', 'es', 'sw', 'sv', 'wa', 'eu',
197
+                                // NOTE this languages are not fully supported by latin1 
198
+                                'nl', 'fr', 'et', 'fi', 'cy'
199 199
         );
200 200
         
201 201
         return in_array($language, $iso_languages);
@@ -203,12 +203,12 @@  discard block
 block discarded – undo
203 203
     
204 204
     
205 205
     /**
206
-	 * Get last occurence of a string within another
207
-	 *
208
-	 * @param string $haystack
209
-	 * @param string $needle
210
-	 *
211
-	 * @return string
206
+     * Get last occurence of a string within another
207
+     *
208
+     * @param string $haystack
209
+     * @param string $needle
210
+     *
211
+     * @return string
212 212
      */
213 213
     public static function strrchr($haystack, $needle)
214 214
     {
@@ -231,13 +231,13 @@  discard block
 block discarded – undo
231 231
     
232 232
     
233 233
     /**
234
-	 * Find position of last occurrence of a char in a string
235
-	 *
236
-	 * @param string $haystack
237
-	 * @param string $needle
238
-	 * @param int $offset
239
-	 *
240
-	 * @return int
234
+     * Find position of last occurrence of a char in a string
235
+     *
236
+     * @param string $haystack
237
+     * @param string $needle
238
+     * @param int $offset
239
+     *
240
+     * @return int
241 241
      */
242 242
     public static function strrpos($haystack, $needle, $offset = 0)
243 243
     {
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/String/Mbstring.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
      * @param string  $needle   Needle
144 144
      * @param boolean $part     Part
145 145
      *
146
-     * @return string|false
146
+     * @return string
147 147
      */
148 148
     public function strstr($haystack, $needle, $part = false)
149 149
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -237,10 +237,10 @@  discard block
 block discarded – undo
237 237
      *
238 238
      * @return array|string
239 239
      */
240
-    public function preg_replace_callback($pattern, $callback, $subject, $limit= -1, &$count = 0)
240
+    public function preg_replace_callback($pattern, $callback, $subject, $limit = -1, &$count = 0)
241 241
     {
242
-        if(is_array($pattern)) {
243
-            foreach($pattern as &$p) {
242
+        if (is_array($pattern)) {
243
+            foreach ($pattern as &$p) {
244 244
                 $p = self::appendU($p);
245 245
             }
246 246
         } else {
@@ -261,10 +261,10 @@  discard block
 block discarded – undo
261 261
      *
262 262
      * @return array|string|null
263 263
      */
264
-    public function preg_replace($pattern, $replacement, $subject, $limit= -1, &$count = 0)
264
+    public function preg_replace($pattern, $replacement, $subject, $limit = -1, &$count = 0)
265 265
     {
266
-        if(is_array($pattern)) {
267
-            foreach($pattern as &$p) {
266
+        if (is_array($pattern)) {
267
+            foreach ($pattern as &$p) {
268 268
                 $p = self::appendU($p);
269 269
             }
270 270
         } else {
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
      */
286 286
     private static function appendU($str)
287 287
     {
288
-        $str = (string) $str;
288
+        $str = (string)$str;
289 289
 
290
-        return parent::isUTF8($str) ?  $str . 'u' : $str;
290
+        return parent::isUTF8($str) ? $str.'u' : $str;
291 291
     }
292 292
 }    
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
- * The string wrapper class using mbstring extension. 
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   String
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-04-06
18
- */
3
+     * The string wrapper class using mbstring extension. 
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   String
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-04-06
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
Please login to merge, or discard this patch.
phpmyfaq/inc/PMF/String/UTF8ToLatinConvertable.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      *
66 66
      * @param string $language
67 67
      *
68
-     * @return PMF_String_Basic
68
+     * @return PMF_String_UTF8ToLatinConvertable
69 69
      */
70 70
     public static function getInstance($language = 'en')
71 71
     {
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      * @param string $needle   Needle
187 187
      * @param boolean $part    Part
188 188
      *
189
-     * @return string|false
189
+     * @return string
190 190
      */
191 191
     public function strstr($haystack, $needle, $part = false)
192 192
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
      *
299 299
      * @return array|string
300 300
      */
301
-    public function preg_replace_callback($pattern, $callback, $subject, $limit= -1, &$count = 0)
301
+    public function preg_replace_callback($pattern, $callback, $subject, $limit = -1, &$count = 0)
302 302
     {
303 303
         if (is_array($pattern)) {
304
-            foreach($pattern as &$p) {
304
+            foreach ($pattern as &$p) {
305 305
                 $p = self::appendU($p);
306 306
             }
307 307
         } else {
@@ -322,10 +322,10 @@  discard block
 block discarded – undo
322 322
      *
323 323
      * @return array|string|null
324 324
      */
325
-    public function preg_replace($pattern, $replacement, $subject, $limit= -1, &$count = 0)
325
+    public function preg_replace($pattern, $replacement, $subject, $limit = -1, &$count = 0)
326 326
     {
327 327
         if (is_array($pattern)) {
328
-            foreach($pattern as &$p) {
328
+            foreach ($pattern as &$p) {
329 329
                 $p = self::appendU($p);
330 330
             }
331 331
         } else {
@@ -346,6 +346,6 @@  discard block
 block discarded – undo
346 346
      */
347 347
     private static function appendU($str)
348 348
     {
349
-        return ((string) $str) . 'u';
349
+        return ((string)$str).'u';
350 350
     }
351 351
 }
Please login to merge, or discard this patch.
Indentation   +16 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The string wrapper class using single byte string functions.
4
- *
5
- * PHP Version 5.3.0
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   String
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-04-08
18
- */
3
+     * The string wrapper class using single byte string functions.
4
+     *
5
+     * PHP Version 5.3.0
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   String
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-04-08
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     exit();
@@ -37,7 +37,6 @@  discard block
 block discarded – undo
37 37
  * @author    Anatoliy Belsky <[email protected]>
38 38
  * @copyright 2009-2016 phpMyFAQ Team
39 39
  * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
40
-
41 40
  * @link      http://www.phpmyfaq.de
42 41
  * @since     2009-04-06
43 42
  */
Please login to merge, or discard this patch.