Skip to content

Commit 48a88b9

Browse files
committed
Fixes as per review.
1 parent 9dab0cf commit 48a88b9

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

src/Propel/Common/Config/Loader/FileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function __construct(FileLocatorInterface $locator = null)
6666
public function resolveParams(array $configuration)
6767
{
6868
if ($this->resolved) {
69-
return $configuration;
69+
return [];
7070
}
7171

7272
$this->config = $configuration;

src/Propel/Generator/Builder/Om/AbstractOMBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ public function applyBehaviorModifierBase($hookName, $modifier, &$script, $tab =
982982
* Checks whether any registered behavior content creator on that table exists a contentName
983983
* @param string $contentName The name of the content as called from one of this class methods, e.g. "parentClassName"
984984
* @param string $modifier The name of the modifier object providing the method in the behavior
985-
* @return mixed
985+
* @return string|null
986986
*/
987987
public function getBehaviorContentBase($contentName, $modifier)
988988
{
@@ -993,6 +993,8 @@ public function getBehaviorContentBase($contentName, $modifier)
993993
return $modifier->$contentName($this);
994994
}
995995
}
996+
997+
return null;
996998
}
997999

9981000
/**

src/Propel/Generator/Builder/Om/AbstractObjectBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function applyBehaviorModifier($hookName, &$script, $tab = " ")
202202
/**
203203
* Checks whether any registered behavior content creator on that table exists a contentName
204204
* @param string $contentName The name of the content as called from one of this class methods, e.g. "parentClassName"
205-
* @return mixed
205+
* @return string|null
206206
*/
207207
public function getBehaviorContent($contentName)
208208
{

src/Propel/Generator/Builder/Om/ExtensionQueryBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public function applyBehaviorModifier($hookName, &$script, $tab = " ")
121121
/**
122122
* Checks whether any registered behavior content creator on that table exists a contentName
123123
* @param string $contentName The name of the content as called from one of this class methods, e.g. "parentClassName"
124+
* @return string|null
124125
*/
125126
public function getBehaviorContent($contentName)
126127
{

src/Propel/Generator/Builder/Om/QueryBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,6 +1791,7 @@ public function applyBehaviorModifier($hookName, &$script, $tab = " ")
17911791
/**
17921792
* Checks whether any registered behavior content creator on that table exists a contentName
17931793
* @param string $contentName The name of the content as called from one of this class methods, e.g. "parentClassName"
1794+
* @return string|null
17941795
*/
17951796
public function getBehaviorContent($contentName)
17961797
{

tests/Propel/Tests/Common/Config/Loader/FileLoaderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public function resolveParamsProvider()
5656
'->resolve() supports % escaping by doubling it'
5757
],
5858
[
59-
['foo'=>'bar', 'foo' => ['bar' => ['ding' => 'I\'m a bar %%foo %%bar']]],
60-
['foo'=>'bar', 'foo' => ['bar' => ['ding' => 'I\'m a bar %foo %bar']]],
59+
['foo' => ['bar' => ['ding' => 'I\'m a bar %%foo %%bar']]],
60+
['foo' => ['bar' => ['ding' => 'I\'m a bar %foo %bar']]],
6161
'->resolve() supports % escaping by doubling it'
6262
],
6363
[
@@ -315,15 +315,15 @@ public function testParameterIsNotStringOrNumber()
315315
$this->loader->resolveParams($config);
316316
}
317317

318-
public function testCallResolveParamTwiceReturnNull()
318+
public function testCallResolveParamTwiceReturnsEmpty()
319319
{
320320
$config = [
321321
'foo' => 'bar',
322322
'baz' => '%foo%'
323323
];
324324

325325
$this->assertEquals(['foo' => 'bar', 'baz' => 'bar'], $this->loader->resolveParams($config));
326-
$this->assertNull($this->loader->resolveParams($config));
326+
$this->assertSame([], $this->loader->resolveParams($config));
327327
}
328328
}
329329

0 commit comments

Comments
 (0)