1 | <?php |
||
8 | class AppointmentPresenter extends BasePresenter |
||
9 | { |
||
10 | 8 | public function __construct(Appointment $resource) |
|
14 | |||
15 | 1 | public function code() |
|
21 | |||
22 | 3 | public function date($format = 'Y-m-d') |
|
37 | |||
38 | // public function arriveAt() |
||
39 | // { |
||
40 | // if (!$this->wrappedObject->business->pref('appointment_flexible_arrival')) { |
||
41 | // return $this->time; |
||
42 | // } |
||
43 | // |
||
44 | // $fromTime = $this->wrappedObject |
||
45 | // ->vacancy |
||
46 | // ->start_at |
||
47 | // ->timezone($this->wrappedObject->business->timezone) |
||
48 | // ->format(config('root.time.format')); |
||
49 | // |
||
50 | // $toTime = $this->wrappedObject |
||
51 | // ->vacancy |
||
52 | // ->finish_at |
||
53 | // ->timezone($this->wrappedObject->business->timezone) |
||
54 | // ->format(config('root.time.format')); |
||
55 | // |
||
56 | // return ucwords(trans('Concierge::appointments.text.from_to', ['from' => $fromTime, 'to' => $toTime])); |
||
57 | // } |
||
58 | |||
59 | // public function time() |
||
60 | // { |
||
61 | // return $this->wrappedObject |
||
62 | // ->start_at |
||
63 | // ->timezone($this->wrappedObject->business->timezone) |
||
64 | // ->format(config('root.time.format')); |
||
65 | // } |
||
66 | |||
67 | // public function finishTime() |
||
68 | // { |
||
69 | // return $this->wrappedObject |
||
70 | // ->finish_at |
||
71 | // ->timezone($this->wrappedObject->business->timezone) |
||
72 | // ->format(config('root.time.format')); |
||
73 | // } |
||
74 | |||
75 | // public function diffForHumans() |
||
76 | // { |
||
77 | // return $this->wrappedObject->start_at->timezone($this->wrappedObject->business->timezone)->diffForHumans(); |
||
78 | // } |
||
79 | |||
80 | 1 | public function phone() |
|
81 | { |
||
82 | 1 | return $this->wrappedObject->business->phone; |
|
83 | } |
||
84 | |||
85 | 1 | public function location() |
|
86 | { |
||
87 | 1 | return $this->wrappedObject->business->postal_address; |
|
88 | } |
||
89 | |||
90 | // public function statusLetter() |
||
91 | // { |
||
92 | // return substr(trans('Concierge::appointments.status.'.$this->wrappedObject->statusLabel), 0, 1); |
||
93 | // } |
||
94 | |||
95 | // public function status() |
||
96 | // { |
||
97 | // return trans('Concierge::appointments.status.'.$this->wrappedObject->statusLabel); |
||
98 | // } |
||
99 | |||
100 | // public function statusIcon() |
||
101 | // { |
||
102 | // return '<span class="label label-'.$this->statusToCssClass().'">'.$this->statusLetter.'</span>'; |
||
103 | // } |
||
104 | |||
105 | 1 | public function statusToCssClass() |
|
122 | |||
123 | // public function panel() |
||
124 | // { |
||
125 | // return view('widgets.appointment.panel._body', ['appointment' => $this, 'user' => auth()->user()])->render(); |
||
126 | // } |
||
127 | |||
128 | // public function row() |
||
129 | // { |
||
130 | // return view('widgets.appointment.row._body', ['appointment' => $this, 'user' => auth()->user()])->render(); |
||
131 | // } |
||
132 | } |
||
133 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.