From fa433c99c4ada475a5caff6bae610a94a6909fa7 Mon Sep 17 00:00:00 2001 From: Adam Rusinowski Date: Mon, 25 Sep 2023 15:15:00 +0200 Subject: [PATCH] restored underscores in protected methods, updated composer.json --- composer.json | 2 +- src/TestSuite/Fixture/ChecksumTestFixture.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 7fe5aca..b6cf8d4 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/src/TestSuite/Fixture/ChecksumTestFixture.php b/src/TestSuite/Fixture/ChecksumTestFixture.php index 12e7a16..a4a31ce 100644 --- a/src/TestSuite/Fixture/ChecksumTestFixture.php +++ b/src/TestSuite/Fixture/ChecksumTestFixture.php @@ -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; } @@ -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; } @@ -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; } @@ -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(); @@ -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; }