mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-14 06:07:18 +02:00
Merged Pull Request Introduce code formatting with PHP-CS-Fixer
This commit is contained in:
@@ -1,36 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use App\Entity\NodeInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait ChildsAttribut {
|
||||
|
||||
trait ChildsAttribut
|
||||
{
|
||||
/**
|
||||
* Many Nodes have many childs
|
||||
* Many Nodes have many childs.
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity="Node")
|
||||
* @ORM\JoinTable(name="nodes_childs",
|
||||
* joinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")},
|
||||
* inverseJoinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")}
|
||||
* )
|
||||
*
|
||||
* @var ArrayCollection|NodeInterface[]
|
||||
*/
|
||||
protected $childs;
|
||||
|
||||
|
||||
public function getChilds(): ArrayCollection
|
||||
{
|
||||
return $this->getChilds();
|
||||
}
|
||||
|
||||
|
||||
public function setChilds(ArrayCollection $childs): void
|
||||
{
|
||||
$this->childs = $childs;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface ChildsAttributeInterface
|
||||
{
|
||||
public function setChilds(ArrayCollection $childs):void;
|
||||
|
||||
public function getChilds():ArrayCollection;
|
||||
}
|
||||
public function setChilds(ArrayCollection $childs): void;
|
||||
|
||||
public function getChilds(): ArrayCollection;
|
||||
}
|
||||
|
@@ -1,29 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait IdAttribut {
|
||||
trait IdAttribut
|
||||
{
|
||||
/**
|
||||
* @ORM\Id()
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")(strategy="AUTO")
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
|
||||
public function setId(int $id): void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,15 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface IdAttributInterface
|
||||
{
|
||||
public function setId(int $id): void;
|
||||
|
||||
|
||||
public function getId(): int;
|
||||
}
|
||||
|
||||
|
@@ -1,30 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use App\Entity\NodeInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait NodeAttribut{
|
||||
trait NodeAttribut
|
||||
{
|
||||
/**
|
||||
* @var NodeInterface
|
||||
* @ORM\OneToOne(targetEntity="Node")
|
||||
* @ORM\JoinColumn(name="node_id", referencedColumnName="id")
|
||||
*/
|
||||
protected $node;
|
||||
|
||||
|
||||
public function setNode(NodeInterface $node): void
|
||||
{
|
||||
$this->node = $node;
|
||||
}
|
||||
|
||||
|
||||
public function getNode(): NodeInterface
|
||||
{
|
||||
return $this->node;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1,17 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use App\Entity\NodeInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface NodeAttributInterface
|
||||
{
|
||||
public function setNode(NodeInterface $node):void;
|
||||
|
||||
public function getNode():NodeInterface;
|
||||
}
|
||||
public function setNode(NodeInterface $node): void;
|
||||
|
||||
public function getNode(): NodeInterface;
|
||||
}
|
||||
|
@@ -1,24 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use App\Entity\NodeInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait ParentAttribut {
|
||||
|
||||
trait ParentAttribut
|
||||
{
|
||||
/**
|
||||
* Many Nodes have many parents
|
||||
* Many Nodes have many parents.
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity="Node")
|
||||
* @ORM\JoinTable(name="nodes_parents",
|
||||
* joinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")},
|
||||
* inverseJoinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")}
|
||||
* )
|
||||
*
|
||||
* @var ArrayCollection|NodeInterface[]
|
||||
*/
|
||||
protected $parents;
|
||||
@@ -33,4 +33,3 @@ trait ParentAttribut {
|
||||
$this->parents = $parents;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,17 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface ParentsAttributInterface
|
||||
{
|
||||
public function setParents(ArrayCollection $parents):void;
|
||||
|
||||
public function getParents():ArrayCollection;
|
||||
}
|
||||
public function setParents(ArrayCollection $parents): void;
|
||||
|
||||
public function getParents(): ArrayCollection;
|
||||
}
|
||||
|
@@ -1,24 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait PasswordAttribut {
|
||||
trait PasswordAttribut
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="string", length=64)
|
||||
*/
|
||||
protected $password;
|
||||
|
||||
public function getPassword():?string
|
||||
|
||||
public function getPassword(): ?string
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
public function setPassword(string $password):void{
|
||||
|
||||
public function setPassword(string $password): void
|
||||
{
|
||||
$this->password = $password;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,18 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait PlainPasswordAttribute {
|
||||
|
||||
trait PlainPasswordAttribute
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @Assert\NotBlank()
|
||||
* @Assert\Length(max=4096)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $plainPassword;
|
||||
@@ -27,4 +27,3 @@ trait PlainPasswordAttribute {
|
||||
$this->plainPassword = $password;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,27 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use App\Entity\SourceInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait SourceAttribut {
|
||||
trait SourceAttribut
|
||||
{
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="AbstractSource")
|
||||
* @ORM\JoinColumn(name="source_id", referencedColumnName="id")
|
||||
*
|
||||
* @var SourceInterface
|
||||
*/
|
||||
protected $source;
|
||||
|
||||
public function getSource():SourceInterface{
|
||||
|
||||
public function getSource(): SourceInterface
|
||||
{
|
||||
return $this->source;
|
||||
}
|
||||
|
||||
public function setSource(SourceInterface $source):void{
|
||||
|
||||
public function setSource(SourceInterface $source): void
|
||||
{
|
||||
$this->source = $source;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,17 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use App\Entity\SourceInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface SourceAttributInterface
|
||||
{
|
||||
public function getSource():SourceInterface;
|
||||
|
||||
public function setSource(SourceInterface $source):void;
|
||||
}
|
||||
public function getSource(): SourceInterface;
|
||||
|
||||
public function setSource(SourceInterface $source): void;
|
||||
}
|
||||
|
@@ -1,25 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
/**
|
||||
* This trait doesn't need an own interface because it's covered by symfony
|
||||
* This trait doesn't need an own interface because it's covered by symfony.
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait UsernameAttribut{
|
||||
|
||||
trait UsernameAttribut
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="string", length=25, unique=true)
|
||||
*/
|
||||
protected $username;
|
||||
|
||||
public function getUsername():?string
|
||||
|
||||
public function getUsername(): ?string
|
||||
{
|
||||
return $this->username;
|
||||
}
|
||||
|
||||
public function setUsername(string $username):void{
|
||||
|
||||
public function setUsername(string $username): void
|
||||
{
|
||||
$this->username = \trim($username);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user