Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/#6798-fix-zend-db-docblock-annotations-as-per-sc…
Browse files Browse the repository at this point in the history
…rutinizer'

Close #6798
  • Loading branch information
Ocramius committed Dec 5, 2014
2 parents 67a54d4 + 31b6581 commit f373802
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 12 deletions.
1 change: 1 addition & 0 deletions library/Zend/Db/Adapter/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public function getCurrentSchema()
*
* @param string $sql
* @param string|array|ParameterContainer $parametersOrQueryMode
* @param \Zend\Db\ResultSet\ResultSetInterface $resultPrototype
* @throws Exception\InvalidArgumentException
* @return Driver\StatementInterface|ResultSet\ResultSet
*/
Expand Down
10 changes: 5 additions & 5 deletions library/Zend/Db/Sql/Ddl/Column/Blob.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class Blob extends Column
protected $type = 'BLOB';

/**
* @param null $name
* @param int $length
* @param bool $nullable
* @param null $default
* @param array $options
* @param string $name
* @param int $length
* @param bool $nullable
* @param null $default
* @param array $options
*/
public function __construct($name, $length, $nullable = false, $default = null, array $options = array())
{
Expand Down
20 changes: 20 additions & 0 deletions library/Zend/Db/Sql/Ddl/Column/ColumnInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,30 @@

use Zend\Db\Sql\ExpressionInterface;

/**
* Interface ColumnInterface describes the protocol on how Column objects interact
*
* @package Zend\Db\Sql\Ddl\Column
*/
interface ColumnInterface extends ExpressionInterface
{
/**
* @return string
*/
public function getName();

/**
* @return bool
*/
public function isNullable();

/**
* @return null|string|int
*/
public function getDefault();

/**
* @return array
*/
public function getOptions();
}
6 changes: 3 additions & 3 deletions library/Zend/Db/Sql/Ddl/Constraint/UniqueKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class UniqueKey extends AbstractConstraint
protected $specification = 'CONSTRAINT UNIQUE KEY %s(...)';

/**
* @param string $column
* @param array $columns
* @param null|string $name
*/
public function __construct($column, $name = null)
public function __construct($columns, $name = null)
{
$this->setColumns($column);
$this->setColumns($columns);
$this->name = $name;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/ZendTest/Db/TableGateway/Feature/FeatureSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testAddFeatureThatFeatureDoesnotHasTableGatewayButFeatureSetHas(
{
$mockMasterAdapter = $this->getMock(
'Zend\Db\Adapter\AdapterInterface',
array('getDriver', 'getPlatform')
array('getDriver', 'getPlatform', 'query')
);

$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand All @@ -36,7 +36,7 @@ public function testAddFeatureThatFeatureDoesnotHasTableGatewayButFeatureSetHas(

$mockSlaveAdapter = $this->getMock(
'Zend\Db\Adapter\AdapterInterface',
array('getDriver', 'getPlatform')
array('getDriver', 'getPlatform', 'query')
);

$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function setup()
{
$this->mockMasterAdapter = $this->getMock(
'Zend\Db\Adapter\AdapterInterface',
array('getDriver', 'getPlatform')
array('getDriver', 'getPlatform', 'query')
);

$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand All @@ -43,7 +43,7 @@ public function setup()

$this->mockSlaveAdapter = $this->getMock(
'Zend\Db\Adapter\AdapterInterface',
array('getDriver', 'getPlatform')
array('getDriver', 'getPlatform', 'query')
);

$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand Down

0 comments on commit f373802

Please sign in to comment.