Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pôle IS
Bundles Symfony 2
plantuml-bundle
Commits
839cbfc4
Commit
839cbfc4
authored
May 17, 2016
by
Guillaume Perréal
Browse files
Correction de la normalisation des filtres.
On perdait les clefs, ce qui rendait les filtres inopérants.
parent
dc25b7e4
Changes
1
Show whitespace changes
Inline
Side-by-side
DependencyInjection/Builder/ClassFilterBuilder.php
View file @
839cbfc4
...
@@ -80,16 +80,24 @@ class ClassFilterBuilder
...
@@ -80,16 +80,24 @@ class ClassFilterBuilder
}
}
if
(
is_array
(
$data
))
{
if
(
is_array
(
$data
))
{
$res
=
[];
$res
=
[];
$isList
=
true
;
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
$normalized
=
$this
->
normalize
(
$v
);
$normalized
=
$this
->
normalize
(
$v
);
if
(
!
empty
(
$normalized
))
{
if
(
!
empty
(
$normalized
))
{
$res
[
$k
]
=
$normalized
;
$res
[
$k
]
=
$normalized
;
if
(
!
is_int
(
$k
))
{
$isList
=
false
;
}
}
}
}
}
if
(
empty
(
$res
))
{
if
(
empty
(
$res
))
{
return
null
;
return
null
;
}
}
if
(
$isList
)
{
sort
(
$res
);
sort
(
$res
);
}
else
{
ksort
(
$res
);
}
return
$res
;
return
$res
;
}
}
return
$data
;
return
$data
;
...
...
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