canMessageRecipient()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
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\Manager;
12
13
use Miliooo\Messaging\User\ParticipantInterface;
14
15
/**
16
 * The can message recipient manager is responsible for deciding whether the current user can message the recipient.
17
 *
18
 * @author Michiel Boeckaert <[email protected]>
19
 */
20
interface CanMessageRecipientManagerInterface
21
{
22
    /**
23
     * Decides whether the logged in user can send a message to the recipient.
24
     *
25
     * @param ParticipantInterface $loggedInUser The logged in user
26
     * @param ParticipantInterface $recipient    The recipient we check
27
     *
28
     * @return boolean true if the loggedInUser can send a message to the recipient, false otherwise.
29
     */
30
    public function canMessageRecipient(ParticipantInterface $loggedInUser, ParticipantInterface $recipient);
0 ignored issues
show
Coding Style introduced by
function canMessageRecipient() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
31
32
    public function getErrorMessage();
0 ignored issues
show
Documentation introduced by
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...
33
}
34