seblucas /
cops
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * COPS (Calibre OPDS PHP Server) class file |
||
| 4 | * |
||
| 5 | * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) |
||
| 6 | * @author Sébastien Lucas <[email protected]> |
||
| 7 | */ |
||
| 8 | |||
| 9 | abstract class Base |
||
|
0 ignored issues
–
show
|
|||
| 10 | { |
||
| 11 | const PAGE_INDEX = "index"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
index does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 12 | const PAGE_ALL_AUTHORS = "1"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
1 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 13 | const PAGE_AUTHORS_FIRST_LETTER = "2"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
2 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 14 | const PAGE_AUTHOR_DETAIL = "3"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
3 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 15 | const PAGE_ALL_BOOKS = "4"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
4 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 16 | const PAGE_ALL_BOOKS_LETTER = "5"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
5 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 17 | const PAGE_ALL_SERIES = "6"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
6 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 18 | const PAGE_SERIE_DETAIL = "7"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
7 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 19 | const PAGE_OPENSEARCH = "8"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
8 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 20 | const PAGE_OPENSEARCH_QUERY = "9"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
9 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 21 | const PAGE_ALL_RECENT_BOOKS = "10"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
10 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 22 | const PAGE_ALL_TAGS = "11"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
11 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 23 | const PAGE_TAG_DETAIL = "12"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
12 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 24 | const PAGE_BOOK_DETAIL = "13"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
13 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 25 | const PAGE_ALL_CUSTOMS = "14"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
14 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 26 | const PAGE_CUSTOM_DETAIL = "15"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
15 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 27 | const PAGE_ABOUT = "16"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
16 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 28 | const PAGE_ALL_LANGUAGES = "17"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
17 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 29 | const PAGE_LANGUAGE_DETAIL = "18"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
18 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 30 | const PAGE_CUSTOMIZE = "19"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
19 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 31 | const PAGE_ALL_PUBLISHERS = "20"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
20 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 32 | const PAGE_PUBLISHER_DETAIL = "21"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
21 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 33 | const PAGE_ALL_RATINGS = "22"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
22 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 34 | const PAGE_RATING_DETAIL = "23"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
23 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 35 | |||
| 36 | const COMPATIBILITY_XML_ALDIKO = "aldiko"; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
aldiko does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 37 | |||
| 38 | private static $db = NULL; |
||
| 39 | |||
| 40 | 144 | public static function isMultipleDatabaseEnabled () { |
|
| 41 | 144 | global $config; |
|
|
0 ignored issues
–
show
Compatibility
Best Practice
introduced
by
Use of
global functionality is not recommended; it makes your code harder to test, and less reusable.
Instead of relying on 1. Pass all data via parametersfunction myFunction($a, $b) {
// Do something
}
2. Create a class that maintains your stateclass MyClass {
private $a;
private $b;
public function __construct($a, $b) {
$this->a = $a;
$this->b = $b;
}
public function myFunction() {
// Do something
}
}
Loading history...
|
|||
| 42 | 144 | return is_array ($config['calibre_directory']); |
|
| 43 | } |
||
| 44 | |||
| 45 | 49 | public static function useAbsolutePath () { |
|
| 46 | 49 | global $config; |
|
|
0 ignored issues
–
show
Compatibility
Best Practice
introduced
by
Use of
global functionality is not recommended; it makes your code harder to test, and less reusable.
Instead of relying on 1. Pass all data via parametersfunction myFunction($a, $b) {
// Do something
}
2. Create a class that maintains your stateclass MyClass {
private $a;
private $b;
public function __construct($a, $b) {
$this->a = $a;
$this->b = $b;
}
public function myFunction() {
// Do something
}
}
Loading history...
|
|||
| 47 | 49 | $path = self::getDbDirectory(); |
|
| 48 | 49 | return preg_match ('/^\//', $path) || // Linux / |
|
| 49 | 49 | preg_match ('/^\w\:/', $path); // Windows X: |
|
| 50 | } |
||
| 51 | |||
| 52 | 56 | public static function noDatabaseSelected () { |
|
| 53 | 56 | return self::isMultipleDatabaseEnabled () && is_null (GetUrlParam (DB)); |
|
| 54 | } |
||
| 55 | |||
| 56 | 4 | View Code Duplication | public static function getDbList () { |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. Loading history...
|
|||
| 57 | 4 | global $config; |
|
|
0 ignored issues
–
show
Compatibility
Best Practice
introduced
by
Use of
global functionality is not recommended; it makes your code harder to test, and less reusable.
Instead of relying on 1. Pass all data via parametersfunction myFunction($a, $b) {
// Do something
}
2. Create a class that maintains your stateclass MyClass {
private $a;
private $b;
public function __construct($a, $b) {
$this->a = $a;
$this->b = $b;
}
public function myFunction() {
// Do something
}
}
Loading history...
|
|||
| 58 | 4 | if (self::isMultipleDatabaseEnabled ()) { |
|
| 59 | 4 | return $config['calibre_directory']; |
|
| 60 | } else { |
||
| 61 | 1 | return array ("" => $config['calibre_directory']); |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 62 | } |
||
| 63 | } |
||
| 64 | |||
| 65 | 5 | View Code Duplication | public static function getDbNameList () { |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. Loading history...
|
|||
| 66 | 5 | global $config; |
|
|
0 ignored issues
–
show
Compatibility
Best Practice
introduced
by
Use of
global functionality is not recommended; it makes your code harder to test, and less reusable.
Instead of relying on 1. Pass all data via parametersfunction myFunction($a, $b) {
// Do something
}
2. Create a class that maintains your stateclass MyClass {
private $a;
private $b;
public function __construct($a, $b) {
$this->a = $a;
$this->b = $b;
}
public function myFunction() {
// Do something
}
}
Loading history...
|
|||
| 67 | 5 | if (self::isMultipleDatabaseEnabled ()) { |
|
| 68 | 5 | return array_keys ($config['calibre_directory']); |
|
| 69 | } else { |
||
| 70 | return array (""); |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 71 | } |
||
| 72 | } |
||
| 73 | |||
| 74 | 1 | View Code Duplication | public static function getDbName ($database = NULL) { |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. Loading history...
|
|||
| 75 | 1 | global $config; |
|
|
0 ignored issues
–
show
Compatibility
Best Practice
introduced
by
Use of
global functionality is not recommended; it makes your code harder to test, and less reusable.
Instead of relying on 1. Pass all data via parametersfunction myFunction($a, $b) {
// Do something
}
2. Create a class that maintains your stateclass MyClass {
private $a;
private $b;
public function __construct($a, $b) {
$this->a = $a;
$this->b = $b;
}
public function myFunction() {
// Do something
}
}
Loading history...
|
|||
| 76 | 1 | if (self::isMultipleDatabaseEnabled ()) { |
|
| 77 | 1 | if (is_null ($database)) $database = GetUrlParam (DB, 0); |
|
| 78 | 1 | if (!is_null($database) && !preg_match('/^\d+$/', $database)) { |
|
| 79 | self::error ($database); |
||
| 80 | } |
||
| 81 | 1 | $array = array_keys ($config['calibre_directory']); |
|
| 82 | 1 | return $array[$database]; |
|
| 83 | } |
||
| 84 | return ""; |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 85 | } |
||
| 86 | |||
| 87 | 126 | View Code Duplication | public static function getDbDirectory ($database = NULL) { |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. Loading history...
|
|||
| 88 | 126 | global $config; |
|
|
0 ignored issues
–
show
Compatibility
Best Practice
introduced
by
Use of
global functionality is not recommended; it makes your code harder to test, and less reusable.
Instead of relying on 1. Pass all data via parametersfunction myFunction($a, $b) {
// Do something
}
2. Create a class that maintains your stateclass MyClass {
private $a;
private $b;
public function __construct($a, $b) {
$this->a = $a;
$this->b = $b;
}
public function myFunction() {
// Do something
}
}
Loading history...
|
|||
| 89 | 126 | if (self::isMultipleDatabaseEnabled ()) { |
|
| 90 | 9 | if (is_null ($database)) $database = GetUrlParam (DB, 0); |
|
| 91 | 9 | if (!is_null($database) && !preg_match('/^\d+$/', $database)) { |
|
| 92 | self::error ($database); |
||
| 93 | } |
||
| 94 | 9 | $array = array_values ($config['calibre_directory']); |
|
| 95 | 9 | return $array[$database]; |
|
| 96 | } |
||
| 97 | 117 | return $config['calibre_directory']; |
|
| 98 | } |
||
| 99 | |||
| 100 | |||
| 101 | 98 | public static function getDbFileName ($database = NULL) { |
|
| 102 | 98 | return self::getDbDirectory ($database) .'metadata.db'; |
|
| 103 | } |
||
| 104 | |||
| 105 | 2 | private static function error ($database) { |
|
| 106 | 2 | if (php_sapi_name() != "cli") { |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
cli does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 107 | header("location: checkconfig.php?err=1"); |
||
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
location: checkconfig.php?err=1 does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 108 | } |
||
| 109 | 2 | throw new Exception("Database <{$database}> not found."); |
|
|
0 ignored issues
–
show
As per coding-style, please use concatenation or
sprintf for the variable $database instead of interpolation.
It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings. // Instead of
$x = "foo $bar $baz";
// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
|
|||
| 110 | } |
||
| 111 | |||
| 112 | 159 | public static function getDb ($database = NULL) { |
|
| 113 | 159 | if (is_null (self::$db)) { |
|
| 114 | try { |
||
| 115 | 98 | if (is_readable (self::getDbFileName ($database))) { |
|
| 116 | 97 | self::$db = new PDO('sqlite:'. self::getDbFileName ($database)); |
|
| 117 | 97 | if (useNormAndUp ()) { |
|
| 118 | 7 | self::$db->sqliteCreateFunction ('normAndUp', 'normAndUp', 1); |
|
| 119 | 7 | } |
|
| 120 | 97 | } else { |
|
| 121 | 2 | self::error ($database); |
|
| 122 | } |
||
| 123 | 98 | } catch (Exception $e) { |
|
| 124 | 2 | self::error ($database); |
|
| 125 | } |
||
| 126 | 97 | } |
|
| 127 | 158 | return self::$db; |
|
| 128 | } |
||
| 129 | |||
| 130 | 4 | public static function checkDatabaseAvailability () { |
|
| 131 | 4 | if (self::noDatabaseSelected ()) { |
|
| 132 | 3 | for ($i = 0; $i < count (self::getDbList ()); $i++) { |
|
| 133 | 3 | self::getDb ($i); |
|
| 134 | 2 | self::clearDb (); |
|
| 135 | 2 | } |
|
| 136 | 1 | } else { |
|
| 137 | 1 | self::getDb (); |
|
| 138 | } |
||
| 139 | 2 | return true; |
|
| 140 | } |
||
| 141 | |||
| 142 | 103 | public static function clearDb () { |
|
| 143 | 103 | self::$db = NULL; |
|
| 144 | 103 | } |
|
| 145 | |||
| 146 | 24 | public static function executeQuerySingle ($query, $database = NULL) { |
|
| 147 | 24 | return self::getDb ($database)->query($query)->fetchColumn(); |
|
| 148 | } |
||
| 149 | |||
| 150 | 19 | public static function getCountGeneric($table, $id, $pageId, $numberOfString = NULL) { |
|
| 151 | 19 | if (!$numberOfString) { |
|
| 152 | 18 | $numberOfString = $table . ".alphabetical"; |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
.alphabetical does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 153 | 18 | } |
|
| 154 | 19 | $count = self::executeQuerySingle ('select count(*) from ' . $table); |
|
| 155 | 19 | if ($count == 0) return NULL; |
|
| 156 | 19 | $entry = new Entry (localize($table . ".title"), $id, |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
.title does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 157 | 19 | str_format (localize($numberOfString, $count), $count), "text", |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
text does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 158 | 19 | array ( new LinkNavigation ("?page=".$pageId)), "", $count); |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
?page= does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
Coding Style
Comprehensibility
introduced
by
The string literal
does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 159 | 19 | return $entry; |
|
| 160 | } |
||
| 161 | |||
| 162 | 35 | public static function getEntryArrayWithBookNumber ($query, $columns, $params, $category) { |
|
| 163 | /* @var $result PDOStatement */ |
||
| 164 | |||
| 165 | 35 | list (, $result) = self::executeQuery ($query, $columns, "", $params, -1); |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 166 | 35 | $entryArray = array(); |
|
| 167 | 35 | while ($post = $result->fetchObject ()) |
|
| 168 | { |
||
| 169 | /* @var $instance Author|Tag|Serie|Publisher */ |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
38% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. Loading history...
|
|||
| 170 | |||
| 171 | 25 | $instance = new $category ($post); |
|
| 172 | 25 | if (property_exists($post, "sort")) { |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
sort does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 173 | 17 | $title = $post->sort; |
|
| 174 | 17 | } else { |
|
| 175 | 8 | $title = $post->name; |
|
| 176 | } |
||
| 177 | 25 | array_push ($entryArray, new Entry ($title, $instance->getEntryId (), |
|
| 178 | 25 | str_format (localize("bookword", $post->count), $post->count), "text", |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
bookword does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
Coding Style
Comprehensibility
introduced
by
The string literal
text does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 179 | 25 | array ( new LinkNavigation ($instance->getUri ())), "", $post->count)); |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 180 | 25 | } |
|
| 181 | 35 | return $entryArray; |
|
| 182 | } |
||
| 183 | |||
| 184 | 75 | public static function executeQuery($query, $columns, $filter, $params, $n, $database = NULL, $numberPerPage = NULL) { |
|
| 185 | 75 | $totalResult = -1; |
|
| 186 | |||
| 187 | 75 | if (useNormAndUp ()) { |
|
| 188 | 7 | $query = preg_replace("/upper/", "normAndUp", $query); |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
/upper/ does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
Coding Style
Comprehensibility
introduced
by
The string literal
normAndUp does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 189 | 7 | $columns = preg_replace("/upper/", "normAndUp", $columns); |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
/upper/ does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
Coding Style
Comprehensibility
introduced
by
The string literal
normAndUp does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 190 | 7 | } |
|
| 191 | |||
| 192 | 75 | if (is_null ($numberPerPage)) { |
|
| 193 | 73 | $numberPerPage = getCurrentOption ("max_item_per_page"); |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
max_item_per_page does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 194 | 73 | } |
|
| 195 | |||
| 196 | 75 | if ($numberPerPage != -1 && $n != -1) |
|
| 197 | 75 | { |
|
| 198 | // First check total number of results |
||
| 199 | 28 | $result = self::getDb ($database)->prepare (str_format ($query, "count(*)", $filter)); |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
count(*) does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 200 | 28 | $result->execute ($params); |
|
| 201 | 28 | $totalResult = $result->fetchColumn (); |
|
| 202 | |||
| 203 | // Next modify the query and params |
||
| 204 | 28 | $query .= " limit ?, ?"; |
|
|
0 ignored issues
–
show
Coding Style
Comprehensibility
introduced
by
The string literal
limit ?, ? does not require double quotes, as per coding-style, please use single quotes.
PHP provides two ways to mark string literals. Either with single quotes String literals in single quotes on the other hand are evaluated very literally and the only two
characters that needs escaping in the literal are the single quote itself ( Double quoted string literals may contain other variables or more complex escape sequences. <?php
$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";
print $doubleQuoted;
will print an indented: If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear. For more information on PHP string literals and available escape sequences see the PHP core documentation. Loading history...
|
|||
| 205 | 28 | array_push ($params, ($n - 1) * $numberPerPage, $numberPerPage); |
|
| 206 | 28 | } |
|
| 207 | |||
| 208 | 75 | $result = self::getDb ($database)->prepare(str_format ($query, $columns, $filter)); |
|
| 209 | 75 | $result->execute ($params); |
|
| 210 | 75 | return array ($totalResult, $result); |
|
| 211 | } |
||
| 212 | |||
| 213 | } |
||
| 214 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.