Showing 104 of 597 total issues
Method checkForDeliveryReceipt
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function checkForDeliveryReceipt(ThreemaGateway_Handler_Action_Callback $handler,
Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult,
Threema\MsgApi\Messages\ThreemaMessage $threemaMsg,
&$output,
&$saveMessage,
Function _getExistingData
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function _getExistingData($data)
{
// try primary key first
/** @var string $requestId */
if ($requestId = $this->_getExistingPrimaryKey($data, 'request_id')) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function validatePreConditions
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function validatePreConditions(&$errorString)
{
/** @var XenForo_Options $options */
$options = XenForo_Application::getOptions();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method checkForReceiverCode
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function checkForReceiverCode(ThreemaGateway_Handler_Action_Callback $handler,
Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult,
Threema\MsgApi\Messages\ThreemaMessage $threemaMsg,
&$output,
&$saveMessage,
Method renderVerification
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function renderVerification(XenForo_View $view, $context, array $user,
array $providerData, array $triggerData)
Method renderVerification
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function renderVerification(XenForo_View $view, $context, array $user,
array $providerData, array $triggerData)
Method renderVerification
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function renderVerification(XenForo_View $view, $context, array $user,
array $providerData, array $triggerData)
Method renderVerification
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function renderVerification(XenForo_View $view, $context, array $user,
array $providerData, array $triggerData)
Function checkForDeliveryReceipt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function checkForDeliveryReceipt(ThreemaGateway_Handler_Action_Callback $handler,
Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult,
Threema\MsgApi\Messages\ThreemaMessage $threemaMsg,
&$output,
&$saveMessage,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function renderHtml
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function renderHtml(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
{
/** @var array $status */
$status = ['libsodium', 'libsodiumphp', 'phpsdk', 'credits'];
/** @var array $extraError */
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function addLog
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function addLog(&$log, $stringToAdd, $stringToAddDetail = null)
{
// convert to array if necessary or just add string
if (is_string($log)) {
if ($stringToAddDetail) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function saveMessage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function saveMessage(
Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult,
Threema\MsgApi\Messages\ThreemaMessage $threemaMsg
) {
$dataWriter = XenForo_DataWriter::create('ThreemaGateway_DataWriter_Messages');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function checkForReceiverCode
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function checkForReceiverCode(ThreemaGateway_Handler_Action_Callback $handler,
Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult,
Threema\MsgApi\Messages\ThreemaMessage $threemaMsg,
&$output,
&$saveMessage,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function setDataForRequest
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function setDataForRequest(
array $confirmRequest,
array $setData,
array $processOptions = []
) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function setUserId
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function setUserId($newUser = null)
{
// get user ids (or null)
if ($this->user === null) {
/** @var int|null $oldUserId User id of user (from class) */
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function applyFilter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function applyFilter($filterType, $filterData, $failOnError = true)
{
/** @var $success bool */
$success = true;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function processMessage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function processMessage($downloadPath, $debugMode = false)
{
/** @var string $output */
$output = '';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return true;