Skip to content

Commit 6e5a4c1

Browse files
committed
rename method
1 parent c6eeca0 commit 6e5a4c1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Illuminate/Pipeline/Pipeline.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Pipeline implements PipelineContract
5353
*
5454
* @var bool
5555
*/
56-
protected $withinTransactions = false;
56+
protected $withinTransaction = false;
5757

5858
/**
5959
* Create a new class instance.
@@ -130,7 +130,7 @@ public function then(Closure $destination)
130130
);
131131

132132
try {
133-
return $this->withinTransactions
133+
return $this->withinTransaction
134134
? $this->getContainer()->make('db')->transaction(fn () => $pipeline($this->passable))
135135
: $pipeline($this->passable);
136136
} finally {
@@ -257,12 +257,12 @@ protected function pipes()
257257
/**
258258
* Execute each pipeline step within a database transaction.
259259
*
260-
* @param bool $withinTransactions
260+
* @param bool $withinTransaction
261261
* @return $this
262262
*/
263-
public function withinTransactions(bool $withinTransactions = true)
263+
public function withinTransaction(bool $withinTransaction = true)
264264
{
265-
$this->withinTransactions = $withinTransactions;
265+
$this->withinTransaction = $withinTransaction;
266266

267267
return $this;
268268
}

tests/Pipeline/PipelineTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public function testPipelineThrowsExceptionWhenUsingTransactionsWithoutContainer
262262

263263
(new Pipeline)->send('data')
264264
->through(PipelineTestPipeOne::class)
265-
->withinTransactions()
265+
->withinTransaction()
266266
->then(function ($piped) {
267267
return $piped;
268268
});

0 commit comments

Comments
 (0)