From a8d386a0533156e470443ba3205ddf3cd5cc8791 Mon Sep 17 00:00:00 2001 From: leocavalcante Date: Wed, 6 Sep 2023 15:14:20 -0300 Subject: [PATCH] chore(cs): lintPu --- .php-cs-fixer.php | 8 ++++---- publish/cli-config.php | 8 ++++---- publish/doctrine.php | 8 ++++---- src/ConfigProvider.php | 9 +++++---- src/Connection.php | 12 ++++++------ src/Driver.php | 9 +++++---- src/EntityManagerFactory.php | 9 +++++---- tests/ConfigProviderTest.php | 9 +++++---- tests/ConnectionTest.php | 14 +++++++------- tests/DriverTest.php | 9 +++++---- 10 files changed, 50 insertions(+), 45 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 5d0bff3..daad931 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -3,10 +3,10 @@ $header = <<<'EOF' This file is part of Hyperf Doctrine. -@link https://github.com/leocavalcante/hyperf-doctrine -@document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md -@contact @leocavalcante -@license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE +@link https://github.com/opencodeco/hyperf-doctrine +@document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md +@contact @opencodeco +@license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE EOF; return (new PhpCsFixer\Config()) diff --git a/publish/cli-config.php b/publish/cli-config.php index df7ae35..efb8aa7 100644 --- a/publish/cli-config.php +++ b/publish/cli-config.php @@ -4,10 +4,10 @@ /** * This file is part of Hyperf Doctrine. * - * @link https://github.com/leocavalcante/hyperf-doctrine - * @document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md - * @contact @leocavalcante - * @license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE + * @link https://github.com/opencodeco/hyperf-doctrine + * @document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md + * @contact @opencodeco + * @license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE */ ! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1)); diff --git a/publish/doctrine.php b/publish/doctrine.php index 0d9d13a..6f8d4b4 100644 --- a/publish/doctrine.php +++ b/publish/doctrine.php @@ -4,10 +4,10 @@ /** * This file is part of Hyperf Doctrine. * - * @link https://github.com/leocavalcante/hyperf-doctrine - * @document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md - * @contact @leocavalcante - * @license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE + * @link https://github.com/opencodeco/hyperf-doctrine + * @document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md + * @contact @opencodeco + * @license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE */ return [ 'connection' => [ diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index 925f554..21b1ddc 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -4,11 +4,12 @@ /** * This file is part of Hyperf Doctrine. * - * @link https://github.com/leocavalcante/hyperf-doctrine - * @document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md - * @contact @leocavalcante - * @license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE + * @link https://github.com/opencodeco/hyperf-doctrine + * @document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md + * @contact @opencodeco + * @license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE */ + namespace Hyperf\Doctrine; use Doctrine\ORM\EntityManagerInterface; diff --git a/src/Connection.php b/src/Connection.php index ecd387f..1cba282 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -4,11 +4,12 @@ /** * This file is part of Hyperf Doctrine. * - * @link https://github.com/leocavalcante/hyperf-doctrine - * @document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md - * @contact @leocavalcante - * @license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE + * @link https://github.com/opencodeco/hyperf-doctrine + * @document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md + * @contact @opencodeco + * @license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE */ + namespace Hyperf\Doctrine; use Doctrine\DBAL\Driver\Connection as DoctrineConnection; @@ -18,7 +19,6 @@ use Doctrine\DBAL\Driver\Statement as StatementInterface; use Doctrine\DBAL\ParameterType; use Hyperf\DB\DB; -use PDOStatement; final class Connection implements DoctrineConnection { @@ -36,7 +36,7 @@ public function prepare(string $sql): StatementInterface public function query(string $sql): ResultInterface { - /** @var PDOStatement $stmt */ + /** @var \PDOStatement $stmt */ $stmt = $this->connection->prepare($sql); $stmt->execute(); return new Result($stmt); diff --git a/src/Driver.php b/src/Driver.php index 6439860..beffe20 100644 --- a/src/Driver.php +++ b/src/Driver.php @@ -4,11 +4,12 @@ /** * This file is part of Hyperf Doctrine. * - * @link https://github.com/leocavalcante/hyperf-doctrine - * @document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md - * @contact @leocavalcante - * @license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE + * @link https://github.com/opencodeco/hyperf-doctrine + * @document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md + * @contact @opencodeco + * @license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE */ + namespace Hyperf\Doctrine; use Doctrine\DBAL\Driver\AbstractMySQLDriver; diff --git a/src/EntityManagerFactory.php b/src/EntityManagerFactory.php index 7112a41..216cc87 100644 --- a/src/EntityManagerFactory.php +++ b/src/EntityManagerFactory.php @@ -4,11 +4,12 @@ /** * This file is part of Hyperf Doctrine. * - * @link https://github.com/leocavalcante/hyperf-doctrine - * @document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md - * @contact @leocavalcante - * @license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE + * @link https://github.com/opencodeco/hyperf-doctrine + * @document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md + * @contact @opencodeco + * @license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE */ + namespace Hyperf\Doctrine; use Doctrine\ORM\EntityManager; diff --git a/tests/ConfigProviderTest.php b/tests/ConfigProviderTest.php index 96477be..e6193e8 100644 --- a/tests/ConfigProviderTest.php +++ b/tests/ConfigProviderTest.php @@ -4,11 +4,12 @@ /** * This file is part of Hyperf Doctrine. * - * @link https://github.com/leocavalcante/hyperf-doctrine - * @document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md - * @contact @leocavalcante - * @license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE + * @link https://github.com/opencodeco/hyperf-doctrine + * @document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md + * @contact @opencodeco + * @license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE */ + namespace HyperfTest; use Hyperf\Doctrine\ConfigProvider; diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index f081aeb..4df1b1f 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -4,18 +4,18 @@ /** * This file is part of Hyperf Doctrine. * - * @link https://github.com/leocavalcante/hyperf-doctrine - * @document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md - * @contact @leocavalcante - * @license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE + * @link https://github.com/opencodeco/hyperf-doctrine + * @document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md + * @contact @opencodeco + * @license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE */ + namespace HyperfTest; use Doctrine\DBAL\Driver\Exception; use Hyperf\DB\DB; use Hyperf\Doctrine\Connection; use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; -use PDOStatement; use PHPUnit\Framework\TestCase; /** @@ -28,14 +28,14 @@ final class ConnectionTest extends TestCase private DB $db; - private PDOStatement $stmt; + private \PDOStatement $stmt; private Connection $conn; protected function setUp(): void { $this->db = \Mockery::mock(DB::class); - $this->stmt = \Mockery::mock(PDOStatement::class); + $this->stmt = \Mockery::mock(\PDOStatement::class); $this->conn = new Connection($this->db); } diff --git a/tests/DriverTest.php b/tests/DriverTest.php index 1de619c..27b3cc8 100644 --- a/tests/DriverTest.php +++ b/tests/DriverTest.php @@ -4,11 +4,12 @@ /** * This file is part of Hyperf Doctrine. * - * @link https://github.com/leocavalcante/hyperf-doctrine - * @document https://github.com/leocavalcante/hyperf-doctrine/blob/main/README.md - * @contact @leocavalcante - * @license https://github.com/leocavalcante/hyperf-doctrine/blob/main/LICENSE + * @link https://github.com/opencodeco/hyperf-doctrine + * @document https://github.com/opencodeco/hyperf-doctrine/blob/main/README.md + * @contact @opencodeco + * @license https://github.com/opencodeco/hyperf-doctrine/blob/main/LICENSE */ + namespace HyperfTest; use Hyperf\Contract\ContainerInterface;