Check for use of the @return annotation on a constructor.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Kotori.php |
||
4 | * |
||
5 | * A Tiny Model-View-Controller PHP Framework |
||
6 | * |
||
7 | * This content is released under the Apache 2 License |
||
8 | * |
||
9 | * Copyright (c) 2015-2017 Kotori Technology. All rights reserved. |
||
10 | * |
||
11 | * Licensed under the Apache License, Version 2.0 (the "License"); |
||
12 | * you may not use this file except in compliance with the License. |
||
13 | * You may obtain a copy of the License at |
||
14 | * |
||
15 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
16 | * |
||
17 | * Unless required by applicable law or agreed to in writing, software |
||
18 | * distributed under the License is distributed on an "AS IS" BASIS, |
||
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
20 | * See the License for the specific language governing permissions and |
||
21 | * limitations under the License. |
||
22 | */ |
||
23 | |||
24 | /** |
||
25 | * Dummy Caching Class |
||
26 | * |
||
27 | * @package Kotori |
||
28 | * @subpackage Cache |
||
29 | * @author Kokororin |
||
30 | * @link https://kotori.love |
||
31 | */ |
||
32 | |||
33 | namespace Kotori\Core\Cache; |
||
34 | |||
35 | use Kotori\Debug\Hook; |
||
36 | |||
37 | class Dummy |
||
38 | { |
||
39 | |||
40 | /** |
||
41 | * Class constructor |
||
42 | * |
||
43 | * Setup Memcache(d) |
||
44 | * |
||
45 | * @return void |
||
0 ignored issues
–
show
|
|||
46 | */ |
||
47 | public function __construct() |
||
48 | { |
||
49 | Hook::listen(__CLASS__); |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Get |
||
54 | * |
||
55 | * Since this is the dummy class, it's always going to return FALSE. |
||
56 | * |
||
57 | * @param string $id |
||
58 | * @return boolean |
||
59 | */ |
||
60 | public function get($id) |
||
61 | { |
||
62 | return false; |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * Cache Set |
||
67 | * |
||
68 | * @param string $id |
||
69 | * @param mixed $data |
||
70 | * @param int $ttl |
||
71 | * @param boolean $raw |
||
72 | * @return boolean |
||
73 | */ |
||
74 | public function set($id, $data, $ttl = 60, $raw = false) |
||
75 | { |
||
76 | return true; |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * Delete from Cache |
||
81 | * |
||
82 | * @param mixed $id |
||
83 | * @return boolean |
||
84 | */ |
||
85 | public function delete($id) |
||
86 | { |
||
87 | return true; |
||
88 | } |
||
89 | |||
90 | /** |
||
91 | * Increment a raw value |
||
92 | * |
||
93 | * @param string $id |
||
94 | * @param int $offset |
||
95 | * @return mixed |
||
96 | */ |
||
97 | public function increment($id, $offset = 1) |
||
98 | { |
||
99 | return true; |
||
100 | } |
||
101 | |||
102 | /** |
||
103 | * Decrement a raw value |
||
104 | * |
||
105 | * @param string $id |
||
106 | * @param int $offset |
||
107 | * @return mixed |
||
108 | */ |
||
109 | public function decrement($id, $offset = 1) |
||
110 | { |
||
111 | return true; |
||
112 | } |
||
113 | |||
114 | /** |
||
115 | * Clean the cache |
||
116 | * |
||
117 | * @return boolean |
||
118 | */ |
||
119 | public function clean() |
||
120 | { |
||
121 | return true; |
||
122 | } |
||
123 | |||
124 | /** |
||
125 | * Cache Info |
||
126 | * |
||
127 | * @param string $type |
||
128 | * @return boolean |
||
129 | */ |
||
130 | public function cacheInfo($type = null) |
||
131 | { |
||
132 | return false; |
||
133 | } |
||
134 | |||
135 | /** |
||
136 | * Get Cache Metadata |
||
137 | * |
||
138 | * @param mixed $id |
||
139 | * @return boolean |
||
140 | */ |
||
141 | public function getMetadata($id) |
||
142 | { |
||
143 | return false; |
||
144 | } |
||
145 | |||
146 | /** |
||
147 | * Is this caching driver supported on the system? |
||
148 | * Of course this one is. |
||
149 | * |
||
150 | * @return boolean |
||
151 | */ |
||
152 | public function isSupported() |
||
153 | { |
||
154 | return true; |
||
155 | } |
||
156 | |||
157 | } |
||
158 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.