22
33namespace Studio \Totem \Http \Controllers ;
44
5- use Studio \Totem \Frequency ;
65use Studio \Totem \Task ;
76use Studio \Totem \Totem ;
7+ use Studio \Totem \Frequency ;
88use Studio \Totem \Contracts \TaskInterface ;
99use Studio \Totem \Http \Requests \TaskRequest ;
1010
@@ -130,7 +130,7 @@ public function destroy($task)
130130 }
131131
132132 /**
133- * JSON representation of tasks and their frequencies
133+ * JSON representation of tasks and their frequencies.
134134 *
135135 * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response
136136 */
@@ -151,7 +151,7 @@ public function import()
151151 $ records_imported = 0 ;
152152 if (request ()->hasFile ('tasks ' )) {
153153 $ file = request ()->file ('tasks ' );
154- if (ends_with ($ file ->getClientOriginalName (), '.json ' )) {
154+ if (ends_with ($ file ->getClientOriginalName (), '.json ' )) {
155155 try {
156156 $ data = json_decode (file_get_contents ($ file ->getPathname ()));
157157 foreach ($ data as $ record ) {
@@ -171,7 +171,7 @@ public function import()
171171 'notification_slack_webhook ' => $ record ->notification_slack_webhook ,
172172 ]);
173173
174- if (!empty ($ record ->frequencies )) {
174+ if (! empty ($ record ->frequencies )) {
175175 foreach ($ record ->frequencies as $ freq ) {
176176 Frequency::updateOrCreate ([
177177 'id ' => $ freq ->id ,
@@ -190,7 +190,7 @@ public function import()
190190 }
191191 }
192192
193- if ($ records_imported == 0 ) {
193+ if ($ records_imported == 0 ) {
194194 $ errors [] = 'Invalid data or no record selected. ' ;
195195 }
196196
0 commit comments