These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Created by PhpStorm. |
||
4 | * User: davis |
||
5 | * Date: 7/23/17 |
||
6 | * Time: 3:03 AM |
||
7 | */ |
||
8 | |||
9 | namespace DavisPeixoto\BlogCore\Interfaces; |
||
10 | |||
11 | use Exception; |
||
12 | use Ramsey\Uuid\UuidInterface; |
||
13 | use stdClass; |
||
14 | |||
15 | /** |
||
16 | * Interface RepositoryInterface |
||
17 | * @package DavisPeixoto\BlogCore\Interfaces |
||
18 | * @codeCoverageIgnore |
||
19 | */ |
||
20 | interface RepositoryInterface |
||
21 | { |
||
22 | /** |
||
23 | * Must receive an entity to be saved |
||
24 | * Should return the Uuid of created/updated object |
||
25 | * Or throws an exception |
||
26 | * |
||
27 | * @param stdClass $obj |
||
28 | * @throws Exception |
||
29 | * @return UuidInterface |
||
30 | */ |
||
31 | public function save(stdClass $obj): UuidInterface; |
||
32 | |||
33 | /** |
||
34 | * Must receive the entity to be deleted |
||
35 | * Should return true in case of success |
||
36 | * Or return false in case of failure |
||
37 | * |
||
38 | * @param stdClass $obj |
||
39 | * @throws Exception |
||
40 | * @return boolean |
||
41 | */ |
||
42 | public function delete(stdClass $obj): bool; |
||
0 ignored issues
–
show
|
|||
43 | |||
44 | /** |
||
45 | * Should receive an array of filters |
||
46 | * Should return an array of entities |
||
47 | * |
||
48 | * @param array $filters |
||
49 | * @return stdClass[] |
||
50 | */ |
||
51 | public function getList(array $filters): array; |
||
52 | |||
53 | /** |
||
54 | * Should return a single entity |
||
55 | * Looking up by Uuid |
||
56 | * |
||
57 | * @param UuidInterface $uuid |
||
58 | * @return stdClass|false |
||
59 | */ |
||
60 | public function get(UuidInterface $uuid); |
||
61 | } |
||
62 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.