CreateCardResponse::isSuccessful()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 4
nc 3
nop 0
crap 12
1
<?php
2
3
namespace Omnipay\PaypalRest\Message;
4
5
/**
6
 * @author    Ivan Kerin <[email protected]>
7
 * @copyright 2014, Clippings Ltd.
8
 * @license   http://spdx.org/licenses/BSD-3-Clause
9
 */
10
class CreateCardResponse extends AbstractResponse
11
{
12
    /**
13
     * Return true if state is "ok"
14
     *
15
     * @return boolean
16
     */
17
    public function isSuccessful()
18
    {
19
        return (parent::isSuccessful()
20
            and isset($this->data['state'])
21
            and $this->data['state'] === 'ok');
22
    }
23
}
24