Commit 9b596895 authored by jwage's avatar jwage

[2.0] Fixing coding standards of sandbox entities

parent 90d28839
......@@ -3,7 +3,8 @@
namespace Entities;
/** @Entity @Table(name="addresses") */
class Address {
class Address
{
/**
* @Id @Column(type="integer")
* @GeneratedValue(strategy="AUTO")
......@@ -14,27 +15,31 @@ class Address {
/** @OneToOne(targetEntity="User", mappedBy="address") */
private $user;
public function getId() {
public function getId()
{
return $this->id;
}
public function getStreet() {
public function getStreet()
{
return $this->street;
}
public function setStreet($street) {
public function setStreet($street)
{
$this->street = $street;
}
public function getUser() {
public function getUser()
{
return $this->user;
}
public function setUser(User $user) {
public function setUser(User $user)
{
if ($this->user !== $user) {
$this->user = $user;
$user->setAddress($this);
}
}
}
}
\ No newline at end of file
......@@ -3,7 +3,8 @@
namespace Entities;
/** @Entity @Table(name="users") */
class User {
class User
{
/**
* @Id @Column(type="integer")
* @GeneratedValue(strategy="AUTO")
......@@ -17,23 +18,28 @@ class User {
*/
private $address;
public function getId() {
public function getId()
{
return $this->id;
}
public function getName() {
public function getName()
{
return $this->name;
}
public function setName($name) {
public function setName($name)
{
$this->name = $name;
}
public function getAddress() {
public function getAddress()
{
return $this->address;
}
public function setAddress(Address $address) {
public function setAddress(Address $address)
{
if ($this->address !== $address) {
$this->address = $address;
$address->setUser($this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment