Skip to content

Commit

Permalink
Fixed Deprecated: Creation of dynamic property
Browse files Browse the repository at this point in the history
  • Loading branch information
glo71317 committed Feb 1, 2024
1 parent 5ec6d1d commit 62fb397
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/integration/Adapter/Driver/Pdo/Mysql/AdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

namespace LaminasIntegrationTest\Db\Adapter\Driver\Pdo\Mysql;

use Laminas\Db\Adapter\Adapter;
use LaminasIntegrationTest\Db\Adapter\Driver\Pdo\AbstractAdapterTest;

class AdapterTest extends AbstractAdapterTest
{
use AdapterTrait;

/** @var Adapter */
protected $adapter;
public const DB_SERVER_PORT = 3306;
}
3 changes: 3 additions & 0 deletions test/integration/Adapter/Driver/Pdo/Mysql/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace LaminasIntegrationTest\Db\Adapter\Driver\Pdo\Mysql;

use Laminas\Db\Adapter\Adapter;
use Laminas\Db\Adapter\Driver\Pdo\Result as PdoResult;
use Laminas\Db\Adapter\Exception\RuntimeException;
use Laminas\Db\ResultSet\ResultSet;
Expand All @@ -12,6 +13,8 @@ class QueryTest extends TestCase
{
use AdapterTrait;

/** @var Adapter */
protected $adapter;
/**
* @psalm-return array<array-key, array{
* 0: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace LaminasIntegrationTest\Db\Adapter\Driver\Pdo\Mysql;

use Laminas\Db\Adapter\Adapter;
use Laminas\Db\Sql\TableIdentifier;
use Laminas\Db\TableGateway\Feature\MetadataFeature;
use Laminas\Db\TableGateway\TableGateway;
Expand All @@ -13,6 +14,8 @@ class TableGatewayTest extends TestCase
{
use AdapterTrait;

/** @var Adapter */
protected $adapter;
/**
* @covers \Laminas\Db\TableGateway\TableGateway::__construct
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

namespace LaminasIntegrationTest\Db\Adapter\Driver\Pdo\Postgresql;

use Laminas\Db\Adapter\Adapter;
use LaminasIntegrationTest\Db\Adapter\Driver\Pdo\AbstractAdapterTest;

class AdapterTest extends AbstractAdapterTest
{
use AdapterTrait;

/** @var Adapter */
protected $adapter;
public const DB_SERVER_PORT = 5432;
}
2 changes: 2 additions & 0 deletions test/unit/Adapter/Driver/IbmDb2/StatementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class StatementTest extends TestCase
{
/** @var Statement */
protected $statement;
/** @var int */
protected $currentErrorReporting;

/**
* Sets up the fixture, for example, opens a network connection.
Expand Down
2 changes: 2 additions & 0 deletions test/unit/RowGateway/RowGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class RowGatewayTest extends TestCase
/** @var RowGateway */
protected $rowGateway;

/** @var ResultInterface&MockObject */
protected $mockResult;
protected function setUp(): void
{
// mock the adapter, driver, and parts
Expand Down
6 changes: 6 additions & 0 deletions test/unit/Sql/Platform/Mysql/SelectDecoratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@
use Laminas\Db\Sql\Select;
use Laminas\Db\Sql\Sql;
use LaminasTest\Db\TestAsset\TrustingMysqlPlatform;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

class SelectDecoratorTest extends TestCase
{
/** @var Adapter&MockObject */
protected $mockAdapter;

/** @var Sql */
protected $sql;
/**
* @testdox integration test: Testing SelectDecorator will use Select an internal state to prepare
* a proper limit/offset sql statement
Expand Down
4 changes: 4 additions & 0 deletions test/unit/TableGateway/AbstractTableGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Laminas\Db\TableGateway\AbstractTableGateway;
use Laminas\Db\TableGateway\Feature\FeatureSet;
use PHPUnit\Framework\MockObject\Generator;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use ReflectionClass;

Expand All @@ -30,6 +31,9 @@ class AbstractTableGatewayTest extends TestCase
/** @var AbstractTableGateway */
protected $table;

/** @var FeatureSet&MockObject */
protected $mockFeatureSet;

/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
Expand Down

0 comments on commit 62fb397

Please sign in to comment.