Showing 12 of 12 total issues
Doc comment for parameter "$defaultBaseUrl" missing Open
/**
- Exclude checks
Missing blank line before return statement Open
return $record;
- Exclude checks
Missing blank line before return statement Open
return $record;
- Exclude checks
Avoid assigning values to variables in if clauses and the like (line '46', column '14'). Open
public function __invoke(array $record)
{
$record['extra']['base_url'] = $this->defaultBaseUrl;
// Ensure we have a request (maybe we're in a console command).
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '44', column '14'). Open
public function __invoke(array $record)
{
// client_ip will hold the request's actual origin address
$record['extra']['uid'] = 0;
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '53', column '14'). Open
public function __invoke(array $record)
{
// Yhe client_ip will hold the request's actual origin address.
$record['extra']['client_ip'] = $this->cachedClientIp
? $this->cachedClientIp
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '40', column '22'). Open
public function __invoke(array $record)
{
// client_ip will hold the request's actual origin address
$record['extra']['uid'] = 0;
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Line exceeds 80 characters; contains 83 characters Open
public function __construct(RequestStack $requestStack, $defaultBaseUrl = null)
- Exclude checks
Line exceeds 80 characters; contains 116 characters Open
'level' => $container->getParameter("kernel.environment") === 'prod' ? 'notice' : 'warning',
- Exclude checks
Line exceeds 80 characters; contains 87 characters Open
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
- Exclude checks
Line exceeds 80 characters; contains 117 characters Open
'ident' => $container->getParameter('digipolis_syslog_identity') ?: 'no_syslog_identity_set',
- Exclude checks
Fenced code blocks should be surrounded by blank lines Open
```parameters.yml``` file to configure the syslog identity.
- Read upRead up
- Exclude checks
MD031 - Fenced code blocks should be surrounded by blank lines
Tags: code, blank_lines
Aliases: blanks-around-fences
This rule is triggered when fenced code blocks are either not preceded or not followed by a blank line:
Some text
```
Code block
```
```
Another code block
```
Some more text
To fix this, ensure that all fenced code blocks have a blank line both before and after (except where the block is at the beginning or end of the document):
Some text
```
Code block
```
```
Another code block
```
Some more text
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse fenced code blocks that don't have blank lines before and after them.