Skip to content

Commit 23f2a9b

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: fixed CS SCA with Php Inspections (EA Extended): 2.7 Remove deprecated each function Fixed PHPdoc return references in FormBuilderInterface [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()
2 parents b5ec089 + 5e72d61 commit 23f2a9b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ChoiceList/Factory/DefaultChoiceListFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
8989

9090
if (!is_callable($preferredChoices) && !empty($preferredChoices)) {
9191
$preferredChoices = function ($choice) use ($preferredChoices) {
92-
return false !== array_search($choice, $preferredChoices, true);
92+
return in_array($choice, $preferredChoices, true);
9393
};
9494
}
9595

FormBuilderInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
2727
* @param string|FormTypeInterface $type
2828
* @param array $options
2929
*
30-
* @return $this
30+
* @return self
3131
*/
3232
public function add($child, $type = null, array $options = array());
3333

@@ -58,7 +58,7 @@ public function get($name);
5858
*
5959
* @param string $name
6060
*
61-
* @return $this
61+
* @return self
6262
*/
6363
public function remove($name);
6464

FormRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,6 @@ public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $va
316316
*/
317317
public function humanize($text)
318318
{
319-
return ucfirst(trim(strtolower(preg_replace(array('/([A-Z])/', '/[_\s]+/'), array('_$1', ' '), $text))));
319+
return ucfirst(strtolower(trim(preg_replace(array('/([A-Z])/', '/[_\s]+/'), array('_$1', ' '), $text))));
320320
}
321321
}

0 commit comments

Comments
 (0)