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 | /** |
||
4 | * A brief list of features we want in |
||
5 | */ |
||
6 | |||
7 | // iterator interface |
||
8 | p()->next(); |
||
0 ignored issues
–
show
|
|||
9 | p()->current(); |
||
0 ignored issues
–
show
The method
current() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
10 | p()->valid(); |
||
0 ignored issues
–
show
The method
valid() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
11 | p()->rewind(); |
||
0 ignored issues
–
show
The method
rewind() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
12 | p()->getInnerIterator(); |
||
0 ignored issues
–
show
The method
getInnerIterator() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
13 | |||
14 | // pipes |
||
15 | p()->chunk($num); // ok |
||
16 | p()->each($function, $step = 1); //ok |
||
0 ignored issues
–
show
$step = 1 is of type integer , but the function expects a boolean .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
17 | p()->filter($function); //ok |
||
18 | p()->limit($skip = 0, $max); //ok |
||
19 | p()->map($function); //okdi |
||
20 | |||
21 | // factory methods |
||
22 | p()->emit($key = null, $value); //ok |
||
23 | p()->flags($flag1, $flag2 =null, $flagN = null); |
||
0 ignored issues
–
show
The method
flags() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
24 | |||
25 | // terminals |
||
26 | p()->toValues(); // ok. outputs an indexed array. |
||
27 | p()->toArray(); // ok. outputs an array. Keys preserved (last key wins) |
||
28 | p()->toIterator(); // ok. outputs an array. Keys preserved (last key wins) |
||
29 | p()->reduce($function = null); // outputs an array. Keys preserved. Conflicts handled by $function |
||
0 ignored issues
–
show
The method
reduce() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
30 | |||
31 | |||
32 | // timed pipes |
||
33 | p()->maxTime($seconds); //also floats 0.001 etc |
||
0 ignored issues
–
show
The method
maxTime() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
34 | p()->wait($seconds, $function = null); // !$function ? wait again |
||
0 ignored issues
–
show
The method
wait() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
35 | |||
36 | // push to other queues (array, queues, chains) |
||
37 | p()->filter($function, $queue); |
||
0 ignored issues
–
show
$function is of type null , but the function expects a callable .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() The call to
Pipe::filter() has too many arguments starting with $queue .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
38 | p()->map($function, $queue); |
||
0 ignored issues
–
show
$function is of type null , but the function expects a callable .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() The call to
Pipe::map() has too many arguments starting with $queue .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
39 | |||
40 | // accumulators |
||
41 | p()->groupBy($function); |
||
0 ignored issues
–
show
The method
groupBy() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
42 | p()->sort(); |
||
0 ignored issues
–
show
The method
sort() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
43 | |||
44 | // queues |
||
45 | p()->queues->sqlite('queue.db'); |
||
0 ignored issues
–
show
The property
queues does not seem to exist in Pipes\Pipe .
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() |
|||
46 | p()->queues->file('queue.txt'); |
||
47 | p()->queues->json('queue.json'); // one json per line |
||
48 | p()->queues->post($url, $moreParams); |
||
49 | |||
50 | // anonymous pipes |
||
51 | $func = p()->filter($foo)->map($bar); |
||
52 | $result = $func('hello'); |
||
53 | |||
54 | $func->wrap($array); |
||
0 ignored issues
–
show
The method
wrap() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
55 | |||
56 | |||
57 | p($array)->map('p()->emit($k, $v)'); |
||
58 | |||
59 | // --- advanced stuff |
||
60 | |||
61 | // caching |
||
62 | p()->keep(3)->each(function(){ |
||
0 ignored issues
–
show
The method
keep() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
63 | $previous = p()->kept(-1); // also -2, -3 |
||
0 ignored issues
–
show
The method
kept() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() $previous is not used, you could remove the assignment.
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently. $myVar = 'Value';
$higher = false;
if (rand(1, 6) > 3) {
$higher = true;
} else {
$higher = false;
}
Both the ![]() |
|||
64 | }); |
||
65 | |||
66 | // map reduce |
||
67 | p()->shard($function); |
||
0 ignored issues
–
show
The method
shard() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
68 | p()->reduce($shard); |
||
0 ignored issues
–
show
The method
reduce() does not seem to exist on object<Pipes\Pipe> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
69 | |||
70 | |||
71 | /* |
||
72 | |||
73 | Figure out how to: |
||
74 | |||
75 | - properly replace an inneriterator with another in PipeIterator |
||
76 | - properly append new iterms in PipeIterator |
||
77 | - how to make PipeIterator a simple reference to a Pipe Instance |
||
78 | |||
79 | - Pipe iterator should not wrap the Pipe instance but iterate on its |
||
80 | inner iterator. |
||
81 | - Thus, a new Pipe iterator should be initialized for each chainWith |
||
82 | operation. |
||
83 | - Pipe iterator should keep an instance of its pipe for easy retrieval. |
||
84 | - Each chain operation on Pipe iterator should be passed on to its |
||
85 | Pipe parent, but should be reflected on the iterator (?) |
||
86 | |||
87 | Should we return a new Pipe instance for each chainWith? |
||
88 | $pipe = p($collection)->filter('isEmpty'); |
||
89 | $map = $pipe->map('myfunc')->each('func')->limit(3); |
||
90 | $discard = $pipe->each('logme'); |
||
91 | $result = $map->toArray(); |
||
92 | $discarded = $discard->toArray(); |
||
93 | |||
94 | */ |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.