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 25, 2022
1 parent d46f67b commit ef4543d
Show file tree
Hide file tree
Showing 356 changed files with 1,193 additions and 3,469 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 @@ -25,21 +25,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 @@ -50,9 +44,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
42 changes: 11 additions & 31 deletions tests/Doctrine/Tests/Models/CMS/CmsUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

namespace Doctrine\Tests\Models\CMS;

use Doctrine\ORM\Mapping\InverseJoinColumn;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\InverseJoinColumn;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\JoinTable;
use Doctrine\ORM\Mapping\ManyToMany;
Expand All @@ -23,69 +23,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
Loading

0 comments on commit ef4543d

Please sign in to comment.