Completed
Push — master ( 50d5fe...d807c2 )
by Michael
13s
created

class/constants.php (2 issues)

Upgrade to new PHP Analysis Engine

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
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 44 and the first side effect is on line 42.

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
               XOOPS - PHP Content Management System
4
                   Copyright (c) 2000 XOOPS.org
5
                      <http://www.xoops.org/>
6
 This program is free software; you can redistribute it and/or modify
7
 it under the terms of the GNU General Public License as published by
8
 the Free Software Foundation; either version 2 of the License, or
9
 (at your option) any later version.
10
11
 You may not change or alter any portion of this comment or credits
12
 of supporting developers from this source code or any supporting
13
 source code which is considered copyrighted (c) material of the
14
 original comment or credit authors.
15
16
 This program is distributed in the hope that it will be useful,
17
 but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 GNU General Public License for more details.
20
21
 You should have received a copy of the GNU General Public License
22
 along with this program; if not, write to the Free Software
23
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
24
*/
25
/**
26
 * About module
27
 *
28
 * Class to define About Us constant values. These constants are
29
 * used to make the code easier to read and to keep values in central
30
 * location if they need to be changed.  These should not normally need
31
 * to be modified. If they are to be modified it is recommended to change
32
 * the value(s) before module installation. Additionally the module may not
33
 * work correctly if trying to upgrade if these values have been changed.
34
 *
35
 * @copyright::  {@link http://sourceforge.net/projects/xoops/ The XOOPS Project}
36
 * @license::    {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
37
 * @author::     zyspec <[email protected]>
38
 * @package::    about
39
 * @since::      1.05
40
 **/
41
42
defined('XOOPS_ROOT_PATH') || exit('Restricted access');
43
44
interface AboutConstants
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...
45
{
46
/**#@+
47
 * Constant definition
48
 */
49
    /**
50
     * display - page
51
     */
52
    const PAGE = 1;
53
    /**
54
     * display - category
55
     */
56
    const CATEGORY = 2;
57
    /**
58
     * published
59
     */
60
    /**
61
     * Page - page type
62
     */
63
    const PAGE_TYPE_PAGE = 1;
64
    /**
65
     * Link - page type
66
     */
67
    const PAGE_TYPE_LINK = 2;
68
    /**
69
     * published
70
     */
71
    const PUBLISHED = 1;
72
    /**
73
     * not published (draft)
74
     */
75
    const NOT_PUBLISHED = 0;
76
    /**
77
     * display in menu
78
     */
79
    const IN_MENU = 1;
80
    /**
81
     * do not display in menu
82
     */
83
    const NOT_IN_MENU = 0;
84
    /**
85
     * Invalid ID
86
     */
87
    const INVALID_ID = 0;
88
    /**
89
     * default ereg size
90
     */
91
    const DEFAULT_EREG = 500;
92
    /**
93
     * default index for menu page
94
     */
95
    const DEFAULT_INDEX = 1;
96
    /**
97
     * not index
98
     */
99
    const NOT_INDEX = 0;
100
    /**
101
     * no delay XOOPS redirect delay (in seconds)
102
     */
103
    const REDIRECT_DELAY_NONE = 0;
104
    /**
105
     * short XOOPS redirect delay (in seconds)
106
     */
107
    const REDIRECT_DELAY_SHORT = 1;
108
    /**
109
     * medium XOOPS redirect delay (in seconds)
110
     */
111
    const REDIRECT_DELAY_MEDIUM = 3;
112
    /**
113
     * long XOOPS redirect delay (in seconds)
114
     */
115
    const REDIRECT_DELAY_LONG = 7;
116
    /**
117
     * confirm not ok to take action
118
     */
119
    const CONFIRM_NOT_OK = 0;
120
    /**
121
     * confirm ok to take action
122
     */
123
    const CONFIRM_OK = 1;
124
    /**
125
     * Set flag
126
     */
127
    const SET = 1;
128
    /**
129
     * Unset flag
130
     */
131
    const NOT_SET = 0;
132
/**#@-*/
133
}
134