Skip to content

Commit aa9d290

Browse files
authored
Merge pull request #14 from distinctm/php71-support
Support for PHP 7.1
2 parents 9dd3e29 + 916f203 commit aa9d290

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/Updater.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use distinctm\LaravelDataSync\Exceptions\NoRecordsInvalidJSONException;
99
use Illuminate\Support\Collection;
1010
use Illuminate\Support\Facades\File;
11+
use stdClass;
1112

1213
class Updater
1314
{
@@ -144,13 +145,13 @@ protected function sortModels(\Illuminate\Support\Collection $files)
144145
/**
145146
* Filter record criteria.
146147
*
147-
* @param object $record
148+
* @param stdClass $record
148149
*
149150
* @throws \distinctm\LaravelDataSync\Exceptions\NoCriteriaException
150151
*
151152
* @return \Illuminate\Support\Collection
152153
*/
153-
protected function getCriteria(object $record)
154+
protected function getCriteria(stdClass $record)
154155
{
155156
$criteria = collect($record)->filter(function ($value, $key) {
156157
return $this->isCriteria($key);
@@ -168,11 +169,11 @@ protected function getCriteria(object $record)
168169
/**
169170
* Filter record values.
170171
*
171-
* @param object $record
172+
* @param stdClass $record
172173
*
173174
* @return \Illuminate\Support\Collection
174175
*/
175-
protected function getValues(object $record)
176+
protected function getValues(stdClass $record)
176177
{
177178
return collect($record)->reject(function ($value, $key) {
178179
if ($this->isCriteria($key)) {
@@ -235,11 +236,11 @@ protected function isCriteria($key)
235236
* Return ID for nested key-value pairs.
236237
*
237238
* @param string $key
238-
* @param object $values
239+
* @param stdClass $values
239240
*
240241
* @return array
241242
*/
242-
protected function resolveId(string $key, object $values)
243+
protected function resolveId(string $key, stdClass $values)
243244
{
244245
$model = $this->getModel($key);
245246

0 commit comments

Comments
 (0)