Showing 112 of 177 total issues
Method addMenu
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addMenu($configs = array())
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
Function hookFieldsSave
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function hookFieldsSave($term_id)
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
- 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 tplFields
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function tplFields($contents)
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
Method prepareField
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function prepareField($content, $details = array())
{
//Build details
$post = isset($details['post']) ? $details['post'] : 0;
$prefix = isset($details['prefix']) ? $details['prefix'] : '';
Method hookAdminBar
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function hookAdminBar()
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
Method initialize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function initialize()
{
//Get capabilities
$capabilities = OlympusZeus::getConfigs('capabilities', 'backend');
Method addDocumentPost
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addDocumentPost($post)
{
global $blog_id;
//Create document
Method initialize
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function initialize()
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
Function initialize
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function initialize()
{
//Get capabilities
$capabilities = OlympusZeus::getConfigs('capabilities', 'backend');
- 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 hookSaveItem
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function hookSaveItem($post_id)
{
//Check post param
if (is_object($post_id)) {
//Got the WP post object with all datas
- 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 updateFooter
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function updateFooter($make = 'capabilities')
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
- 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 connection
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function connection()
{
//Check if we are in admin panel
if (!OLZ_ISADMIN) {
return;
Function _create
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
OlSocial.prototype._create = function (nwk, $button){
var _ol = this;
//check if network is already added
if (_ol.$el.find(_ol.options.items + '[data-nk="' + nwk + '"]').length) {
Method setPostTypes
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setPostTypes($pts)
{
//Define post types
$this->posttypes = $pts;
Method hookFieldsDisplay
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function hookFieldsDisplay($term)
{
//Definitions
$contents = array();
$ids = array();
Function hookFieldsPermalink
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function hookFieldsPermalink()
{
if (empty($this->posttypes)) {
return false;
}
- 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 tplFields
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function tplFields($contents)
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
- 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 searchContents
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function searchContents()
{
//Return array
$return = array(
'query' => array(
- 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 connection
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function connection()
{
//Check if we are in admin panel
if (!OLZ_ISADMIN) {
return;
- 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 makeHooks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function makeHooks()
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
- 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"