Completed
Pull Request — master (#9)
by Michael
01:20
created

XoopspartnersConstants

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 79
c 0
b 0
f 0
1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 34 and the first side effect is on line 29.

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.

Loading history...
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
 * This program is distributed in the hope that it will be useful,
7
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
*/
10
/**
11
 * Module: XoopsPartners - a partner affiliation links module
12
 *
13
 * Class to define XOOPS Partners constant values. These constants are
14
 * used to make the code easier to read and to keep values in central
15
 * location if they need to be changed.  These should not normally need
16
 * to be modified. If they are to be modified it is recommended to change
17
 * the value(s) before module installation. Additionally the module may not
18
 * work correctly if trying to upgrade if these values have been changed.
19
 *
20
 * @package      module\xoopspartners\class
21
 * @author       zyspec <[email protected]>
22
 * @author       XOOPS Module Development Team
23
 * @copyright    {@link https://xoops.org 2001-2016 XOOPS Project}
24
 * @license      {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
25
 * @link         https://xoops.org XOOPS
26
 * @since        1.12
27
 */
28
29
defined('XOOPS_ROOT_PATH') || exit('Restricted access');
30
31
/**
32
 * Interface XoopspartnersConstants
33
 */
34
interface XoopspartnersConstants
0 ignored issues
show
Coding Style Compatibility introduced by
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...
35
{
36
    /**#@+
37
     * Constant definition
38
     */
39
    /**
40
     * no delay XOOPS redirect delay (in seconds)
41
     */
42
    const REDIRECT_DELAY_NONE = 0;
43
    /**
44
     * short XOOPS redirect delay (in seconds)
45
     */
46
    const REDIRECT_DELAY_SHORT = 1;
47
    /**
48
     * medium XOOPS redirect delay (in seconds)
49
     */
50
    const REDIRECT_DELAY_MEDIUM = 3;
51
    /**
52
     * long XOOPS redirect delay (in seconds)
53
     */
54
    const REDIRECT_DELAY_LONG = 7;
55
    /**
56
     * default image width  (don't change here, change in Preferences)
57
     */
58
    const DEFAULT_MAX_WIDTH = 150;
59
    /**
60
     * default image height (don't change here, change in Preferences)
61
     */
62
    const DEFAULT_MAX_HEIGHT = 110;
63
    /**
64
     * value indicates poll options are shown as list
65
     */
66
    const DEFAULT_UPLOAD_SIZE = 1048576;
67
    /**
68
     * default partner ID
69
     */
70
    const DEFAULT_PID = 0;
71
    /**
72
     * default module ID
73
     */
74
    const DEFAULT_MID = 0;
75
    /**
76
     *  indicates a partner title should be displayed
77
     */
78
    const SHOW_TITLE = 2;
79
    /**
80
     *  indicates a partner image should be displayed
81
     */
82
    const SHOW_IMAGE = 1;
83
    /**
84
     *  indicates a partner listing is inactive
85
     */
86
    const STATUS_INACTIVE = 0;
87
    /**
88
     *  indicates a partner listing is active
89
     */
90
    const STATUS_ACTIVE = 1;
91
    /**
92
     * default poll weight for display order
93
     */
94
    const DEFAULT_WEIGHT = 0;
95
    /**
96
     * cannot join
97
     */
98
    const JOIN_NOT_OK = 0;
99
    /**
100
     * ok to join
101
     */
102
    const JOIN_OK = 1;
103
    /**
104
     * confirm not ok to take action
105
     */
106
    const CONFIRM_NOT_OK = 0;
107
    /**
108
     * confirm ok to take action
109
     */
110
    const CONFIRM_OK = 1;
111
    /**#@-*/
112
}
113