src/SAREhub/Client/Amqp/AmqpConnectionOptions.php
AmqpConnectionOptions
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class AmqpConnectionOptions
{
const DEFAULT_CONNECTION_TIMEOUT = 3;
const DEFAULT_HEARTBEAT = 30;
The method withKeepalive has a boolean flag argument $keepalive, which is a certain sign of a Single Responsibility Principle violation. Open
Open
public function withKeepalive(bool $keepalive = true): AmqpConnectionOptions
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method withSsl has a boolean flag argument $enabled, which is a certain sign of a Single Responsibility Principle violation. Open
Open
public function withSsl(bool $enabled = true): AmqpConnectionOptions
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
There must be one blank line after the namespace declaration Open
Open
namespace SAREhub\Client\Amqp;
- Exclude checks
Expected 1 newline at end of file; 0 found Open
Open
}
- Exclude checks