Skip to content

Commit

Permalink
Just a little cs fix, no big deal.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Oct 8, 2022
1 parent acd7541 commit 9b0506e
Show file tree
Hide file tree
Showing 355 changed files with 1,147 additions and 3,397 deletions.
16 changes: 4 additions & 12 deletions tests/Doctrine/Tests/Models/CMS/CmsAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,15 @@ class CmsAddress
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
public $id;

/**
* @var string
*/
/** @var string */
#[Column(length: 50)]
public $country;

/**
* @var string
*/
/** @var string */
#[Column(length: 50)]
public $zip;

/**
* @var string
*/
/** @var string */
#[Column(length: 50)]
public $city;

Expand All @@ -55,9 +49,7 @@ class CmsAddress
*/
public $street;

/**
* @var CmsUser
*/
/** @var CmsUser */
#[OneToOne(targetEntity: 'CmsUser', inversedBy: 'address')]
#[JoinColumn(referencedColumnName: 'id')]
public $user;
Expand Down
24 changes: 6 additions & 18 deletions tests/Doctrine/Tests/Models/CMS/CmsArticle.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,30 @@
#[Entity]
class CmsArticle
{
/**
* @var int
*/
/** @var int */
#[Id]
#[Column(type: 'integer')]
#[GeneratedValue(strategy: 'AUTO')]
public $id;

/**
* @var string
*/
/** @var string */
#[Column(type: 'string', length: 255)]
public $topic;

/**
* @var string
*/
/** @var string */
#[Column(type: 'text')]
public $text;

/**
* @var CmsUser
*/
/** @var CmsUser */
#[ManyToOne(targetEntity: 'CmsUser', inversedBy: 'articles')]
#[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
public $user;

/**
* @var Collection<int, CmsComment>
*/
/** @var Collection<int, CmsComment> */
#[OneToMany(targetEntity: 'CmsComment', mappedBy: 'article')]
public $comments;

/**
* @var int
*/
/** @var int */
#[Version]
#[Column(type: 'integer')]
public $version;
Expand Down
16 changes: 4 additions & 12 deletions tests/Doctrine/Tests/Models/CMS/CmsComment.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,21 @@
#[Entity]
class CmsComment implements Stringable
{
/**
* @var int
*/
/** @var int */
#[Column(type: 'integer')]
#[Id]
#[GeneratedValue(strategy: 'AUTO')]
public $id;

/**
* @var string
*/
/** @var string */
#[Column(type: 'string', length: 255)]
public $topic;

/**
* @var string
*/
/** @var string */
#[Column(type: 'string', length: 255)]
public $text;

/**
* @var CmsArticle
*/
/** @var CmsArticle */
#[ManyToOne(targetEntity: 'CmsArticle', inversedBy: 'comments')]
#[JoinColumn(name: 'article_id', referencedColumnName: 'id')]
public $article;
Expand Down
12 changes: 3 additions & 9 deletions tests/Doctrine/Tests/Models/CMS/CmsEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,17 @@
#[Entity]
class CmsEmail
{
/**
* @var int
*/
/** @var int */
#[Column(type: 'integer')]
#[Id]
#[GeneratedValue]
public $id;

/**
* @var string
*/
/** @var string */
#[Column(length: 250)]
public $email;

/**
* @var CmsUser
*/
/** @var CmsUser */
#[OneToOne(targetEntity: 'CmsUser', mappedBy: 'email')]
public $user;

Expand Down
12 changes: 3 additions & 9 deletions tests/Doctrine/Tests/Models/CMS/CmsGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,17 @@
#[Entity]
class CmsGroup implements IteratorAggregate
{
/**
* @var int
*/
/** @var int */
#[Id]
#[Column(type: 'integer')]
#[GeneratedValue]
public $id;

/**
* @var string
*/
/** @var string */
#[Column(length: 50)]
public $name;

/**
* @psalm-var Collection<int, CmsUser>
*/
/** @psalm-var Collection<int, CmsUser> */
#[ManyToMany(targetEntity: 'CmsUser', mappedBy: 'groups')]
public $users;

Expand Down
8 changes: 2 additions & 6 deletions tests/Doctrine/Tests/Models/CMS/CmsPhonenumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,12 @@
#[Entity]
class CmsPhonenumber
{
/**
* @var string
*/
/** @var string */
#[Id]
#[Column(length: 50)]
public $phonenumber;

/**
* @var CmsUser
*/
/** @var CmsUser */
#[ManyToOne(targetEntity: 'CmsUser', inversedBy: 'phonenumbers', cascade: ['merge'])]
#[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
public $user;
Expand Down
12 changes: 3 additions & 9 deletions tests/Doctrine/Tests/Models/CMS/CmsTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,17 @@
#[Entity]
class CmsTag
{
/**
* @var int
*/
/** @var int */
#[Id]
#[Column(type: 'integer')]
#[GeneratedValue]
public $id;

/**
* @var string
*/
/** @var string */
#[Column(length: 50, name: 'tag_name', nullable: true)]
public $name;

/**
* @psalm-var Collection<int, CmsUser>
*/
/** @psalm-var Collection<int, CmsUser> */
#[ManyToMany(targetEntity: 'CmsUser', mappedBy: 'tags')]
public $users;

Expand Down
40 changes: 10 additions & 30 deletions tests/Doctrine/Tests/Models/CMS/CmsUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,69 +103,49 @@
#[Entity]
class CmsUser
{
/**
* @var int
*/
/** @var int */
#[Id]
#[Column(type: 'integer')]
#[GeneratedValue]
public $id;

/**
* @var string
*/
/** @var string */
#[Column(type: 'string', length: 50, nullable: true)]
public $status;

/**
* @var string
*/
/** @var string */
#[Column(type: 'string', length: 255, unique: true)]
public $username;

/**
* @psalm-var string|null
*/
/** @psalm-var string|null */
#[Column(type: 'string', length: 255)]
public $name;

/**
* @psalm-var Collection<int, CmsPhonenumber>
*/
/** @psalm-var Collection<int, CmsPhonenumber> */
#[OneToMany(targetEntity: 'CmsPhonenumber', mappedBy: 'user', cascade: ['persist', 'merge'], orphanRemoval: true)]
public $phonenumbers;

/**
* @psalm-var Collection<int, CmsArticle>
*/
/** @psalm-var Collection<int, CmsArticle> */
#[OneToMany(targetEntity: 'CmsArticle', mappedBy: 'user', cascade: ['detach'])]
public $articles;

/**
* @var CmsAddress
*/
/** @var CmsAddress */
#[OneToOne(targetEntity: 'CmsAddress', mappedBy: 'user', cascade: ['persist'], orphanRemoval: true)]
public $address;

/**
* @var CmsEmail
*/
/** @var CmsEmail */
#[OneToOne(targetEntity: 'CmsEmail', inversedBy: 'user', cascade: ['persist'], orphanRemoval: true)]
#[JoinColumn(referencedColumnName: 'id', nullable: true)]
public $email;

/**
* @psalm-var Collection<int, CmsGroup>
*/
/** @psalm-var Collection<int, CmsGroup> */
#[JoinTable(name: 'cms_users_groups')]
#[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
#[InverseJoinColumn(name: 'group_id', referencedColumnName: 'id')]
#[ManyToMany(targetEntity: 'CmsGroup', inversedBy: 'users', cascade: ['persist', 'merge', 'detach'])]
public $groups;

/**
* @var Collection<int, CmsTag>
*/
/** @var Collection<int, CmsTag> */
#[JoinTable(name: 'cms_users_tags')]
#[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
#[InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
Expand Down
4 changes: 1 addition & 3 deletions tests/Doctrine/Tests/Models/Cache/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
#[Entity]
class Action
{
/**
* @psalm-var Collection<int, Token>
*/
/** @psalm-var Collection<int, Token> */
#[OneToMany(targetEntity: 'Token', cascade: ['persist', 'remove'], mappedBy: 'action')]
public $tokens;

Expand Down
8 changes: 2 additions & 6 deletions tests/Doctrine/Tests/Models/Cache/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@
#[Entity]
class Address
{
/**
* @var int
*/
/** @var int */
#[Id]
#[GeneratedValue]
#[Column(type: 'integer')]
public $id;

/**
* @var Person
*/
/** @var Person */
#[JoinColumn(name: 'person_id', referencedColumnName: 'id')]
#[OneToOne(targetEntity: 'Person', inversedBy: 'address')]
public $person;
Expand Down
8 changes: 2 additions & 6 deletions tests/Doctrine/Tests/Models/Cache/Attraction.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,13 @@
#[DiscriminatorMap([1 => 'Restaurant', 2 => 'Beach', 3 => 'Bar'])]
abstract class Attraction
{
/**
* @var int
*/
/** @var int */
#[Id]
#[GeneratedValue]
#[Column(type: 'integer')]
protected $id;

/**
* @psalm-var Collection<int, AttractionInfo>
*/
/** @psalm-var Collection<int, AttractionInfo> */
#[Cache]
#[OneToMany(targetEntity: 'AttractionInfo', mappedBy: 'attraction')]
protected $infos;
Expand Down
4 changes: 1 addition & 3 deletions tests/Doctrine/Tests/Models/Cache/AttractionContactInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#[Entity]
class AttractionContactInfo extends AttractionInfo
{
/**
* @var string
*/
/** @var string */
#[Column(unique: true)]
protected $fone;

Expand Down
8 changes: 2 additions & 6 deletions tests/Doctrine/Tests/Models/Cache/AttractionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,13 @@
#[DiscriminatorMap([1 => 'AttractionContactInfo', 2 => 'AttractionLocationInfo'])]
abstract class AttractionInfo
{
/**
* @var int
*/
/** @var int */
#[Id]
#[GeneratedValue]
#[Column(type: 'integer')]
protected $id;

/**
* @var Attraction
*/
/** @var Attraction */
#[Cache]
#[ManyToOne(targetEntity: 'Attraction', inversedBy: 'infos')]
#[JoinColumn(name: 'attraction_id', referencedColumnName: 'id')]
Expand Down
4 changes: 1 addition & 3 deletions tests/Doctrine/Tests/Models/Cache/AttractionLocationInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#[Entity]
class AttractionLocationInfo extends AttractionInfo
{
/**
* @var string
*/
/** @var string */
#[Column(unique: true)]
protected $address;

Expand Down
Loading

0 comments on commit 9b0506e

Please sign in to comment.