Issues (182)

Security Analysis    no request data  

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.

src/Entity/Company.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
 * This file is part of the Investform module for webcms2.
5
 * Copyright (c) @see LICENSE
6
 */
7
8
namespace WebCMS\InvestformModule\Entity;
9
10
use Doctrine\ORM\Mapping as ORM;
11
use Gedmo\Mapping\Annotation as gedmo;
12
13
/**
14
 * @ORM\Entity()
15
 * @ORM\Table(name="investform_Company")
16
 */
17
class Company extends \WebCMS\Entity\Entity
18
{
19
20
    /**
21
     * @ORM\Column(type="string", length=255)
22
     */
23
    private $name;
24
25
    /**
26
     * @ORM\Column(type="string", length=255)
27
     */
28
    private $street;
29
30
    /**
31
     * @ORM\Column(type="string", length=255)
32
     */
33
    private $zipCity;
34
35
    /**
36
     * @ORM\Column(type="string", length=255)
37
     */
38
    private $ico;
39
40
    /**
41
     * @ORM\Column(type="string", length=255)
42
     */
43
    private $dic;
44
45
	/**
46
	 * @ORM\Column(type="string", length=255)
47
	 */
48
	private $email;
49
50
    /**
51
     * @ORM\Column(type="string", length=255)
52
     */
53
    private $phone;
54
55
    /**
56
     * @ORM\Column(type="boolean")
57
     */
58
    private $active;
59
60
    /**
61
     * @var datetime $created
62
     * 
63
     * @gedmo\Timestampable(on="create")
64
     * @ORM\Column(type="datetime")
65
     */
66
    private $created;
67
68
    /**
69
     * @ORM\OneToMany(targetEntity="Businessman", mappedBy="company") 
70
     */
71
    private $businessmen;
72
73
74
    public function getName()
75
    {
76
        return $this->name;
77
    }
78
    
79
    public function setName($name)
80
    {
81
        $this->name = $name;
82
        return $this;
83
    }
84
85
    public function getLastname()
86
    {
87
        return $this->lastname;
0 ignored issues
show
The property lastname does not exist on object<WebCMS\InvestformModule\Entity\Company>. Since you implemented __get, maybe consider adding a @property annotation.

Since your code implements the magic getter _get, this function will be called for any read access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

If the property has read access only, you can use the @property-read annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
88
    }
89
    
90
    public function setLastname($lastname)
91
    {
92
        $this->lastname = $lastname;
0 ignored issues
show
The property lastname does not exist on object<WebCMS\InvestformModule\Entity\Company>. Since you implemented __set, maybe consider adding a @property annotation.

Since your code implements the magic setter _set, this function will be called for any write access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

Since the property has write access only, you can use the @property-write annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
93
        return $this;
94
    }
95
96
    public function getStreet()
97
    {
98
        return $this->street;
99
    }
100
    
101
    public function setStreet($street)
102
    {
103
        $this->street = $street;
104
        return $this;
105
    }
106
107
    public function getZipCity()
108
    {
109
        return $this->zipCity;
110
    }
111
    
112
    public function setZipCity($zipCity)
113
    {
114
        $this->zipCity = $zipCity;
115
        return $this;
116
    }
117
118
    public function getIco()
119
    {
120
        return $this->ico;
121
    }
122
    
123
    public function setIco($ico)
124
    {
125
        $this->ico = $ico;
126
        return $this;
127
    }
128
129
    public function getDic()
130
    {
131
        return $this->dic;
132
    }
133
    
134
    public function setDic($dic)
135
    {
136
        $this->dic = $dic;
137
        return $this;
138
    }
139
140
    public function getEmail()
141
    {
142
        return $this->email;
143
    }
144
    
145
    public function setEmail($email)
146
    {
147
        $this->email = $email;
148
        return $this;
149
    }
150
151
    public function getPhone()
152
    {
153
        return $this->phone;
154
    }
155
    
156
    public function setPhone($phone)
157
    {
158
        $this->phone = $phone;
159
        return $this;
160
    }
161
162
    public function getActive()
163
    {
164
        return $this->active;
165
    }
166
    
167
    public function setActive($active)
168
    {
169
        $this->active = $active;
170
        return $this;
171
    }
172
173
    public function getCreated()
174
    {
175
        return $this->created;
176
    }
177
    
178
    public function setCreated($created)
179
    {
180
        $this->created = $created;
181
        return $this;
182
    }
183
184
    /**
185
     * Gets the value of businessmen.
186
     *
187
     * @return mixed
188
     */
189
    public function getBusinessmen()
190
    {
191
        return $this->businessmen;
192
    }
193
194
    /**
195
     * Sets the value of businessmen.
196
     *
197
     * @param mixed $businessmen the businessmen
198
     *
199
     * @return self
200
     */
201
    public function setBusinessmen($businessmen)
202
    {
203
        $this->businessmen = $businessmen;
204
        return $this;
205
    }
206
207
}
208