Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Commit a3990d9

Browse files
committed
Merge pull request #407 from ins0/fix/cleanup
Feature: Removed fluid interface from module entity/interface
2 parents 3038e1a + a8f38a4 commit a3990d9

3 files changed

Lines changed: 7 additions & 40 deletions

File tree

module/ZfModule/src/ZfModule/Entity/Module.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,10 @@ public function getPhotoUrl()
5656

5757
/**
5858
* @param string $photoUrl
59-
* @return self
6059
*/
6160
public function setPhotoUrl($photoUrl)
6261
{
6362
$this->photoUrl = $photoUrl;
64-
65-
return $this;
6663
}
6764

6865
/**
@@ -75,13 +72,10 @@ public function getOwner()
7572

7673
/**
7774
* @param string $owner
78-
* @return self
7975
*/
8076
public function setOwner($owner)
8177
{
8278
$this->owner = $owner;
83-
84-
return $this;
8579
}
8680

8781
/**
@@ -94,13 +88,10 @@ public function getUpdatedAt()
9488

9589
/**
9690
* @param string $updatedAt
97-
* @return self
9891
*/
9992
public function setUpdatedAt($updatedAt)
10093
{
10194
$this->updatedAt = $updatedAt;
102-
103-
return $this;
10495
}
10596

10697
/**
@@ -121,13 +112,10 @@ public function getCreatedAtDateTime()
121112

122113
/**
123114
* @param string $createdAt
124-
* @return self
125115
*/
126116
public function setCreatedAt($createdAt)
127117
{
128118
$this->createdAt = $createdAt;
129-
130-
return $this;
131119
}
132120

133121
/**
@@ -140,13 +128,10 @@ public function getId()
140128

141129
/**
142130
* @param int $id
143-
* @return self
144131
*/
145132
public function setId($id)
146133
{
147134
$this->id = (int) $id;
148-
149-
return $this;
150135
}
151136

152137
/**
@@ -159,13 +144,10 @@ public function getUrl()
159144

160145
/**
161146
* @param string $url
162-
* @return self
163147
*/
164148
public function setUrl($url)
165149
{
166150
$this->url = $url;
167-
168-
return $this;
169151
}
170152

171153
/**
@@ -178,13 +160,10 @@ public function getDescription()
178160

179161
/**
180162
* @param string $description
181-
* @return self
182163
*/
183164
public function setDescription($description)
184165
{
185166
$this->description = $description;
186-
187-
return $this;
188167
}
189168

190169
/**
@@ -197,12 +176,9 @@ public function getName()
197176

198177
/**
199178
* @param string $name
200-
* @return self
201179
*/
202180
public function setName($name)
203181
{
204182
$this->name = $name;
205-
206-
return $this;
207183
}
208184
}

module/ZfModule/src/ZfModule/Entity/ModuleInterface.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ interface ModuleInterface
66
{
77
/**
88
* Get Owner
9+
*
910
* @return string
1011
*/
1112
public function getOwner();
1213

1314
/**
1415
* Set Owner
16+
*
17+
* @param string
1518
*/
1619
public function setOwner($owner);
1720

@@ -21,8 +24,11 @@ public function setOwner($owner);
2124
* @return string
2225
*/
2326
public function getPhotoUrl();
27+
2428
/**
2529
* Set Photo URL
30+
*
31+
* @param string
2632
*/
2733
public function setPhotoUrl($photoUrl);
2834

@@ -35,6 +41,7 @@ public function getUpdatedAt();
3541

3642
/**
3743
* Set Updated at
44+
*
3845
* @param int $updatedAt
3946
*/
4047
public function setUpdatedAt($updatedAt);
@@ -64,7 +71,6 @@ public function getId();
6471
* Set id.
6572
*
6673
* @param int $id
67-
* @return ModuleInterface
6874
*/
6975
public function setId($id);
7076

@@ -79,7 +85,6 @@ public function getUrl();
7985
* Set Url
8086
*
8187
* @param string $url
82-
* @return ModuleInterface
8388
*/
8489
public function setUrl($url);
8590

@@ -94,7 +99,6 @@ public function getDescription();
9499
* Set Description
95100
*
96101
* @param string $description
97-
* @return ModuleInterface
98102
*/
99103
public function setDescription($description);
100104

@@ -109,7 +113,6 @@ public function getName();
109113
* Set Name
110114
*
111115
* @param string $name
112-
* @return ModuleInterface
113116
*/
114117
public function setName($name);
115118
}

module/ZfModule/test/ZfModuleTest/Entity/ModuleTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,6 @@ public function testDefaults()
3131
$this->assertNull($this->module->getUpdatedAt());
3232
}
3333

34-
public function testFluentInterface()
35-
{
36-
$this->assertSame($this->module, $this->module->setId(9000));
37-
$this->assertSame($this->module, $this->module->setName('foo'));
38-
$this->assertSame($this->module, $this->module->setDescription('bar'));
39-
$this->assertSame($this->module, $this->module->setOwner('John Doe'));
40-
$this->assertSame($this->module, $this->module->setPhotoUrl('http://www.example.com/photo.jpg'));
41-
$this->assertSame($this->module, $this->module->setUrl('http://www.example.com'));
42-
$this->assertSame($this->module, $this->module->setCreatedAt('2013-02-28 13:05:00'));
43-
$this->assertSame($this->module, $this->module->setUpdatedAt('2013-02-28 13:05:00'));
44-
}
45-
4634
public function testSetOwner()
4735
{
4836
$owner = 'johndoe';

0 commit comments

Comments
 (0)