XoopsModules25x /
xoopstube
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
|
0 ignored issues
–
show
|
|||
| 2 | /* |
||
| 3 | You may not change or alter any portion of this comment or credits |
||
| 4 | of supporting developers from this source code or any supporting source code |
||
| 5 | which is considered copyrighted (c) material of the original comment or credit authors. |
||
| 6 | |||
| 7 | This program is distributed in the hope that it will be useful, |
||
| 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
| 10 | */ |
||
| 11 | /** |
||
| 12 | * XoopsTube module |
||
| 13 | * |
||
| 14 | * @copyright XOOPS Project (http://xoops.org) |
||
| 15 | * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) |
||
| 16 | * @package xoopstube |
||
| 17 | * @since 1.06 |
||
| 18 | * @author Xoops Development Team |
||
| 19 | */ |
||
| 20 | // CONFIG displayicons |
||
| 21 | |||
| 22 | defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Interface XoopstubeConstants |
||
| 26 | */ |
||
| 27 | interface XoopstubeConstants |
||
|
0 ignored issues
–
show
Each interface must be in a namespace of at least one level (a top-level vendor name)
You can fix this by adding a namespace to your class: namespace YourVendor;
class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries. Loading history...
|
|||
| 28 | { |
||
| 29 | /**#@+ |
||
| 30 | * Constant definition |
||
| 31 | */ |
||
| 32 | |||
| 33 | const XOOPSTUBE_DISPLAYICONS_ICON = 1; |
||
| 34 | const XOOPSTUBE_DISPLAYICONS_TEXT = 2; |
||
| 35 | const XOOPSTUBE_DISPLAYICONS_NO = 3; |
||
| 36 | |||
| 37 | // CONFIG submissions |
||
| 38 | const XOOPSTUBE_SUBMISSIONS_NONE = 1; |
||
| 39 | const XOOPSTUBE_SUBMISSIONS_DOWNLOAD = 2; |
||
| 40 | const XOOPSTUBE_SUBMISSIONS_MIRROR = 3; |
||
| 41 | const XOOPSTUBE_SUBMISSIONS_BOTH = 4; |
||
| 42 | |||
| 43 | // CONFIG anonpost |
||
| 44 | const XOOPSTUBE_ANONPOST_NONE = 1; |
||
| 45 | const XOOPSTUBE_ANONPOST_DOWNLOAD = 2; |
||
| 46 | const XOOPSTUBE_ANONPOST_MIRROR = 3; |
||
| 47 | const XOOPSTUBE_ANONPOST_BOTH = 4; |
||
| 48 | |||
| 49 | // CONFIG autoapprove |
||
| 50 | const XOOPSTUBE_AUTOAPPROVE_NONE = 1; |
||
| 51 | const XOOPSTUBE_AUTOAPPROVE_DOWNLOAD = 2; |
||
| 52 | const XOOPSTUBE_AUTOAPPROVE_MIRROR = 3; |
||
| 53 | const XOOPSTUBE_AUTOAPPROVE_BOTH = 4; |
||
| 54 | |||
| 55 | // CONFIG autosummary |
||
| 56 | const XOOPSTUBE_AUTOSUMMARY_NO = 1; |
||
| 57 | const XOOPSTUBE_AUTOSUMMARY_IFBLANK = 2; |
||
| 58 | const XOOPSTUBE_AUTOSUMMARY_YES = 3; |
||
| 59 | /**#@-*/ |
||
| 60 | } |
||
| 61 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.