Skip to content

Commit

Permalink
restored underscores in protected methods, updated composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
arusinowski committed Sep 25, 2023
1 parent a779fc6 commit fa433c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"stan-baseline": "tools/phpstan --generate-baseline",
"psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml",
"stan-setup": "phive install",
"tools-setup": "phive install",
"test": "phpunit"
},
"require": {
Expand Down
16 changes: 8 additions & 8 deletions src/TestSuite/Fixture/ChecksumTestFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ class ChecksumTestFixture extends TestFixture
*/
public function insert(ConnectionInterface $connection): bool
{
if ($this->tableUnmodified($connection)) {
if ($this->_tableUnmodified($connection)) {
return true;
}

$result = parent::insert($connection);
static::$_tableHashes[$this->getTableKey()] = $this->hash($connection);
static::$_tableHashes[$this->_getTableKey()] = $this->_hash($connection);

return $result;
}
Expand All @@ -58,7 +58,7 @@ public function insert(ConnectionInterface $connection): bool
*/
public function truncate(ConnectionInterface $connection): bool
{
if ($this->tableUnmodified($connection)) {
if ($this->_tableUnmodified($connection)) {
return true;
}

Expand All @@ -76,14 +76,14 @@ public function truncate(ConnectionInterface $connection): bool
* @param \Cake\Datasource\ConnectionInterface $connection A reference to a db instance
* @return bool
*/
protected function tableUnmodified(ConnectionInterface $connection): bool
protected function _tableUnmodified(ConnectionInterface $connection): bool
{
$tableKey = $this->getTableKey();
$tableKey = $this->_getTableKey();
if (!array_key_exists($tableKey, static::$_tableHashes)) {
return false;
}

if (static::$_tableHashes[$tableKey] === $this->hash($connection)) {
if (static::$_tableHashes[$tableKey] === $this->_hash($connection)) {
return true;
}

Expand All @@ -96,7 +96,7 @@ protected function tableUnmodified(ConnectionInterface $connection): bool
* @param \Cake\Datasource\ConnectionInterface $connection A reference to a db instance
* @return string
*/
protected function hash(ConnectionInterface $connection): string
protected function _hash(ConnectionInterface $connection): string
{
assert($connection instanceof Connection);
$driver = $connection->getDriver();
Expand All @@ -116,7 +116,7 @@ protected function hash(ConnectionInterface $connection): string
*
* @return string key for specify connection and table
*/
protected function getTableKey(): string
protected function _getTableKey(): string
{
return $this->connection() . '-' . $this->table;
}
Expand Down

0 comments on commit fa433c9

Please sign in to comment.