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 | namespace ETNA\Silex\Provider\RabbitMQ; |
||
4 | |||
5 | use PhpAmqpLib\Message\AMQPMessage; |
||
6 | use PhpAmqpLib\Channel\AMQPChannel; |
||
7 | |||
8 | /** |
||
9 | * |
||
10 | */ |
||
11 | class Queue |
||
12 | { |
||
13 | public function __construct($name, Exchange $exchange, AMQPChannel $channel, $options) |
||
14 | { |
||
15 | $this->name = $name; |
||
0 ignored issues
–
show
|
|||
16 | $this->exchange = $exchange; |
||
0 ignored issues
–
show
The property
exchange does not exist. Did you maybe forget to declare it?
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code: class MyClass { }
$x = new MyClass();
$x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: class MyClass {
public $foo;
}
$x = new MyClass();
$x->foo = true;
![]() |
|||
17 | $this->channel = $channel; |
||
0 ignored issues
–
show
The property
channel does not exist. Did you maybe forget to declare it?
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code: class MyClass { }
$x = new MyClass();
$x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: class MyClass {
public $foo;
}
$x = new MyClass();
$x->foo = true;
![]() |
|||
18 | $this->passive = $options["passive"]; |
||
0 ignored issues
–
show
The property
passive does not exist. Did you maybe forget to declare it?
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code: class MyClass { }
$x = new MyClass();
$x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: class MyClass {
public $foo;
}
$x = new MyClass();
$x->foo = true;
![]() |
|||
19 | $this->durable = $options["durable"]; |
||
0 ignored issues
–
show
The property
durable does not exist. Did you maybe forget to declare it?
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code: class MyClass { }
$x = new MyClass();
$x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: class MyClass {
public $foo;
}
$x = new MyClass();
$x->foo = true;
![]() |
|||
20 | $this->exclusive = $options["exclusive"]; |
||
0 ignored issues
–
show
The property
exclusive does not exist. Did you maybe forget to declare it?
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code: class MyClass { }
$x = new MyClass();
$x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: class MyClass {
public $foo;
}
$x = new MyClass();
$x->foo = true;
![]() |
|||
21 | $this->auto_delete = $options["auto_delete"]; |
||
0 ignored issues
–
show
The property
auto_delete does not exist. Did you maybe forget to declare it?
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code: class MyClass { }
$x = new MyClass();
$x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: class MyClass {
public $foo;
}
$x = new MyClass();
$x->foo = true;
![]() |
|||
22 | |||
23 | $channel->queue_declare( |
||
24 | $name, |
||
25 | $this->passive, |
||
26 | $this->durable, |
||
27 | $this->exclusive, |
||
28 | $this->auto_delete |
||
29 | ); |
||
30 | |||
31 | if ($exchange->getName()) { |
||
32 | $routing_key = $exchange->getType() == "fanout" ? null : $name; |
||
33 | $channel->queue_bind($name, $exchange->getName(), $routing_key); |
||
34 | } |
||
35 | } |
||
36 | |||
37 | public function getName() |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
38 | { |
||
39 | return $this->name; |
||
40 | } |
||
41 | |||
42 | public function getChannel() |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
43 | { |
||
44 | return $this->channel; |
||
45 | } |
||
46 | |||
47 | public function isPassive() |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
48 | { |
||
49 | return $this->passive; |
||
50 | } |
||
51 | |||
52 | public function isDurable() |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
53 | { |
||
54 | return $this->durable; |
||
55 | } |
||
56 | |||
57 | public function isExclusive() |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
58 | { |
||
59 | return $this->exclusive; |
||
60 | } |
||
61 | |||
62 | public function isAutoDelete() |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
63 | { |
||
64 | return $this->auto_delete; |
||
65 | } |
||
66 | |||
67 | public function send($message, $routing_key = null, $mandatory = false, $immediate = false, $ticket = null) |
||
68 | { |
||
69 | $routing_key = $routing_key !== null ? $routing_key : $this->name; |
||
70 | $message = new AMQPMessage(json_encode($message), ["Content-Type" => "application/json"]); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
71 | $this->channel->basic_publish($message, $this->exchange->getName(), $routing_key, $mandatory, $immediate, $ticket); |
||
0 ignored issues
–
show
|
|||
72 | } |
||
73 | |||
74 | public function listen(\Closure $callback, $no_local = false, $no_ack = false, $exclusive = false, $nowait = false) |
||
75 | { |
||
76 | $chars = preg_split("//", "QWERTYUIOPLKJHGFDSAZXCVBNMqwertyuioplkjhgfdsazxcvbnm1234567890"); |
||
77 | shuffle($chars); |
||
78 | $chars = array_slice($chars, 12); |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
79 | $consumer_tag = implode("", $chars); |
||
80 | $consumer_tag = md5("{$this->name}/{$consumer_tag}"); |
||
81 | $this->channel->basic_consume($this->name, $consumer_tag, $no_local, $no_ack, $exclusive, $nowait, $callback); |
||
82 | } |
||
83 | } |
||
84 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: