Failed Conditions
Push — psr2 ( 3409ba...d44376 )
by Andreas
06:40
created

inc/deprecated.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
2
// phpcs:ignoreFile -- this file violates PSR2 by definition
3
/**
4
 * These classes and functions are deprecated and will be removed in future releases
5
 */
6
7
/**
8
 * @inheritdoc
9
 * @deprecated 2018-05-07
10
 */
11
class RemoteAccessDeniedException extends \dokuwiki\Remote\AccessDeniedException
12
{
13
    /** @inheritdoc */
14
    public function __construct($message = "", $code = 0, Throwable $previous = null)
15
    {
16
        dbg_deprecated(\dokuwiki\Remote\AccessDeniedException::class);
17
        parent::__construct($message, $code, $previous);
18
    }
19
20
}
21
22
/**
23
 * @inheritdoc
24
 * @deprecated 2018-05-07
25
 */
26
class RemoteException extends \dokuwiki\Remote\RemoteException
27
{
28
    /** @inheritdoc */
29
    public function __construct($message = "", $code = 0, Throwable $previous = null)
30
    {
31
        dbg_deprecated(\dokuwiki\Remote\RemoteException::class);
32
        parent::__construct($message, $code, $previous);
33
    }
34
35
}
36
37
/**
38
 * Escapes regex characters other than (, ) and /
39
 *
40
 * @param string $str
41
 * @return string
42
 * @deprecated 2018-05-04
43
 */
44
function Doku_Lexer_Escape($str)
45
{
46
    dbg_deprecated('\\dokuwiki\\Parsing\\Lexer\\Lexer::escape()');
47
    return \dokuwiki\Parsing\Lexer\Lexer::escape($str);
48
}
49
50
/**
51
 * @inheritdoc
52
 * @deprecated 2018-06-01
53
 */
54
class setting extends \dokuwiki\plugin\config\core\Setting\Setting
55
{
56
    /** @inheritdoc */
57
    public function __construct($key, array $params = null)
58
    {
59
        dbg_deprecated(\dokuwiki\plugin\config\core\Setting\Setting::class);
60
        parent::__construct($key, $params);
61
    }
62
}
63
64
/**
65
 * @inheritdoc
66
 * @deprecated 2018-06-01
67
 */
68
class setting_authtype extends \dokuwiki\plugin\config\core\Setting\SettingAuthtype
69
{
70
    /** @inheritdoc */
71
    public function __construct($key, array $params = null)
72
    {
73
        dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingAuthtype::class);
74
        parent::__construct($key, $params);
75
    }
76
}
77
78
/**
79
 * @inheritdoc
80
 * @deprecated 2018-06-01
81
 */
82
class setting_string extends \dokuwiki\plugin\config\core\Setting\SettingString
83
{
84
    /** @inheritdoc */
85
    public function __construct($key, array $params = null)
86
    {
87
        dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingString::class);
88
        parent::__construct($key, $params);
89
    }
90
}
91
92
/**
93
 * @inheritdoc
94
 * @deprecated 2018-06-15
95
 */
96
class PageChangelog extends \dokuwiki\ChangeLog\PageChangeLog
97
{
98
    /** @inheritdoc */
99
    public function __construct($id, $chunk_size = 8192)
100
    {
101
        dbg_deprecated(\dokuwiki\ChangeLog\PageChangeLog::class);
102
        parent::__construct($id, $chunk_size);
103
    }
104
}
105
106
/**
107
 * @inheritdoc
108
 * @deprecated 2018-06-15
109
 */
110
class MediaChangelog extends \dokuwiki\ChangeLog\MediaChangeLog
111
{
112
    /** @inheritdoc */
113
    public function __construct($id, $chunk_size = 8192)
114
    {
115
        dbg_deprecated(\dokuwiki\ChangeLog\MediaChangeLog::class);
116
        parent::__construct($id, $chunk_size);
117
    }
118
}
119
120
/** Behavior switch for JSON::decode() */
121
define('JSON_LOOSE_TYPE', 16);
122
123
/** Behavior switch for JSON::decode() */
124
define('JSON_STRICT_TYPE', 0);
125
126
/**
127
 * Encode/Decode JSON
128
 * @deprecated 2018-07-27
129
 */
130
class JSON
131
{
132
    protected $use = 0;
133
134
    /**
135
     * @param int $use JSON_*_TYPE flag
136
     * @deprecated  2018-07-27
137
     */
138
    public function __construct($use = JSON_STRICT_TYPE)
139
    {
140
        $this->use = $use;
141
    }
142
143
    /**
144
     * Encode given structure to JSON
145
     *
146
     * @param mixed $var
147
     * @return string
148
     * @deprecated  2018-07-27
149
     */
150
    public function encode($var)
151
    {
152
        dbg_deprecated('json_encode');
153
        return json_encode($var);
154
    }
155
156
    /**
157
     * Alias for encode()
158
     * @param $var
159
     * @return string
160
     * @deprecated  2018-07-27
161
     */
162
    public function enc($var) {
163
        return $this->encode($var);
0 ignored issues
show
Deprecated Code introduced by
The method JSON::encode() has been deprecated with message: 2018-07-27

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
164
    }
165
166
    /**
167
     * Decode given string from JSON
168
     *
169
     * @param string $str
170
     * @return mixed
171
     * @deprecated  2018-07-27
172
     */
173
    public function decode($str)
174
    {
175
        dbg_deprecated('json_encode');
176
        return json_decode($str, ($this->use == JSON_LOOSE_TYPE));
177
    }
178
179
    /**
180
     * Alias for decode
181
     *
182
     * @param $str
183
     * @return mixed
184
     * @deprecated  2018-07-27
185
     */
186
    public function dec($str) {
187
        return $this->decode($str);
0 ignored issues
show
Deprecated Code introduced by
The method JSON::decode() has been deprecated with message: 2018-07-27

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
188
    }
189
}
190