CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

Function uid has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function uid()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('uid');
        } else if (func_num_args() > 1) {

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 hoursWorked has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function hoursWorked()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('hoursWorked');
        } else if (func_num_args() > 1) {

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 cardNo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function cardNo()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('cardNo');
        } else if (func_num_args() > 1) {

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 volunteerHoursAccountMapID has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function volunteerHoursAccountMapID()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('volunteerHoursAccountMapID');
        } else if (func_num_args() > 1) {

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 getOnline has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function getOnline($dbc)
    {
        $yesterday = date('Y-m-d', strtotime('30 days ago'));
        $dlog = DTransactionsModel::selectDlog($yesterday);
        $prep = $dbc->prepare("
Severity: Minor
Found in fannie/modules/plugins2.0/RecurringEquity/EqPlanTask.php - About 25 mins to fix

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 preprocess has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function preprocess(){
        global $FANNIE_PLUGIN_LIST, $FANNIE_PLUGIN_SETTINGS;

        if (!isset($FANNIE_PLUGIN_LIST) || !in_array('CoopCred', $FANNIE_PLUGIN_LIST)) {
            $this->errors .= _("Error: The Coop Cred Plugin is not enabled.");
Severity: Minor
Found in fannie/modules/plugins2.0/CoopCred/membership/CoopCredMemberPage.php - About 25 mins to fix

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 post_id_handler has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function post_id_handler()
    {
        $items = $this->session->otItems;
        $itemP = $this->connection->prepare("SELECT description, cost, tax, foodstamp, discount, department FROM products WHERE upc=?");
        for ($i=0; $i<count($this->id); $i++) {
Severity: Minor
Found in fannie/modules/plugins2.0/OrderTablet/OrderTabletPage.php - About 25 mins to fix

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 drawPDF has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function drawPDF()
    {
        $pdf = $this->createPDF();

        $data = $this->loadItems();
Severity: Minor
Found in fannie/modules/plugins2.0/CoopDealsSigns/CoopDeals12UpDarkL.php - About 25 mins to fix

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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function run()
    {
        $dbc = FannieDB::get('is4c_op');

        $weekP = $dbc->prepare("
Severity: Minor
Found in fannie/modules/plugins2.0/WfcVirtualCoupon/WfcUnfiTask.php - About 25 mins to fix

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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function run()
    {
        $dbc = FannieDB::get($this->config->get('OP_DB'));
        $trans = $this->config->get('TRANS_DB') . $dbc->sep();

Severity: Minor
Found in fannie/modules/plugins2.0/WfcVirtualCoupon/WfcAccessFanout.php - About 25 mins to fix

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 get_id_view has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function get_id_view()
    {
        try {
            $row = $this->getIncident($this->id);
        } catch (Exception $ex) {
Severity: Minor
Found in fannie/modules/plugins2.0/IncidentTracker/AlertIncident.php - About 25 mins to fix

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 updateCatalog has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function updateCatalog($vendor, $sku, $item, $brand, $size, $units, $price, $doUpdates)
    {
        if (!$this->vfindP) {
            $this->vfindP = $this->connection->prepare("SELECT upc FROM vendorItems WHERE vendorID=? AND sku=?");
        }
Severity: Minor
Found in fannie/modules/plugins2.0/USFoodsInvoiceGrabber/USFTask.php - About 25 mins to fix

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 post_id_handler has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function post_id_handler()
    {
        $ret = array();
        $settings = $this->config->get('PLUGIN_SETTINGS');
        $upc = BarcodeLib::padUPC($this->id);
Severity: Minor
Found in fannie/modules/plugins2.0/ShelfAudit/SaHandheldPage.php - About 25 mins to fix

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 qtyForm has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function qtyForm($data)
    {
        $used = array(1=>true);
        $cases = '';
        foreach($data['case_sizes'] as $s){
Severity: Minor
Found in fannie/modules/plugins2.0/ShelfAudit/SaHandheldPage.php - About 25 mins to fix

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 post_handler has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function post_handler()
    {
        $uid = FannieAuth::getUID($this->current_user);
        $settings = $this->config->get('PLUGIN_SETTINGS');
        $this->connection->selectDB($settings['IncidentDB']);
Severity: Minor
Found in fannie/modules/plugins2.0/IncidentTracker/PosIncident.php - About 25 mins to fix

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 post_new_handler has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function post_new_handler()
    {
        $model = new OrderGuidesModel($this->connection);
        $model->vendorID(FormLib::get('vendor'));
        $model->storeID(FormLib::get('store'));
Severity: Minor
Found in fannie/purchasing/OrderGuidePage.php - About 25 mins to fix

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 receiveUnOrderedItem has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function receiveUnOrderedItem($dbc)
    {
        echo '<div class="alert alert-danger">SKU not found in order</div>';
        echo '<table class="table table-bordered">';
        echo '<tr><th>SKU</th><th>UPC</th><th>Brand</th><th>Description</th>
Severity: Minor
Found in fannie/purchasing/ViewPurchaseOrders.php - About 25 mins to fix

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 post_handler has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    protected function post_handler()
    {
        $dbc = $this->connection;
        $dbc->selectDB($this->config->get(('OP_DB')));
        $upcs = FormLib::get('upc', array()); 
Severity: Minor
Found in fannie/purchasing/TransferPurchaseOrder.php - About 25 mins to fix

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 export_order has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function export_order($id)
    {
        $dbc = FannieDB::get(FannieConfig::config('OP_DB'));

        $infoP = $dbc->prepare('
Severity: Minor
Found in fannie/purchasing/exporters/ReceivingTagsExport.php - About 25 mins to fix

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 process_file has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function process_file($linedata, $indexes)
    {
        $vendorID = 302;
        $baseLine = $linedata[1];
        $invoice = $baseLine[0];
Severity: Minor
Found in fannie/purchasing/importers/FairhavenInvoiceImport.php - About 25 mins to fix

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

Severity
Category
Status
Source
Language