Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated syntax for "integer" and "boolean" types #1457

Merged
merged 1 commit into from
Sep 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/Doctrine/ORM/Tools/EntityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,15 @@ class EntityGenerator
Type::DATE => '\DateTime',
Type::TIME => '\DateTime',
Type::OBJECT => '\stdClass',
Type::BIGINT => 'integer',
Type::SMALLINT => 'integer',
Type::INTEGER => 'int',
Type::BIGINT => 'int',
Type::SMALLINT => 'int',
Type::TEXT => 'string',
Type::BLOB => 'string',
Type::DECIMAL => 'string',
Type::JSON_ARRAY => 'array',
Type::SIMPLE_ARRAY => 'array',
Type::BOOLEAN => 'bool',
);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DDC1476EntityWithDefaultFieldType
protected $name;

/**
* @return integer
* @return int
*/
public function getId()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/Models/DDC1590/DDC1590Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class DDC1590Entity
/**
* Get id
*
* @return integer
* @return int
*/
public function getId()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/Models/DDC964/DDC964Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct($zip = null, $country = null, $city = null, $street
}

/**
* @return integer
* @return int
*/
public function getId()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/Models/DDC964/DDC964User.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct($name = null)
}

/**
* @return integer
* @return int
*/
public function getId()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class DDC1657Screen
{
/**
* Identifier
* @var integer
* @var int
*
* @Id
* @GeneratedValue(strategy="IDENTITY")
Expand Down Expand Up @@ -187,7 +187,7 @@ class DDC1657Avatar
{
/**
* Identifier
* @var integer
* @var int
*
* @Id
* @GeneratedValue(strategy="IDENTITY")
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1080Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class DDC1080FooBar
*/
protected $_bar = null;
/**
* @var integer orderNr
* @var int orderNr
* @Column(name="orderNr", type="integer", nullable=false)
*/
protected $_orderNr = null;
Expand Down Expand Up @@ -292,7 +292,7 @@ public function setBar($bar)
/**
* Retrieve the orderNr property
*
* @return integer|null
* @return int|null
*/
public function getOrderNr()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1300Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testIssue()
class DDC1300Foo
{
/**
* @var integer fooID
* @var int fooID
* @Column(name="fooID", type="integer", nullable=false)
* @GeneratedValue(strategy="AUTO")
* @Id
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1404Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class DDC1404ParentEntity
protected $id;

/**
* @return integer
* @return int
*/
public function getId()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1430Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class DDC1430Order
private $products;

/**
* @return integer
* @return int
*/
public function getId()
{
Expand Down Expand Up @@ -253,7 +253,7 @@ public function __construct($value)
}

/**
* @return integer
* @return int
*/
public function getId()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testIssue()
class DDC144FlowElement {
/**
* @Id @Column(type="integer") @GeneratedValue
* @var integer
* @var int
*/
public $id;
/** @Column */
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1595Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ abstract class DDC1595BaseInheritance
* @Id @GeneratedValue
* @Column(type="integer")
*
* @var integer
* @var int
*/
public $id;
}
Expand Down
24 changes: 12 additions & 12 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1695Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testIssue()
class DDC1695News
{
/**
* @var integer $idNews
* @var int $idNews
*
* @Column(name="`IdNews`", type="integer", nullable=false)
* @Id
Expand All @@ -45,42 +45,42 @@ class DDC1695News
private $idUser;

/**
* @var integer $idLanguage
* @var int $idLanguage
*
* @Column(name="`IdLanguage`", type="integer", nullable=false)
*/
private $idLanguage;

/**
* @var integer $idCondition
* @var int $idCondition
*
* @Column(name="`IdCondition`", type="integer", nullable=true)
*/
private $idCondition;

/**
* @var integer $idHealthProvider
* @var int $idHealthProvider
*
* @Column(name="`IdHealthProvider`", type="integer", nullable=true)
*/
private $idHealthProvider;

/**
* @var integer $idSpeciality
* @var int $idSpeciality
*
* @Column(name="`IdSpeciality`", type="integer", nullable=true)
*/
private $idSpeciality;

/**
* @var integer $idMedicineType
* @var int $idMedicineType
*
* @Column(name="`IdMedicineType`", type="integer", nullable=true)
*/
private $idMedicineType;

/**
* @var integer $idTreatment
* @var int $idTreatment
*
* @Column(name="`IdTreatment`", type="integer", nullable=true)
*/
Expand Down Expand Up @@ -122,35 +122,35 @@ class DDC1695News
private $idxNews;

/**
* @var boolean $highlight
* @var bool $highlight
*
* @Column(name="`Highlight`", type="boolean", nullable=false)
*/
private $highlight;

/**
* @var integer $order
* @var int $order
*
* @Column(name="`Order`", type="integer", nullable=false)
*/
private $order;

/**
* @var boolean $deleted
* @var bool $deleted
*
* @Column(name="`Deleted`", type="boolean", nullable=false)
*/
private $deleted;

/**
* @var boolean $active
* @var bool $active
*
* @Column(name="`Active`", type="boolean", nullable=false)
*/
private $active;

/**
* @var boolean $updateToHighlighted
* @var bool $updateToHighlighted
*
* @Column(name="`UpdateToHighlighted`", type="boolean", nullable=true)
*/
Expand Down
8 changes: 4 additions & 4 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1925Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testIssue()
class DDC1925Product
{
/**
* @var integer $id
* @var int $id
*
* @Column(name="id", type="integer")
* @Id
Expand Down Expand Up @@ -76,7 +76,7 @@ public function __construct()
}

/**
* @return integer
* @return int
*/
public function getId()
{
Expand Down Expand Up @@ -133,7 +133,7 @@ public function addBuyer(DDC1925User $buyer)
class DDC1925User
{
/**
* @var integer
* @var int
*
* @Column(name="id", type="integer")
* @Id
Expand All @@ -151,7 +151,7 @@ class DDC1925User
/**
* Get id
*
* @return integer
* @return int
*/
public function getId()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2138Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class DDC2138Structure
abstract class DDC2138UserFollowedObject
{
/**
* @var integer $id
* @var int $id
*
* @Column(name="id", type="integer")
* @Id
Expand All @@ -86,7 +86,7 @@ abstract class DDC2138UserFollowedObject
/**
* Get id
*
* @return integer
* @return int
*/
public function getId()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2931Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class DDC2931User
/**
* Return Rank recursively
* My rank is 1 + rank of my parent
* @return integer
* @return int
*/
public function getRank()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3033Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class DDC3033Product
public $changeSet = array();

/**
* @var integer $id
* @var int $id
*
* @Column(name="id", type="integer")
* @Id
Expand Down Expand Up @@ -120,7 +120,7 @@ public function postUpdate(LifecycleEventArgs $eventArgs)
class DDC3033User
{
/**
* @var integer
* @var int
*
* @Column(name="id", type="integer")
* @Id
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class DDC742User
* @Id
* @GeneratedValue(strategy="AUTO")
* @Column(type="integer")
* @var integer
* @var int
*/
public $id;
/**
Expand Down Expand Up @@ -114,7 +114,7 @@ class DDC742Comment
* @Id
* @GeneratedValue(strategy="AUTO")
* @Column(type="integer")
* @var integer
* @var int
*/
public $id;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ function __construct($value = null)
private $value;

/**
* @return integer
* @return int
*/
public function getId()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ public function __construct($float)
}

/**
* @return integer
* @return int
*/
public function getId()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -993,13 +993,13 @@ public function getEntityTypeAliasDataProvider()
)),
array(array(
'fieldName' => 'bigint',
'phpType' => 'integer',
'phpType' => 'int',
'dbType' => 'bigint',
'value' => 11
)),
array(array(
'fieldName' => 'smallint',
'phpType' => 'integer',
'phpType' => 'int',
'dbType' => 'smallint',
'value' => 22
)),
Expand Down
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/OrmPerformanceTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class OrmPerformanceTestCase extends OrmFunctionalTestCase
{
/**
* @var integer
* @var int
*/
protected $maxRunningTime = 0;

Expand Down Expand Up @@ -54,7 +54,7 @@ public function setMaxRunningTime($maxRunningTime)
}

/**
* @return integer
* @return int
*
* @since Method available since Release 2.3.0
*/
Expand Down
Loading