Issues (108)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

Entity/Trial.php (2 issues)

Upgrade to new PHP Analysis Engine

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
9
namespace Newscoop\PaywallBundle\Entity;
10
11
use Doctrine\ORM\Mapping as ORM;
12
13
/**
14
 * Trials entity.
15
 *
16
 * @ORM\Entity()
17
 * @ORM\Table(name="plugin_paywall_trials")
18
 */
19
class Trial
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="Newscoop\Entity\User")
32
     * @ORM\JoinColumn(name="IdUser", referencedColumnName="Id")
33
     *
34
     * @var Newscoop\Entity\User
35
     */
36
    protected $user;
37
38
    /**
39
     * @ORM\Column(type="boolean", name="had_trial")
40
     *
41
     * @var bool
42
     */
43
    protected $hadTrial;
44
45
    /**
46
     * @ORM\Column(type="datetime", name="trial_finish")
47
     *
48
     * @var datetime
49
     */
50
    protected $finishTrial;
51
52
    /**
53
     * @ORM\ManyToOne(targetEntity="Newscoop\PaywallBundle\Entity\Subscription")
54
     * @ORM\JoinColumn(name="trial_for_subscription", referencedColumnName="id")
55
     *
56
     * @var Newscoop\PaywallBundle\Entity\Subscriptions
57
     */
58
    protected $subscription;
59
60
    /**
61
     * @ORM\Column(type="datetime", name="trial_created_at")
62
     *
63
     * @var string
64
     */
65
    protected $created_at;
66
67
    /**
68
     * @ORM\Column(type="boolean", name="is_active")
69
     *
70
     * @var bool
71
     */
72
    protected $is_active;
73
74
    public function __construct()
75
    {
76
        $this->setCreatedAt(new \DateTime());
77
        $this->setIsActive(true);
78
    }
79
80
    /**
81
     * Get id.
82
     *
83
     * @return int
84
     */
85
    public function getId()
86
    {
87
        return $this->id;
88
    }
89
90
    /**
91
     * Get user.
92
     *
93
     * @return Newscoop\Entity\User
94
     */
95
    public function getUser()
96
    {
97
        return $this->user;
98
    }
99
100
    /**
101
     * Set user.
102
     *
103
     * @param Newscoop\Entity\User $user
104
     *
105
     * @return Newscoop\Entity\User
106
     */
107
    public function setUser($user)
108
    {
109
        $this->user = $user;
110
111
        return $user;
112
    }
113
114
    /**
115
     * Get had trial.
116
     *
117
     * @return bool
118
     */
119
    public function getHadTrial()
120
    {
121
        return $this->hadTrial;
122
    }
123
124
    /**
125
     * Set had trial.
126
     *
127
     * @param bool $hadTrial
128
     *
129
     * @return bool
130
     */
131
    public function setHadTrial($hadTrial)
132
    {
133
        $this->hadTrial = $hadTrial;
134
135
        return $this;
136
    }
137
138
    /**
139
     * Get trial finish date.
140
     *
141
     * @return datetime
142
     */
143
    public function getFinishTrial()
144
    {
145
        return $this->finishTrial;
146
    }
147
148
    /**
149
     * Set finish Trial.
150
     *
151
     * @param datetime $finishTrial
152
     *
153
     * @return datetime
154
     */
155
    public function setFinishTrial($finishTrial)
156
    {
157
        $this->finishTrial = $finishTrial;
158
159
        return $this;
160
    }
161
162
    /**
163
     * Get status.
164
     *
165
     * @return bool
166
     */
167
    public function getIsActive()
168
    {
169
        return $this->is_active;
170
    }
171
172
    /**
173
     * Set status.
174
     *
175
     * @param bool $is_active
176
     *
177
     * @return bool
178
     */
179
    public function setIsActive($is_active)
180
    {
181
        $this->is_active = $is_active;
182
183
        return $this;
184
    }
185
186
    /**
187
     * Get create date.
188
     *
189
     * @return datetime
190
     */
191
    public function getCreatedAt()
192
    {
193
        return $this->created_at;
194
    }
195
196
    /**
197
     * Set create date.
198
     *
199
     * @param datetime $created_at
200
     *
201
     * @return datetime
202
     */
203
    public function setCreatedAt(\DateTime $created_at)
204
    {
205
        $this->created_at = $created_at;
0 ignored issues
show
Documentation Bug introduced by
It seems like $created_at of type object<DateTime> is incompatible with the declared type string of property $created_at.

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..

Loading history...
206
207
        return $this;
208
    }
209
210
    /**
211
     * Get subscription.
212
     *
213
     * @return Newscoop\PaywallBundle\Entity\Subscriptions
214
     */
215
    public function getSubscription()
216
    {
217
        return $this->subscription;
218
    }
219
220
    /**
221
     * Get subscription.
222
     *
223
     * @param Newscoop\PaywallBundle\Entity\Subscription $subscription
224
     *
225
     * @return Newscoop\PaywallBundle\Entity\Subscriptions
226
     */
227
    public function setSubscription($subscription)
228
    {
229
        $this->subscription = $subscription;
0 ignored issues
show
Documentation Bug introduced by
It seems like $subscription of type object<Newscoop\PaywallB...le\Entity\Subscription> is incompatible with the declared type object<Newscoop\PaywallB...e\Entity\Subscriptions> of property $subscription.

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..

Loading history...
230
231
        return $subscription;
232
    }
233
}
234