Issues (10)

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.

src/Entity/Media.php (1 issue)

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
namespace AlexisLefebvre\Bundle\AsyncTweetsBundle\Entity;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
use Doctrine\Common\Collections\Collection;
7
8
/**
9
 * Media.
10
 */
11
class Media
12
{
13
    /**
14
     * @var int
15
     */
16
    private $id;
17
18
    /**
19
     * @var string
20
     */
21
    private $media_url_https;
22
23
    /**
24
     * @var string
25
     */
26
    private $url;
27
28
    /**
29
     * @var string
30
     */
31
    private $display_url;
32
33
    /**
34
     * @var string
35
     */
36
    private $expanded_url;
37
38
    /**
39
     * @var Collection<int, Tweet>
40
     */
41
    private $tweets;
42
43 15
    public function __construct(?int $id = null)
44
    {
45 15
        if (!is_null($id)) {
46 4
            $this->setId($id);
47
        }
48
49 15
        $this->tweets = new ArrayCollection();
50 15
    }
51
52
    /**
53
     * Set id.
54
     */
55 15
    public function setId(int $id): self
56
    {
57 15
        $this->id = $id;
58
59 15
        return $this;
60
    }
61
62
    /**
63
     * Get id.
64
     */
65 1
    public function getId(): int
66
    {
67 1
        return $this->id;
68
    }
69
70
    /**
71
     * Set media_url_https.
72
     */
73 15
    public function setMediaUrlHttps(string $mediaUrlHttps): self
74
    {
75 15
        $this->media_url_https = $mediaUrlHttps;
76
77 15
        return $this;
78
    }
79
80
    /**
81
     * Get media_url_https.
82
     */
83 6
    public function getMediaUrlHttps(): string
84
    {
85 6
        return $this->media_url_https;
86
    }
87
88
    /**
89
     * Set url.
90
     */
91 15
    public function setUrl(string $url): self
92
    {
93 15
        $this->url = $url;
94
95 15
        return $this;
96
    }
97
98
    /**
99
     * Get url.
100
     */
101 6
    public function getUrl(): string
102
    {
103 6
        return $this->url;
104
    }
105
106
    /**
107
     * Set display_url.
108
     */
109 15
    public function setDisplayUrl(string $displayUrl): self
110
    {
111 15
        $this->display_url = $displayUrl;
112
113 15
        return $this;
114
    }
115
116
    /**
117
     * Get display_url.
118
     */
119 6
    public function getDisplayUrl(): string
120
    {
121 6
        return $this->display_url;
122
    }
123
124
    /**
125
     * Set expanded_url.
126
     */
127 15
    public function setExpandedUrl(string $expandedUrl): self
128
    {
129 15
        $this->expanded_url = $expandedUrl;
130
131 15
        return $this;
132
    }
133
134
    /**
135
     * Get expanded_url.
136
     */
137 6
    public function getExpandedUrl(): ?string
138
    {
139 6
        return $this->expanded_url;
140
    }
141
142
    /**
143
     * Add a tweet.
144
     */
145 13
    public function addTweet(Tweet $tweet): self
146
    {
147 13
        $this->tweets->add($tweet);
148
149 13
        return $this;
150
    }
151
152
    /**
153
     * Remove a tweet.
154
     */
155 1
    public function removeTweet(Tweet $tweet): self
156
    {
157 1
        $this->tweets->removeElement($tweet);
158
159 1
        return $this;
160
    }
161
162
    /**
163
     * Get tweets.
164
     *
165
     * @return Collection<int, Tweet>
0 ignored issues
show
The doc-type Collection<int, could not be parsed: Expected "|" or "end of type", but got "<" at position 10. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
166
     */
167 2
    public function getTweets(): Collection
168
    {
169 2
        return $this->tweets;
170
    }
171
172
    /**
173
     * Call setter functions.
174
     */
175 3
    public function setValues(\stdClass $mediaTmp): self
176
    {
177
        $this
178 3
            ->setMediaUrlHttps($mediaTmp->media_url_https)
179 3
            ->setUrl($mediaTmp->url)
180 3
            ->setDisplayUrl($mediaTmp->display_url)
181 3
            ->setExpandedUrl($mediaTmp->expanded_url);
182
183 3
        return $this;
184
    }
185
}
186