Showing 838 of 1,520 total issues
Avoid too many return
statements within this method. Open
return $this->_directory->getFileObject($filename, $shareHandler);
Avoid too many return
statements within this method. Open
return $optimizedQuery;
Avoid too many return
statements within this method. Open
return $optimizedQuery;
Avoid too many return
statements within this method. Open
return $optimizedQuery;
Avoid too many return
statements within this method. Open
return $termInfo;
Avoid too many return
statements within this method. Open
return self::IN_ASCII_DIGIT;
Avoid too many return
statements within this method. Open
return new Zend_Search_Lucene_Search_Query_Insignificant();
Avoid too many return
statements within this method. Open
return self::IN_QUOTE;
Avoid too many return
statements within this method. Open
return $optimizedQuery;
Avoid too many return
statements within this method. Open
return $optimizedQuery;
Avoid too many return
statements within this method. Open
return $rewrittenQuery;
Avoid too many return
statements within this method. Open
return new Zend_Search_Lucene_Search_Query_Insignificant();
Avoid too many return
statements within this method. Open
return $rewrittenQuery;
Avoid too many return
statements within this method. Open
return $query;
Avoid too many return
statements within this method. Open
return $query;
Avoid too many return
statements within this method. Open
return $query;
Function actionApprove
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function actionApprove()
{
if (!Yii::app()->getRequest()->getIsAjaxRequest() || !Yii::app()->getRequest()->getIsPostRequest()) {
throw new CHttpException(404);
}
- 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 actionInline
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function actionInline()
{
if (!Yii::app()->getRequest()->getIsAjaxRequest() || !Yii::app()->getRequest()->getIsPostRequest()) {
throw new CHttpException(404);
}
- 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 renderSettings
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function renderSettings($paymentSettings = [], $return = false)
{
$params = $this->getParameters();
$settings = '';
foreach ((array)$params['settings'] as $param) {
- 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 createPublicPost
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function createPublicPost(array $post)
{
if (empty($post['blog_id']) || empty($post['user_id'])) {
$this->addError('blog_id', Yii::t('BlogModule.blog', "Blog is empty!"));
- 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"