Total Complexity | 6 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
9 | class SubscriptionService extends CRUDServices |
||
10 | { |
||
11 | private Subscription $subscription; |
||
12 | |||
13 | public function __construct(Subscription $subscription) |
||
19 | } |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Retrieves an instance of subscription. |
||
24 | */ |
||
25 | public function getSubscription(): Subscription |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Makes a list of fields that you do not want to be sent |
||
32 | * to the create or update methods. |
||
33 | * Its mainly the fields that you do not have in the subscriptions table. |
||
34 | */ |
||
35 | public function getUnsetFields() |
||
36 | { |
||
37 | return ['subscription_id']; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * This returns the model found in the constructor |
||
42 | * or an instance of the class if no subscription is found. |
||
43 | */ |
||
44 | public function getModel() |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Attaches a parent to the current subscription. |
||
51 | * You can delete this if you do not intent to create subscriptions from parent relationships. |
||
52 | */ |
||
53 | public function getParentRelationship() |
||
58 | ]; |
||
59 | } |
||
61 |