Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
9b596895
Commit
9b596895
authored
Mar 17, 2010
by
jwage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Fixing coding standards of sandbox entities
parent
90d28839
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
14 deletions
+25
-14
Address.php
tools/sandbox/Entities/Address.php
+13
-8
User.php
tools/sandbox/Entities/User.php
+12
-6
No files found.
tools/sandbox/Entities/Address.php
View file @
9b596895
...
...
@@ -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
tools/sandbox/Entities/User.php
View file @
9b596895
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment