Completed
Push — sf/improvement-coverage ( b3937e...01a837 )
by Kiyotaka
51:20 queued 45:08
created

ExportCsvRow   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 59
rs 10
c 0
b 0
f 0
ccs 12
cts 12
cp 1
wmc 5
lcom 1
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setData() 0 6 1
A isDataNull() 0 8 2
A pushData() 0 5 1
A getRow() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Eccube\Entity;
15
16 5
if (!class_exists('\Eccube\Entity\ExportCsvRow')) {
17
    class ExportCsvRow extends \Eccube\Entity\AbstractEntity
18
    {
19
        /**
20
         * @var \Doctrine\Common\Collections\Collection
21
         */
22
        private $row = [];
23
24
        /**
25
         * @var string
26
         */
27
        private $data = null;
28
29
        /**
30
         * Set data
31
         *
32
         * @param string $data
33
         *
34
         * @return \Eccube\Entity\ExportCsvRow
35
         */
36 3
        public function setData($data = null)
37
        {
38 3
            $this->data = $data;
39
40 3
            return $this;
41
        }
42
43
        /**
44
         * Is data null
45
         *
46
         * @return boolean
47
         */
48 1
        public function isDataNull()
49
        {
50 1
            if (is_null($this->data)) {
51 1
                return true;
52
            } else {
53 1
                return false;
54
            }
55
        }
56
57
        /**
58
         * Push data
59
         */
60 3
        public function pushData()
61
        {
62 3
            $this->row[] = $this->data;
63 3
            $this->data = null;
64
        }
65
66
        /**
67
         * Get row
68
         *
69
         * @return \Doctrine\Common\Collections\Collection
70
         */
71 3
        public function getRow()
72
        {
73 3
            return $this->row;
74
        }
75
    }
76
}
77