This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /******************************************************************* |
||
3 | * Created by: Marko Kungla @ OkramLabs on Aug 6, 2012 - 9:00:29 |
||
4 | * Contact: [email protected] - https://okramlabs.com |
||
5 | * @copyright 2015 OkramLabs - https://okramlabs.com |
||
6 | * @license MIT |
||
7 | * |
||
8 | * Package name:libhowi-filesystem |
||
9 | * @category HOWI3 |
||
10 | * @package libhowi |
||
11 | * @subpackage filesystem |
||
12 | * |
||
13 | * Lang: PHP |
||
14 | * Encoding: UTF-8 |
||
15 | * File: DirectoryTreeInterface.inc |
||
16 | * @link https:// |
||
17 | ******************************************************************** |
||
18 | * Contributors: |
||
19 | * @author Marko Kungla <[email protected]> |
||
20 | * Github: https://github.com/mkungla |
||
21 | ******************************************************************** |
||
22 | * Comments: |
||
23 | */ |
||
24 | namespace HOWI3\libhowi\Filesystem\Commons\ObjectInterfaces; |
||
25 | |||
26 | interface DirectoryTreeInterface |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * Returns an iterator for the requested child item if it is a directory |
||
31 | * |
||
32 | * @return DirectoryTreeObject |
||
33 | */ |
||
34 | public function c($basename = false); |
||
35 | |||
36 | /** |
||
37 | * hasChildren override |
||
38 | * |
||
39 | * Original inherited RecursiveDirectoryIterator::hasChildren() |
||
40 | * function returns whether current entry is a directory and not '.' or '..' |
||
41 | * However this function tells wether current item is a directory and has items in the directory |
||
42 | * NB The iterators pointer position do not affect this function |
||
43 | * |
||
44 | * @param string $allow_links |
||
0 ignored issues
–
show
|
|||
45 | * @return boolean |
||
46 | */ |
||
47 | public function hasChildren($allow_links = false); |
||
48 | |||
49 | /** |
||
50 | * Returns an iterator for the current entry if it is a directory |
||
51 | * |
||
52 | * @return DirectoryTreeObject |
||
53 | */ |
||
54 | public function getChildren(); |
||
55 | |||
56 | /** |
||
57 | * Get sub path |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getSubPath(); |
||
62 | |||
63 | /** |
||
64 | * Get sub path and name |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function getSubPathname(); |
||
69 | |||
70 | /** |
||
71 | * Rewind the DirectoryIterator back to the start |
||
72 | * |
||
73 | * @return void |
||
74 | */ |
||
75 | public function rewind(); |
||
76 | |||
77 | /** |
||
78 | * Move forward to next DirectoryIterator item |
||
79 | * |
||
80 | * @return void |
||
81 | */ |
||
82 | public function next(); |
||
83 | |||
84 | /** |
||
85 | * Return the key for the current DirectoryIterator item |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function key(); |
||
90 | |||
91 | /** |
||
92 | * Get the handling flags |
||
93 | * |
||
94 | * @return int The integer value of the set flags. |
||
95 | */ |
||
96 | public function getFlags(); |
||
97 | |||
98 | /** |
||
99 | * Sets handling flags |
||
100 | * |
||
101 | * @param int $flags |
||
102 | * @return void |
||
103 | */ |
||
104 | public function setFlags($flags); |
||
105 | |||
106 | /** |
||
107 | * Return file name of current DirectoryIterator item. |
||
108 | * |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getFilename(); |
||
112 | |||
113 | /** |
||
114 | * Gets the file extension |
||
115 | * |
||
116 | * @return string |
||
117 | */ |
||
118 | public function getExtension(); |
||
119 | |||
120 | /** |
||
121 | * Determine if current DirectoryIterator item is '.' or '..' |
||
122 | * |
||
123 | * @return boolean |
||
124 | */ |
||
125 | public function isDot(); |
||
126 | |||
127 | /** |
||
128 | * Check whether current DirectoryIterator position is a valid file |
||
129 | * |
||
130 | * @return boolean |
||
131 | */ |
||
132 | public function valid(); |
||
133 | |||
134 | /** |
||
135 | * Seek to a DirectoryIterator item |
||
136 | * |
||
137 | * @return void |
||
138 | */ |
||
139 | public function seek($position); |
||
140 | |||
141 | /** |
||
142 | * Get file name as a string |
||
143 | * |
||
144 | * @return string |
||
145 | */ |
||
146 | public function __toString(); |
||
147 | |||
148 | /** |
||
149 | * Return path and file name of current DirectoryIterator item |
||
150 | * |
||
151 | * @return string $pathnamae |
||
152 | */ |
||
153 | public function getPathname(); |
||
154 | |||
155 | /** |
||
156 | * Get the permissions of current DirectoryIterator item (non octal) |
||
157 | * |
||
158 | * @return int like 755 |
||
159 | */ |
||
160 | public function getPerms(); |
||
161 | |||
162 | /** |
||
163 | * Get inode for the current DirectoryIterator item |
||
164 | * |
||
165 | * @return int inode |
||
166 | */ |
||
167 | public function getInode(); |
||
168 | |||
169 | /** |
||
170 | * Get owner ID of current DirectoryIterator item |
||
171 | * |
||
172 | * @return int ID |
||
173 | */ |
||
174 | public function getOwner(); |
||
175 | |||
176 | /** |
||
177 | * Get group ID for the current DirectoryIterator item |
||
178 | * |
||
179 | * @return int group id |
||
180 | */ |
||
181 | public function getGroup(); |
||
182 | |||
183 | /** |
||
184 | * list directory contents by key => value |
||
185 | * @param string $sort |
||
0 ignored issues
–
show
Should the type for parameter
$sort not be false|string ?
This check looks for It makes a suggestion as to what type it considers more descriptive. Most often this is a case of a parameter that can be null in addition to its declared types. ![]() |
|||
186 | * @return array key value |
||
187 | */ |
||
188 | public function ls($sort = false); |
||
189 | |||
190 | /** |
||
191 | * list directory contents by key => value (holding info object) |
||
192 | * stdClass(); |
||
193 | * ->name = $this->getFilename(); |
||
194 | * ->type = $this->getType(); |
||
195 | * ->size = $this->getSize($convert); |
||
196 | * ->taccess = $this->getATime($timeformat); |
||
197 | * ->tchange = $this->getCTime($timeformat); |
||
198 | * ->tmodify = $this->getMTime($timeformat); |
||
199 | * @param string $sort |
||
0 ignored issues
–
show
Should the type for parameter
$sort not be false|string ?
This check looks for It makes a suggestion as to what type it considers more descriptive. Most often this is a case of a parameter that can be null in addition to its declared types. ![]() |
|||
200 | * @return array of objects |
||
201 | */ |
||
202 | public function lsInfo($sort = false, $convert = false, $timeformat = false); |
||
203 | |||
204 | /** |
||
205 | * Get a nested directory tree as a multidimensional array for curent item |
||
206 | */ |
||
207 | public function lsTree(); |
||
0 ignored issues
–
show
For interfaces and abstract methods it is generally a good practice to add a
@return annotation even if it is just @return void or @return null , so that implementors know what to do in the overridden method.
For interface and abstract methods, it is impossible to infer the return type
from the immediate code. In these cases, it is generally advisible to explicitly
annotate these methods with a ![]() |
|||
208 | } |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.