Showing 112 of 112 total issues
Blank line found at end of control structure Open
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
{
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
There must be one blank line after the namespace declaration Open
namespace noFlash\TorrentGhost\Aggregator;
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
The closing parenthesis of a multi-line function declaration must be on a new line Open
LoggerInterface $logger)
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
The closing parenthesis of a multi-line function declaration must be on a new line Open
LoggerInterface $logger)
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Remove error control operator '@' on line 186. Open
public function extractLink($string)
{
$matchResult = @preg_match($this->configuration->getLinkExtractPattern(), $string, $matches);
if ($matchResult === false) {
throw new RegexException(
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Remove error control operator '@' on line 138. Open
public function setLinkTransformPattern($linkTransformPattern)
{
if ($linkTransformPattern === null) {
$this->linkTransformPattern = null;
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Missing class import via use statement (line '146', column '27'). Open
throw new \RuntimeException("Failed to locate object for $sourceName aggregator! (THIS IS A BUG)");
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Remove error control operator '@' on line 98. Open
public function setLinkExtractPattern($linkExtractPattern)
{
if (@preg_match($linkExtractPattern, null) === false) {
throw new RegexException('Link extract pattern invalid', $linkExtractPattern);
}
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Missing class import via use statement (line '108', column '23'). Open
throw new \LogicException('You cannot build object without setting class name');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '105', column '23'). Open
throw new \InvalidArgumentException(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '120', column '23'). Open
throw new \RuntimeException(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Remove error control operator '@' on line 154. Open
public function setNameNotContainsPattern($nameNotContainsPattern)
{
if ($nameNotContainsPattern !== null && @preg_match($nameNotContainsPattern, null) === false) {
throw new RegexException('Name not contains pattern invalid', $nameNotContainsPattern);
}
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Missing class import via use statement (line '132', column '23'). Open
throw new \InvalidArgumentException('Non-integer value passed for raw file size limit.');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '40', column '27'). Open
throw new \RuntimeException("Unexpected value at offset $key - array length invalid");
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}