DeleteThreadManagerSecureInterface
last analyzed

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
deleteThread() 0 1 ?
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\Model\ThreadInterface;
14
use Miliooo\Messaging\User\ParticipantInterface;
15
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
16
17
/**
18
 * Interface for secure delete thread managers.
19
 *
20
 * @author Michiel Boeckaert <[email protected]>
21
 */
22
interface DeleteThreadManagerSecureInterface
23
{
24
    /**
25
     * Deletes a thread if the given participant has enough rights to do so. Else throws an exception.
26
     *
27
     * @param ParticipantInterface $participant The participant who wants to delete a thread
28
     * @param ThreadInterface      $thread      The given thread
29
     *
30
     * @throws AccessDeniedException if not enough rights to delete the thread.
31
     */
32
    public function deleteThread(ParticipantInterface $participant, ThreadInterface $thread);
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