FlashMessageProviderInterface::addFlash()
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\Helpers\FlashMessages;
12
13
/**
14
 * The flash message provider is responsible for providing translated flash keys to the user.
15
 *
16
 * @author Michiel Boeckaert <[email protected]>
17
 */
18
interface FlashMessageProviderInterface
19
{
20
    const TYPE_SUCCESS = 'success';
21
    const TYPE_ERROR = 'error';
22
23
    /**
24
     * Adds a flash message we will display to the user.
25
     *
26
     * @param string $type           One of the class constants type
27
     * @param string $translationKey A translation string
28
     * @param array  $parameters     Optional parameters for the translation of the string.
29
     */
30
    public function addFlash($type, $translationKey, $parameters = []);
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...
31
}
32