Passed
Push — devel-3.0 ( c503ba...513ab0 )
by Rubén
03:26
created

UserGroupHelp::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * sysPass
4
 *
5
 * @author    nuxsmin
6
 * @link      https://syspass.org
7
 * @copyright 2012-2018, Rubén Domínguez nuxsmin@$syspass.org
8
 *
9
 * This file is part of sysPass.
10
 *
11
 * sysPass is free software: you can redistribute it and/or modify
12
 * it under the terms of the GNU General Public License as published by
13
 * the Free Software Foundation, either version 3 of the License, or
14
 * (at your option) any later version.
15
 *
16
 * sysPass is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 *  along with sysPass.  If not, see <http://www.gnu.org/licenses/>.
23
 */
24
25
namespace SP\Modules\Api\Controllers\Help;
26
27
/**
28
 * Class UserGroupHelp
29
 *
30
 * @package SP\Modules\Api\Controllers\Help
31
 */
32
final class UserGroupHelp implements HelpInterface
33
{
34
    use HelpTrait;
35
36
    /**
37
     * @return array
38
     */
39
    public static function view()
40
    {
41
        return
42
            [
43
                self::getItem('id', __('Id de grupo'), true)
44
            ];
45
    }
46
47
    /**
48
     * @return array
49
     */
50
    public static function create()
51
    {
52
        return
53
            [
54
                self::getItem('name', __('Nombre del grupo'), true),
55
                self::getItem('description', __('Descripción del grupo')),
56
                self::getItem('usersId', __('Array con Ids de usuarios'))
57
            ];
58
    }
59
60
    /**
61
     * @return array
62
     */
63
    public static function edit()
64
    {
65
        return
66
            [
67
                self::getItem('id', __('Id de grupo'), true),
68
                self::getItem('name', __('Nombre del grupo'), true),
69
                self::getItem('description', __('Descripción del grupo')),
70
                self::getItem('usersId', __('Array con Ids de usuarios'))
71
            ];
72
    }
73
74
    /**
75
     * @return array
76
     */
77
    public static function search()
78
    {
79
        return
80
            [
81
                self::getItem('text', __('Texto a buscar')),
82
                self::getItem('count', __('Número de resultados a mostrar'))
83
            ];
84
    }
85
86
    /**
87
     * @return array
88
     */
89
    public static function delete()
90
    {
91
        return
92
            [
93
                self::getItem('id', __('Id de grupo'), true)
94
            ];
95
    }
96
}