Skip to content

Commit

Permalink
chore(cs): lintPu
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Sep 6, 2023
1 parent 0aacf54 commit a8d386a
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 45 deletions.
8 changes: 4 additions & 4 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
8 changes: 4 additions & 4 deletions publish/cli-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
8 changes: 4 additions & 4 deletions publish/doctrine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand Down
9 changes: 5 additions & 4 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
{
Expand All @@ -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);
Expand Down
9 changes: 5 additions & 4 deletions src/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions src/EntityManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions tests/ConfigProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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);
}

Expand Down
9 changes: 5 additions & 4 deletions tests/DriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a8d386a

Please sign in to comment.