This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * @author Rafał Muszyński <[email protected]> |
||
| 5 | * @copyright 2013 Sourcefabric o.p.s. |
||
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.txt |
||
| 7 | */ |
||
| 8 | namespace Newscoop\PaywallBundle\Entity; |
||
| 9 | |||
| 10 | use Doctrine\ORM\Mapping as ORM; |
||
| 11 | use Doctrine\Common\Collections\ArrayCollection; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Subscription Specification entity. |
||
| 15 | * |
||
| 16 | * @ORM\Entity(repositoryClass="Newscoop\PaywallBundle\Entity\Repository\SubscriptionSpecificationRepository") |
||
| 17 | * @ORM\Table(name="plugin_paywall_subscription_specification") |
||
| 18 | */ |
||
| 19 | class SubscriptionSpecification |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @ORM\Id() |
||
| 23 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 24 | * @ORM\Column(type="integer", name="id") |
||
| 25 | * |
||
| 26 | * @var int |
||
| 27 | */ |
||
| 28 | protected $id; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @ORM\ManyToOne(targetEntity="Subscription", inversedBy="specification") |
||
| 32 | * @ORM\JoinColumn(name="subscription_id", referencedColumnName="id") |
||
| 33 | * |
||
| 34 | * @var \Newscoop\PaywallBundle\Entity\Subscription |
||
| 35 | */ |
||
| 36 | protected $subscription; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @ORM\Column(type="integer", name="publication") |
||
| 40 | * |
||
| 41 | * @var int |
||
| 42 | */ |
||
| 43 | protected $publication; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @ORM\Column(type="integer", name="issue", nullable=true) |
||
| 47 | * |
||
| 48 | * @var int |
||
| 49 | */ |
||
| 50 | protected $issue; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @ORM\Column(type="integer", name="section", nullable=true) |
||
| 54 | * |
||
| 55 | * @var int |
||
| 56 | */ |
||
| 57 | protected $section; |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @ORM\Column(type="integer", name="article", nullable=true) |
||
| 61 | * |
||
| 62 | * @var int |
||
| 63 | */ |
||
| 64 | protected $article; |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @ORM\Column(type="datetime", name="created_at") |
||
| 68 | * |
||
| 69 | * @var string |
||
| 70 | */ |
||
| 71 | protected $created_at; |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @ORM\Column(type="boolean", name="is_active") |
||
| 75 | * |
||
| 76 | * @var bool |
||
| 77 | */ |
||
| 78 | protected $is_active; |
||
| 79 | |||
| 80 | public function __construct() |
||
| 81 | { |
||
| 82 | $this->setCreatedAt(new \DateTime()); |
||
| 83 | $this->setIsActive(true); |
||
| 84 | $this->subscription = new ArrayCollection(); |
||
| 85 | } |
||
| 86 | |||
| 87 | /** |
||
| 88 | * Get specification id. |
||
| 89 | * |
||
| 90 | * @return int |
||
| 91 | */ |
||
| 92 | public function getId() |
||
| 93 | { |
||
| 94 | return $this->id; |
||
| 95 | } |
||
| 96 | |||
| 97 | /** |
||
| 98 | * Get subscription. |
||
| 99 | * |
||
| 100 | * @return Newscoop\PaywallBundle\Entity\Subscriptions |
||
| 101 | */ |
||
| 102 | public function getSubscription() |
||
| 103 | { |
||
| 104 | return $this->subscription; |
||
| 105 | } |
||
| 106 | |||
| 107 | /** |
||
| 108 | * Get subscription. |
||
| 109 | * |
||
| 110 | * @param Subscription $subscription |
||
| 111 | * |
||
| 112 | * @return Subscription |
||
| 113 | */ |
||
| 114 | public function setSubscription(Subscription $subscription) |
||
| 115 | { |
||
| 116 | $this->subscription = $subscription; |
||
| 117 | |||
| 118 | return $subscription; |
||
| 119 | } |
||
| 120 | |||
| 121 | /** |
||
| 122 | * Get publication id. |
||
| 123 | * |
||
| 124 | * @return int |
||
| 125 | */ |
||
| 126 | public function getPublication() |
||
| 127 | { |
||
| 128 | return $this->publication; |
||
| 129 | } |
||
| 130 | |||
| 131 | /** |
||
| 132 | * Set publication id. |
||
| 133 | * |
||
| 134 | * @param int $publication |
||
| 135 | * |
||
| 136 | * @return int |
||
| 137 | */ |
||
| 138 | public function setPublication($publication) |
||
| 139 | { |
||
| 140 | $this->publication = $publication; |
||
| 141 | |||
| 142 | return $this; |
||
| 143 | } |
||
| 144 | |||
| 145 | /** |
||
| 146 | * Get issue id. |
||
| 147 | * |
||
| 148 | * @return int |
||
| 149 | */ |
||
| 150 | public function getIssue() |
||
| 151 | { |
||
| 152 | return $this->issue; |
||
| 153 | } |
||
| 154 | |||
| 155 | /** |
||
| 156 | * Set issue id. |
||
| 157 | * |
||
| 158 | * @param int $issue |
||
| 159 | * |
||
| 160 | * @return int |
||
| 161 | */ |
||
| 162 | public function setIssue($issue) |
||
| 163 | { |
||
| 164 | $this->issue = $issue; |
||
| 165 | |||
| 166 | return $this; |
||
| 167 | } |
||
| 168 | |||
| 169 | /** |
||
| 170 | * Get section id. |
||
| 171 | * |
||
| 172 | * @return int |
||
| 173 | */ |
||
| 174 | public function getSection() |
||
| 175 | { |
||
| 176 | return $this->section; |
||
| 177 | } |
||
| 178 | |||
| 179 | /** |
||
| 180 | * Set section id. |
||
| 181 | * |
||
| 182 | * @param int $section |
||
| 183 | * |
||
| 184 | * @return int |
||
| 185 | */ |
||
| 186 | public function setSection($section) |
||
| 187 | { |
||
| 188 | $this->section = $section; |
||
| 189 | |||
| 190 | return $this; |
||
| 191 | } |
||
| 192 | |||
| 193 | /** |
||
| 194 | * Get article id. |
||
| 195 | * |
||
| 196 | * @return int |
||
| 197 | */ |
||
| 198 | public function getArticle() |
||
| 199 | { |
||
| 200 | return $this->article; |
||
| 201 | } |
||
| 202 | |||
| 203 | /** |
||
| 204 | * Set article id. |
||
| 205 | * |
||
| 206 | * @param int $article |
||
| 207 | * |
||
| 208 | * @return int |
||
| 209 | */ |
||
| 210 | public function setArticle($article) |
||
| 211 | { |
||
| 212 | $this->article = $article; |
||
| 213 | |||
| 214 | return $this; |
||
| 215 | } |
||
| 216 | |||
| 217 | /** |
||
| 218 | * Get specification status. |
||
| 219 | * |
||
| 220 | * @return bool |
||
| 221 | */ |
||
| 222 | public function getIsActive() |
||
| 223 | { |
||
| 224 | return $this->is_active; |
||
| 225 | } |
||
| 226 | |||
| 227 | /** |
||
| 228 | * Set specification status. |
||
| 229 | * |
||
| 230 | * @param bool $is_active |
||
| 231 | * |
||
| 232 | * @return bool |
||
| 233 | */ |
||
| 234 | public function setIsActive($is_active) |
||
| 235 | { |
||
| 236 | $this->is_active = $is_active; |
||
| 237 | |||
| 238 | return $this; |
||
| 239 | } |
||
| 240 | |||
| 241 | /** |
||
| 242 | * Get specification create date. |
||
| 243 | * |
||
| 244 | * @return datetime |
||
| 245 | */ |
||
| 246 | public function getCreatedAt() |
||
| 247 | { |
||
| 248 | return $this->created_at; |
||
| 249 | } |
||
| 250 | |||
| 251 | /** |
||
| 252 | * Set specification create date. |
||
| 253 | * |
||
| 254 | * @param datetime $created_at |
||
| 255 | * |
||
| 256 | * @return datetime |
||
| 257 | */ |
||
| 258 | public function setCreatedAt(\DateTime $created_at) |
||
| 259 | { |
||
| 260 | $this->created_at = $created_at; |
||
|
0 ignored issues
–
show
|
|||
| 261 | |||
| 262 | return $this; |
||
| 263 | } |
||
| 264 | } |
||
| 265 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..