Skip to content

Commit

Permalink
Fixed return type hint for Column::getSize
Browse files Browse the repository at this point in the history
See: #15019
  • Loading branch information
sergeyklay committed May 6, 2020
1 parent ed6da0b commit c633aa9
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 37 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
- Fixed return type hint for `Phalcon\Mvc\Model\MetaData::getColumnMap` and `Phalcon\Mvc\Model\MetaData::getReverseColumnMap` to reflect original behavior [#15015](https://github.com/phalcon/cphalcon/issues/15015)
- Fixed return type hint for `Phalcon\Mvc\Model\MetaDataInterface::getColumnMap` and `Phalcon\Mvc\Model\MetaDataInterface::getReverseColumnMap` to reflect original behavior [#15015](https://github.com/phalcon/cphalcon/issues/15015)
- Fixed return type hint for `Phalcon\Mvc\Model\CriteriaInterface::getColumns` and `Phalcon\Mvc\Model\Criteria::getColumns` to reflect original behavior [#15017](https://github.com/phalcon/cphalcon/issues/15017)
- Fixed return type hint for `Phalcon\Db\Column::getSize` and `Phalcon\Db\ColumnInterface::getSize` to reflect original behavior [#15019](https://github.com/phalcon/cphalcon/issues/15019)

# [4.0.5](https://github.com/phalcon/cphalcon/releases/tag/v4.0.5) (2020-03-07)
## Added
Expand Down
10 changes: 5 additions & 5 deletions ext/phalcon/db/column.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions ext/phalcon/db/column.zep.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ext/phalcon/db/columninterface.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions ext/phalcon/db/columninterface.zep.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions phalcon/Db/Column.zep
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

/**
* This file is part of the Phalcon.
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <team@phalcon.com>
* (c) Phalcon Team <team@phalcon.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* For the full copyright and license information, please view the
* LICENSE.txt file that was distributed with this source code.
*/

namespace Phalcon\Db;
Expand Down Expand Up @@ -272,7 +272,7 @@ class Column implements ColumnInterface
/**
* Integer column size
*
* @var int
* @var int | string
*/
protected size = 0 { get };

Expand Down
10 changes: 5 additions & 5 deletions phalcon/Db/ColumnInterface.zep
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

/**
* This file is part of the Phalcon.
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <team@phalcon.com>
* (c) Phalcon Team <team@phalcon.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* For the full copyright and license information, please view the
* LICENSE.txt file that was distributed with this source code.
*/

namespace Phalcon\Db;
Expand Down Expand Up @@ -43,7 +43,7 @@ interface ColumnInterface
/**
* Returns column size
*/
public function getSize() -> int;
public function getSize() -> int | string;

/**
* Returns column type
Expand Down
2 changes: 2 additions & 0 deletions tests/_data/fixtures/Traits/DbTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,8 @@ protected function getColumnsArray(): array
*
* @author Phalcon Team <[email protected]>
* @since 2020-02-01
*
* @return Column[]
*/
protected function getColumnsObjects(): array
{
Expand Down
6 changes: 4 additions & 2 deletions tests/database/Db/Column/GetSizeCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
* For the full copyright and license information, please view the
* LICENSE.txt file that was distributed with this source code.
*/

declare(strict_types=1);
Expand All @@ -23,6 +23,8 @@ class GetSizeCest
/**
* Tests Phalcon\Db\Column :: getSize()
*
* @param DatabaseTester $I
*
* @author Phalcon Team <[email protected]>
* @since 2020-02-01
*
Expand Down

0 comments on commit c633aa9

Please sign in to comment.