Passed
Push — main ( c04f85...7bc5d9 )
by Dimitri
03:09
created

ResourcePresenter::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * This file is part of Blitz PHP framework.
5
 *
6
 * (c) 2022 Dimitri Sitchet Tomkeu <[email protected]>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 */
11
12
namespace BlitzPHP\Controllers;
13
14
/**
15
 * Un contrôleur extensible pour aider à fournir une interface utilisateur pour une ressource.
16
 */
17
class ResourcePresenter extends ApplicationController
18
{
19
    /**
20
     * Présenter une vue des objets de ressource
21
     *
22
     * @return \Psr\Http\Message\ResponseInterface|string|void
23
     */
24
    public function index()
25
    {
26
        return lang('Rest.notImplemented', ['index']);
27
    }
28
29
    /**
30
     * Présenter une vue pour présenter un objet de ressource spécifique
31
     *
32
     * @param int|string|null $id
33
     *
34
     * @return ResponseInterface|string|void
0 ignored issues
show
Bug introduced by
The type BlitzPHP\Controllers\ResponseInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
35
     */
36
    public function show($id = null)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

36
    public function show(/** @scrutinizer ignore-unused */ $id = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
37
    {
38
        return lang('Rest.notImplemented', ['show']);
39
    }
40
41
    /**
42
     * Présenter une vue pour présenter un nouvel objet de ressource unique
43
     *
44
     * @return ResponseInterface|string|void
45
     */
46
    public function new()
47
    {
48
        return lang('Rest.notImplemented', ['new']);
49
    }
50
51
    /**
52
     * Traiter la création/insertion d'un nouvel objet ressource.
53
     * Cela devrait être un POST.
54
     *
55
     * @return ResponseInterface|string|void
56
     */
57
    public function create()
58
    {
59
        return lang('Rest.notImplemented', ['create']);
60
    }
61
62
    /**
63
     * Présenter une vue pour modifier les propriétés d'un objet de ressource spécifique
64
     *
65
     * @param int|string|null $id
66
     *
67
     * @return ResponseInterface|string|void
68
     */
69
    public function edit($id = null)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

69
    public function edit(/** @scrutinizer ignore-unused */ $id = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
70
    {
71
        return lang('Rest.notImplemented', ['edit']);
72
    }
73
74
    /**
75
     * Traiter la mise à jour, totale ou partielle, d'un objet ressource spécifique.
76
     * Cela devrait être un POST.
77
     *
78
     * @param int|string|null $id
79
     *
80
     * @return ResponseInterface|string|void
81
     */
82
    public function update($id = null)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

82
    public function update(/** @scrutinizer ignore-unused */ $id = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
83
    {
84
        return lang('Rest.notImplemented', ['update']);
85
    }
86
87
    /**
88
     * Présenter une vue pour confirmer la suppression d'un objet de ressource spécifique
89
     *
90
     * @param int|string|null $id
91
     *
92
     * @return ResponseInterface|string|void
93
     */
94
    public function remove($id = null)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

94
    public function remove(/** @scrutinizer ignore-unused */ $id = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
95
    {
96
        return lang('Rest.notImplemented', ['remove']);
97
    }
98
99
    /**
100
     * Traiter la suppression d'un objet de ressource spécifique
101
     *
102
     * @param int|string|null $id
103
     *
104
     * @return ResponseInterface|string|void
105
     */
106
    public function delete($id = null)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

106
    public function delete(/** @scrutinizer ignore-unused */ $id = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
107
    {
108
        return lang('Rest.notImplemented', ['delete']);
109
    }
110
}
111