Issues (118)

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.

Messaging/Model/ThreadInterface.php (7 issues)

Severity

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 MilioooMessageBundle package.
5
 *
6
 * (c) Michiel boeckaert <[email protected]>
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
11
namespace Miliooo\Messaging\Model;
12
13
use Miliooo\Messaging\User\ParticipantInterface;
14
use Doctrine\Common\Collections\ArrayCollection;
15
16
/**
17
 * The interface class used by the thread model
18
 *
19
 * @author Michiel Boeckaert <[email protected]>
20
 */
21
interface ThreadInterface extends BuilderInterface
22
{
23
    /**
24
     * Gets the unique id of the thread.
25
     *
26
     * @return integer The unique id
27
     */
28
    public function getId();
29
30
    /**
31
     * Sets the subject of the thread.
32
     *
33
     * @param string $subject The subject of the thread
34
     */
35
    public function setSubject($subject);
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
36
37
    /**
38
     * Gets the subject of the thread.
39
     *
40
     * @return string The subject of the thread
41
     */
42
    public function getSubject();
43
44
    /**
45
     * Sets the participant who created the thread.
46
     *
47
     * @param ParticipantInterface $participant The participant who created the thread
48
     */
49
    public function setCreatedBy(ParticipantInterface $participant);
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
50
51
    /**
52
     * Gets the participant who created the thread.
53
     *
54
     * @return ParticipantInterface The participant who created the thread
55
     */
56
    public function getCreatedBy();
57
58
    /**
59
     * Sets the datetime when the thread was created
60
     *
61
     * @param \DateTime $createdAt The creation datetime of the thread
62
     */
63
    public function setCreatedAt(\DateTime $createdAt);
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
64
65
    /**
66
     * Gets the datetime when the thread was created.
67
     */
68
    public function getCreatedAt();
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
69
70
    /**
71
     * Adds a message to the thread
72
     *
73
     * @param MessageInterface $message
74
     */
75
    public function addMessage(MessageInterface $message);
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
76
77
    /**
78
     * Gets all the messages contained in the thread.
79
     *
80
     * @return ArrayCollection
81
     */
82
    public function getMessages();
83
84
    /**
85
     * Gets the first message of the thread.
86
     *
87
     * @return MessageInterface The first message of the thread
88
     */
89
    public function getFirstMessage();
90
91
    /**
92
     * Gets the last message of the thread.
93
     *
94
     * @return MessageInterface The last message of the thread
95
     */
96
    public function getLastMessage();
97
98
    /**
99
     * Sets the last message.
100
     *
101
     * We set the last message of a thread because we use it in the folders overview.
102
     * If we don't do this we will loop over the whole array collection.
103
     *
104
     * There is always the trade off between denormalizing or not, if you don't want this to be denormalized
105
     * you can use $this->messages->last();
106
     *
107
     * @param MessageInterface $message
108
     */
109
    public function setLastMessage(MessageInterface $message);
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
110
111
    /**
112
     * Adds thread meta to the thread meta collection
113
     *
114
     * @param ThreadMetaInterface $threadMeta
115
     */
116
    public function addThreadMeta(ThreadMetaInterface $threadMeta);
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
117
118
    /**
119
     * Returns an array collection with thread meta
120
     *
121
     * @return ArrayCollection An ArrayCollection of threadmeta
122
     */
123
    public function getThreadMeta();
124
125
    /**
126
     * Gets thread meta for the given participant
127
     *
128
     * @param ParticipantInterface $participant The participant
129
     *
130
     * @return ThreadMetaInterface
131
     */
132
    public function getThreadMetaForParticipant(ParticipantInterface $participant);
133
134
    /**
135
     * Gets all the participants for the current thread
136
     *
137
     * This loops over the threadmetas and collects all the participants.
138
     * There is no method to add an participant because we don't map this in the database
139
     *
140
     * If we want to add a participant we need to create the threadmeta
141
     * and add the participant there.
142
     *
143
     * @return ParticipantInterface[] An array with participants
144
     */
145
    public function getParticipants();
146
147
    /**
148
     * Checks if the given participant is a participant of the thread
149
     *
150
     * @param ParticipantInterface $participant The participant we check
151
     *
152
     * @return boolean true if participant, false otherwise
153
     */
154
    public function isParticipant(ParticipantInterface $participant);
155
156
    /**
157
     * Gets th participants besides the given participant
158
     *
159
     * @param ParticipantInterface $participant The participant to exclude
160
     *
161
     * @return ParticipantInterface[] Array of participants
162
     */
163
    public function getOtherParticipants(ParticipantInterface $participant);
164
}
165