Skip to content

Commit 6101cff

Browse files
committed
code formatting
1 parent 34c18ad commit 6101cff

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

src/Database/Barry/Model.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,18 +451,18 @@ public static function create(array $data): Model
451451

452452
// Override the olds model attributes
453453
$model->setAttributes($data);
454-
$model->persiste();
454+
$model->persist();
455455

456456
return $model;
457457
}
458458

459459
/**
460-
* Persiste aliases on insert action
460+
* persist aliases on insert action
461461
*
462462
* @return int
463463
* @throws
464464
*/
465-
public function persiste(): int
465+
public function persist(): int
466466
{
467467
$builder = static::query();
468468

@@ -777,7 +777,7 @@ public function touch(): bool
777777
$this->setAttribute($this->updated_at, date('Y-m-d H:i:s'));
778778
}
779779

780-
return (bool)$this->persiste();
780+
return (bool) $this->persist();
781781
}
782782

783783
/**

tests/Database/Query/ModelQueryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function test_save(string $name)
169169

170170
$pet = PetModelStub::first();
171171
$pet->name = "Lofi";
172-
$pet->save();
172+
$pet->persist();
173173

174174
$this->assertNotEquals($pet->name, 'Couli');
175175
$this->assertInstanceOf(PetModelStub::class, $pet);

tests/Database/Relation/BelongsToRelationQueryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function test_get_the_relationship(string $name)
4343
{
4444
$this->executeMigration($name);
4545

46-
$pet = PetModelStub::connection($name)->find(1);
46+
$pet = PetModelStub::connection($name)->retrieve(1);
4747
$master = $pet->master;
4848

4949
$this->assertInstanceOf(PetMasterModelStub::class, $master);

tests/Events/EventTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ public function test_model_created_event_emited()
5050
'id' => 3,
5151
'name' => 'Filou'
5252
]);
53-
$this->assertEquals($event->persiste(), 1);
53+
$this->assertEquals($event->persist(), 1);
5454
$this->assertEquals('created', file_get_contents(static::$cache_filename));
5555
}
5656

5757
public function test_model_updated_event_emited()
5858
{
5959
$pet = EventModelStub::connection("mysql")->first();
6060
$pet->name = 'Loulou';
61-
$this->assertEquals($pet->persiste(), 1);
61+
$this->assertEquals($pet->persist(), 1);
6262
$this->assertEquals('updated', file_get_contents(static::$cache_filename));
6363
}
6464

tests/Queue/Stubs/ModelProducerStub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct(
1616

1717
public function process(): void
1818
{
19-
$this->pet->save();
19+
$this->pet->persist();
2020

2121
file_put_contents(TESTING_RESOURCE_BASE_DIRECTORY . "/{$this->connection}_queue_pet_model_stub.txt", $this->pet->toJson());
2222

tests/Support/CollectionTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function test_get_instance()
1717
}
1818

1919
/**
20-
* @param $collection
20+
* @param Collection $collection
2121
* @depends test_get_instance
2222
*/
2323
public function test_sum(Collection $collection)
@@ -26,7 +26,7 @@ public function test_sum(Collection $collection)
2626
}
2727

2828
/**
29-
* @param $collection
29+
* @param Collection $collection
3030
* @depends test_get_instance
3131
*/
3232
public function test_max(Collection $collection)
@@ -35,7 +35,7 @@ public function test_max(Collection $collection)
3535
}
3636

3737
/**
38-
* @param $collection
38+
* @param Collection $collection
3939
* @depends test_get_instance
4040
*/
4141
public function test_min(Collection $collection)
@@ -44,7 +44,7 @@ public function test_min(Collection $collection)
4444
}
4545

4646
/**
47-
* @param $collection
47+
* @param Collection $collection
4848
* @depends test_get_instance
4949
*/
5050
public function test_count(Collection $collection)
@@ -53,7 +53,7 @@ public function test_count(Collection $collection)
5353
}
5454

5555
/**
56-
* @param $collection
56+
* @param Collection $collection
5757
* @depends test_get_instance
5858
*/
5959
public function test_pop(Collection $collection)
@@ -62,7 +62,7 @@ public function test_pop(Collection $collection)
6262
}
6363

6464
/**
65-
* @param $collection
65+
* @param Collection $collection
6666
* @depends test_get_instance
6767
*/
6868
public function test_shift(Collection $collection)
@@ -71,7 +71,7 @@ public function test_shift(Collection $collection)
7171
}
7272

7373
/**
74-
* @param $collection
74+
* @param Collection $collection
7575
* @depends test_get_instance
7676
*/
7777
public function test_reserve(Collection $collection)
@@ -80,7 +80,7 @@ public function test_reserve(Collection $collection)
8080
}
8181

8282
/**
83-
* @param $collection
83+
* @param Collection $collection
8484
* @depends test_get_instance
8585
*/
8686
public function test_generator(Collection $collection)
@@ -91,7 +91,7 @@ public function test_generator(Collection $collection)
9191
}
9292

9393
/**
94-
* @param $collection
94+
* @param Collection $collection
9595
* @depends test_get_instance
9696
*/
9797
public function test_json(Collection $collection)
@@ -100,7 +100,7 @@ public function test_json(Collection $collection)
100100
}
101101

102102
/**
103-
* @param $collection
103+
* @param Collection $collection
104104
* @depends test_get_instance
105105
*/
106106
public function test_excepts(Collection $collection)
@@ -109,7 +109,7 @@ public function test_excepts(Collection $collection)
109109
}
110110

111111
/**
112-
* @param $collection
112+
* @param Collection $collection
113113
* @depends test_get_instance
114114
*/
115115
public function test_push(Collection $collection)

0 commit comments

Comments
 (0)