GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (4)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/Definition/Queue.php (1 issue)

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
3
4
namespace AmqpWorkers\Definition;
5
6
use AmqpWorkers\Exception\DefinitionException;
7
8
/**
9
 * Queue definition.
10
 * Use it with `AmqpWorkers\Producer::withQueue` or `AmqpWorkers\Consumer::withQueue`.
11
 *
12
 * @package AmqpWorkers\Definition
13
 * @author Alex Panshin <[email protected]>
14
 * @since 1.0
15
 */
16
class Queue
17
{
18
    /** @var string  */
19
    private $name;
20
21
    /** @var bool  */
22
    private $passive = false;
23
24
    /** @var bool  */
25
    private $durable = false;
26
27
    /** @var bool  */
28
    private $exclusive = false;
29
30
    /** @var bool  */
31
    private $autoDelete = false;
32
33
    /** @var bool  */
34
    private $nowait = false;
35
36
    /** @var array|null */
37
    private $arguments = null;
38
39
    /** @var int|null  */
40
    private $ticket = null;
41
42
    /**
43
     * @param string $name
44
     * @return static
45
     * @throws \AmqpWorkers\Exception\DefinitionException
46
     */
47
    public static function factory($name)
48
    {
49
        return new static($name);
50
    }
51
52
    /**
53
     * Queue constructor.
54
     * @param string $name
55
     * @throws \AmqpWorkers\Exception\DefinitionException if empty name is given
56
     */
57
    public function __construct($name)
58
    {
59
        if ($name === null || $name === '') {
60
            throw new DefinitionException('Queue name cannot be empty.');
61
        }
62
        $this->name = (string) $name;
63
    }
64
65
    /**
66
     * @see https://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.declare.passive
67
     * @default false
68
     * @param $passive
69
     * @return Queue
70
     */
71
    public function passive($passive)
72
    {
73
        $this->passive = $passive;
74
        return $this;
75
    }
76
77
    /**
78
     * @see https://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.declare.durable
79
     * @default false
80
     * @param bool $durable
81
     * @return $this
82
     */
83
    public function durable($durable)
84
    {
85
        $this->durable = $durable;
86
        return $this;
87
    }
88
89
    /**
90
     * @see https://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.declare.exclusive
91
     * @default false
92
     * @param bool $exclusive
93
     * @return $this
94
     */
95
    public function exclusive($exclusive)
96
    {
97
        $this->exclusive = $exclusive;
98
        return $this;
99
    }
100
101
    /**
102
     * @see https://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.declare.auto-delete
103
     * @default false
104
     * @param bool $autoDelete
105
     * @return $this
106
     */
107
    public function autoDelete($autoDelete)
108
    {
109
        $this->autoDelete = $autoDelete;
110
        return $this;
111
    }
112
113
    /**
114
     * @see https://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.declare.no-wait
115
     * @default false
116
     * @param bool $nowait
117
     * @return $this
118
     */
119
    public function nowait($nowait)
120
    {
121
        $this->nowait = $nowait;
122
        return $this;
123
    }
124
125
    /**
126
     * @see https://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.declare.arguments
127
     * @default null
128
     * @param array $arguments
129
     * @return $this
130
     */
131
    public function arguments(array $arguments)
132
    {
133
        $this->arguments = $arguments;
134
        return $this;
135
    }
136
137
    /**
138
     * @default null
139
     * @param int|null $ticket
140
     * @return $this
141
     */
142
    public function ticket($ticket)
143
    {
144
        $this->ticket = $ticket;
145
        return $this;
146
    }
147
148
    /**
149
     * This field is necessary without all others so that we have dedicated getter for it.
150
     * @return string
151
     */
152
    public function getName()
153
    {
154
        return $this->name;
155
    }
156
157
    /**
158
     * Returns the list of parameters for queue_declare
159
     *
160
     * @see \Phpamqplib\Channel\AMQPChannel::queue_declare()
161
     * @return array
162
     */
163 View Code Duplication
    public function listParams()
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
164
    {
165
        return [
166
            $this->passive,
167
            $this->durable,
168
            $this->exclusive,
169
            $this->autoDelete,
170
            $this->nowait,
171
            $this->arguments,
172
            $this->ticket
173
        ];
174
    }
175
}
176