Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Applied fixes from FlintCI
Browse files Browse the repository at this point in the history
  • Loading branch information
soullivaneuh authored and OskarStark committed Apr 24, 2019
1 parent 2af74ef commit d4f32ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Block/TreeBlockService.php
Expand Up @@ -69,13 +69,13 @@ public function configureSettings(OptionsResolver $resolver)
// the callables are a workaround to make bundle configuration win over the default values
// see https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/345
$resolver->setDefaults([
'template' => function (Options $options, $value) {
'template' => static function (Options $options, $value) {
return $value ?: '@SonataDoctrinePHPCRAdmin/Block/tree.html.twig';
},
'id' => function (Options $options, $value) {
'id' => static function (Options $options, $value) {
return $value ?: '/';
},
'selected' => function (Options $options, $value) {
'selected' => static function (Options $options, $value) {
return $value ?: null;
},
'routing_defaults' => function (Options $options, $value) {
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/TreeModelType.php
Expand Up @@ -88,7 +88,7 @@ public function configureOptions(OptionsResolver $resolver)
'parent' => 'choice',
'repository_name' => 'default',
'preferred_choices' => [],
'choice_list' => function (Options $options, $previousValue) {
'choice_list' => static function (Options $options, $previousValue) {
return new ModelChoiceList(
$options['model_manager'],
$options['class'],
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/Filter/CallBackFilterTest.php
Expand Up @@ -21,7 +21,7 @@ class CallBackFilterTest extends BaseTestCase
public function testFilterNullData()
{
$filter = new CallbackFilter();
$filter->initialize('field_name', ['callback' => function () {
$filter->initialize('field_name', ['callback' => static function () {
}]);
$res = $filter->filter($this->proxyQuery, null, 'somefield', null);
$this->assertNull($res);
Expand All @@ -32,7 +32,7 @@ public function testFilterEmptyArrayData()
{
$filter = new CallbackFilter();

$filter->initialize('field_name', ['callback' => function () {
$filter->initialize('field_name', ['callback' => static function () {
}]);
$res = $filter->filter($this->proxyQuery, null, 'somefield', []);
$this->assertNull($res);
Expand Down Expand Up @@ -78,7 +78,7 @@ public function testFilterClosure()

$filter = new CallbackFilter();
$filter->initialize('field_name', [
'callback' => function (ProxyQueryInterface $proxyQuery, $alias, $field, $data) {
'callback' => static function (ProxyQueryInterface $proxyQuery, $alias, $field, $data) {
$queryBuilder = $proxyQuery->getQueryBuilder();
$queryBuilder->andWhere()->eq()->field('a.'.$field)->literal($data['value']);

Expand Down

0 comments on commit d4f32ba

Please sign in to comment.