Skip to content

Commit 69f592c

Browse files
committed
Improve naming
1 parent c5e3500 commit 69f592c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Illuminate/Database/Connection.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class Connection implements ConnectionInterface
208208
*
209209
* @var null|'read'|'write'
210210
*/
211-
protected $latestPdoTypeUsed;
211+
protected $latestReadWriteTypeUsed;
212212

213213
/**
214214
* Create a new database connection instance.
@@ -826,12 +826,12 @@ protected function runQueryCallback($query, $bindings, Closure $callback)
826826
catch (Exception $e) {
827827
if ($this->isUniqueConstraintError($e)) {
828828
throw new UniqueConstraintViolationException(
829-
$this->getName(), $query, $this->prepareBindings($bindings), $e, $this->latestPdoTypeUsed()
829+
$this->getName(), $query, $this->prepareBindings($bindings), $e, $this->latestReadWriteTypeUsed()
830830
);
831831
}
832832

833833
throw new QueryException(
834-
$this->getName(), $query, $this->prepareBindings($bindings), $e, $this->latestPdoTypeUsed()
834+
$this->getName(), $query, $this->prepareBindings($bindings), $e, $this->latestReadWriteTypeUsed()
835835
);
836836
}
837837
}
@@ -858,7 +858,7 @@ protected function isUniqueConstraintError(Exception $exception)
858858
public function logQuery($query, $bindings, $time = null)
859859
{
860860
$this->totalQueryDuration += $time ?? 0.0;
861-
$readWriteType = $this->latestPdoTypeUsed();
861+
$readWriteType = $this->latestReadWriteTypeUsed();
862862

863863
$this->event(new QueryExecuted($query, $bindings, $time, $this, $readWriteType));
864864

@@ -1641,7 +1641,7 @@ public function setReadWriteType($readWriteType)
16411641
*/
16421642
protected function retrievingPdoType($type)
16431643
{
1644-
$this->latestPdoTypeUsed = $type;
1644+
$this->latestReadWriteTypeUsed = $type;
16451645

16461646
return $this;
16471647
}
@@ -1651,9 +1651,9 @@ protected function retrievingPdoType($type)
16511651
*
16521652
* @return 'read'|'write'
16531653
*/
1654-
protected function latestPdoTypeUsed()
1654+
protected function latestReadWriteTypeUsed()
16551655
{
1656-
return $this->readWriteType ?? $this->latestPdoTypeUsed;
1656+
return $this->readWriteType ?? $this->latestReadWriteTypeUsed;
16571657
}
16581658

16591659
/**

0 commit comments

Comments
 (0)