1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Bluz Framework Component |
||
5 | * |
||
6 | * @copyright Bluz PHP Team |
||
7 | * @link https://github.com/bluzphp/framework |
||
8 | */ |
||
9 | |||
10 | declare(strict_types=1); |
||
11 | |||
12 | namespace Bluz\Proxy; |
||
13 | |||
14 | use Bluz\Messages\Messages as Instance; |
||
15 | |||
16 | /** |
||
17 | * Proxy to Messages |
||
18 | * |
||
19 | * Example of usage |
||
20 | * <code> |
||
21 | * use Bluz\Proxy\Messages; |
||
22 | * |
||
23 | * Messages::addSuccess('All Ok!'); |
||
24 | * </code> |
||
25 | * |
||
26 | * @package Bluz\Proxy |
||
27 | * @author Anton Shevchuk |
||
28 | * |
||
29 | * @method static Instance getInstance() |
||
30 | * |
||
31 | * @method static Messages addNotice($message, ...$text) |
||
32 | * @see Instance::addNotice() |
||
33 | * |
||
34 | * @method static Messages addSuccess($message, ...$text) |
||
35 | * @see Instance::addSuccess() |
||
36 | * |
||
37 | * @method static Messages addError($message, ...$text) |
||
38 | * @see Instance::addError() |
||
39 | * |
||
40 | * @method static integer count() |
||
41 | * @see Instance::count() |
||
42 | * |
||
43 | * @method static \stdClass pop($type = null) |
||
44 | * @see Instance::pop() |
||
45 | * |
||
46 | * @method static \ArrayObject popAll() |
||
47 | * @see Instance::popAll() |
||
48 | * |
||
49 | * @method static void reset() |
||
50 | * @see Instance::reset() |
||
51 | */ |
||
52 | final class Messages |
||
53 | { |
||
54 | use ProxyTrait; |
||
55 | |||
56 | /** |
||
57 | * Init instance |
||
58 | * |
||
59 | * @return Instance |
||
60 | */ |
||
61 | 587 | private static function initInstance(): Instance |
|
0 ignored issues
–
show
|
|||
62 | { |
||
63 | 587 | $instance = new Instance(); |
|
64 | 587 | $instance->setOptions(Config::get('messages')); |
|
65 | 587 | return $instance; |
|
66 | } |
||
67 | } |
||
68 |
This check looks for private methods that have been defined, but are not used inside the class.