Skip to content

Commit 366f8f4

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 15cb921 + c053f24 commit 366f8f4

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

src/Commands/SurveyheroResponseImportCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function handle(): int
5050
foreach ($surveys as $survey) {
5151
/* @var SurveyContract $survey */
5252
try {
53-
if($refreshResponses){
53+
if ($refreshResponses) {
5454
$survey->survey_last_imported = null;
5555
$survey->save();
5656
}

src/Contracts/SurveyContract.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public function hasResponses(): bool;
2727

2828
/**
2929
* Checks if the response timestamp is more recent than the last updated survey timestamp.
30-
* @param string $responseLastUpdatedIsoTimestamp
30+
*
31+
* @param string $responseLastUpdatedIsoTimestamp
3132
* @return bool
3233
*/
3334
public function doesResponseNeedsToBeUpdated(string $responseLastUpdatedIsoTimestamp): bool;

src/Models/Survey.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ public function hasResponses(): bool
4848
}
4949

5050
/**
51-
* @inheritDoc
51+
* {@inheritDoc}
5252
*/
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) {
5556
return Carbon::parse($responseLastUpdatedIsoTimestamp)->gt($this->survey_last_imported);
57+
} else {
58+
return true;
5659
}
57-
else return true;
5860
}
5961
}

src/Services/SurveyResponseImportService.php

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Statikbe\Surveyhero\Services;
44

5-
use Carbon\Carbon;
65
use Illuminate\Support\Facades\DB;
76
use Statikbe\Surveyhero\Contracts\SurveyContract;
87
use Statikbe\Surveyhero\Contracts\SurveyResponseContract;

0 commit comments

Comments
 (0)