Completed
Push — master ( 232324...f3371f )
by Artem
12s
created

UserC::setCoverName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/*
3
 * This file is part of the FreshVichUploaderSerializationBundle
4
 *
5
 * (c) Artem Henvald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Fresh\VichUploaderSerializationBundle\Tests\Fixtures;
12
13
use Doctrine\ORM\Mapping as ORM;
14
use Fresh\VichUploaderSerializationBundle\Annotation as Fresh;
15
use JMS\Serializer\Annotation as JMS;
16
use Symfony\Component\HttpFoundation\File\File;
17
use Vich\UploaderBundle\Mapping\Annotation as Vich;
18
19
/**
20
 * UserC Entity.
21
 *
22
 * @ORM\Table(name="users")
23
 * @ORM\Entity()
24
 *
25
 * @JMS\ExclusionPolicy("all")
26
 *
27
 * @Vich\Uploadable
28
 *
29
 * @Fresh\VichSerializableClass
30
 */
31
class UserC
32
{
33
    /**
34
     * @var string
35
     *
36
     * @ORM\Column(type="string", length=255)
37
     *
38
     * @JMS\Exclude
39
     */
40
    private $photoName;
41
42
    /**
43
     * @var File
44
     *
45
     * @JMS\Expose
46
     * @JMS\SerializedName("photo")
47
     *
48
     * @Fresh\VichSerializableField("photoFile")
49
     *
50
     * @Vich\UploadableField(mapping="user_photo_mapping", fileNameProperty="photoName")
51
     */
52
    private $photoFile;
53
54
    /**
55
     * @var string
56
     *
57
     * @ORM\Column(type="string", length=255)
58
     *
59
     * @JMS\Exclude
60
     */
61
    private $coverName;
62
63
    /**
64
     * @var File
65
     *
66
     * @JMS\Expose
67
     * @JMS\SerializedName("cover")
68
     *
69
     * @Fresh\VichSerializableField("coverFile", includeHost=false)
70
     *
71
     * @Vich\UploadableField(mapping="user_cover_mapping", fileNameProperty="coverName")
72
     */
73
    private $coverFile;
74
75
    /**
76
     * @return string
77
     */
78
    public function __toString()
79
    {
80
        return 'New User';
81
    }
82
83
    /**
84
     * @return string
85
     */
86
    public function getPhotoName()
87
    {
88
        return $this->photoName;
89
    }
90
91
    /**
92
     * @param string $photoName
93
     *
94
     * @return $this
95
     */
96
    public function setPhotoName($photoName)
97
    {
98
        $this->photoName = $photoName;
99
100
        return $this;
101
    }
102
103
    /**
104
     * @return File
105
     */
106
    public function getPhotoFile()
107
    {
108
        return $this->photoFile;
109
    }
110
111
    /**
112
     * @param File $photoFile
113
     *
114
     * @return $this
115
     */
116
    public function setPhotoFile(File $photoFile)
117
    {
118
        $this->photoFile = $photoFile;
119
120
        return $this;
121
    }
122
123
    /**
124
     * @return string
125
     */
126
    public function getCoverName()
127
    {
128
        return $this->coverName;
129
    }
130
131
    /**
132
     * @param string $coverName
133
     *
134
     * @return $this
135
     */
136
    public function setCoverName($coverName)
137
    {
138
        $this->coverName = $coverName;
139
140
        return $this;
141
    }
142
143
    /**
144
     * @return File
145
     */
146
    public function getCoverFile()
147
    {
148
        return $this->coverFile;
149
    }
150
151
    /**
152
     * @param File $coverFile
153
     *
154
     * @return $this
155
     */
156
    public function setCoverFile(File $coverFile)
157
    {
158
        $this->coverFile = $coverFile;
159
160
        return $this;
161
    }
162
}
163