File tree 4 files changed +9
-7
lines changed
4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public function handle(): int
50
50
foreach ($ surveys as $ survey ) {
51
51
/* @var SurveyContract $survey */
52
52
try {
53
- if ($ refreshResponses ){
53
+ if ($ refreshResponses ) {
54
54
$ survey ->survey_last_imported = null ;
55
55
$ survey ->save ();
56
56
}
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ public function hasResponses(): bool;
27
27
28
28
/**
29
29
* Checks if the response timestamp is more recent than the last updated survey timestamp.
30
- * @param string $responseLastUpdatedIsoTimestamp
30
+ *
31
+ * @param string $responseLastUpdatedIsoTimestamp
31
32
* @return bool
32
33
*/
33
34
public function doesResponseNeedsToBeUpdated (string $ responseLastUpdatedIsoTimestamp ): bool ;
Original file line number Diff line number Diff line change @@ -48,12 +48,14 @@ public function hasResponses(): bool
48
48
}
49
49
50
50
/**
51
- * @inheritDoc
51
+ * { @inheritDoc}
52
52
*/
53
- public function doesResponseNeedsToBeUpdated (string $ responseLastUpdatedIsoTimestamp ): bool {
54
- if ($ this ->survey_last_imported ) {
53
+ public function doesResponseNeedsToBeUpdated (string $ responseLastUpdatedIsoTimestamp ): bool
54
+ {
55
+ if ($ this ->survey_last_imported ) {
55
56
return Carbon::parse ($ responseLastUpdatedIsoTimestamp )->gt ($ this ->survey_last_imported );
57
+ } else {
58
+ return true ;
56
59
}
57
- else return true ;
58
60
}
59
61
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Statikbe \Surveyhero \Services ;
4
4
5
- use Carbon \Carbon ;
6
5
use Illuminate \Support \Facades \DB ;
7
6
use Statikbe \Surveyhero \Contracts \SurveyContract ;
8
7
use Statikbe \Surveyhero \Contracts \SurveyResponseContract ;
You can’t perform that action at this time.
0 commit comments