EcommerceResponse::ReturnCartData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
nc 1
nop 3
1
<?php
2
3
/**
4
 * @description: This class is a base class for Ecommerce Responses such as Cart Response
5
 *
6
 * @authors: Nicolaas [at] Sunny Side Up .co.nz
7
 * @package: ecommerce
8
 * @sub-package: control
9
 * @inspiration: Silverstripe Ltd, Jeremy
10
 **/
11
abstract class EcommerceResponse extends SS_HTTPResponse
12
{
13
    /**
14
     * @param string       $status  the status to return
15
     * @param string       $message the message to return with the retur
0 ignored issues
show
Documentation introduced by
There is no parameter named $message. Did you maybe mean $messages?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
16
     * @param null | Array $data,   that should be included
17
     */
18
    public function ReturnCartData(array $messages = array(), array $additionalData = null, $status = 'success')
19
    {
20
        user_error('Make sure to extend the EcommerceResponse::ReturnCartData class for your own purposes.', E_USER_NOTICE);
21
    }
22
}
23