From 9b5968957d0150f268a3f8ff689ee701163c2d59 Mon Sep 17 00:00:00 2001 From: jwage Date: Wed, 17 Mar 2010 14:09:17 +0000 Subject: [PATCH] [2.0] Fixing coding standards of sandbox entities --- tools/sandbox/Entities/Address.php | 21 +++++++++++++-------- tools/sandbox/Entities/User.php | 18 ++++++++++++------ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/tools/sandbox/Entities/Address.php b/tools/sandbox/Entities/Address.php index bb084c30e..717ea63a1 100644 --- a/tools/sandbox/Entities/Address.php +++ b/tools/sandbox/Entities/Address.php @@ -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 diff --git a/tools/sandbox/Entities/User.php b/tools/sandbox/Entities/User.php index 95487f570..19ae4d553 100644 --- a/tools/sandbox/Entities/User.php +++ b/tools/sandbox/Entities/User.php @@ -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);