Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mikael Salson
alecsia
Commits
632eab7f
Commit
632eab7f
authored
Jan 14, 2019
by
Mikael Salson
Browse files
ObjectSort.php: Syntax didn't work with PHP7
parent
b414f82f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Alecsia/AnnotationBundle/Twig/Extension/ObjectSort.php
View file @
632eab7f
...
...
@@ -9,7 +9,8 @@ function basic_sort($key, $comparison) {
return
function
(
$first
,
$second
)
use
(
$key
,
$comparison
)
{
if
(
is_array
(
$key
))
{
for
(
$i
=
0
;
$i
<
count
(
$key
);
$i
++
)
{
$result
=
$comparison
(
$first
->
$key
[
$i
](),
$second
->
$key
[
$i
]());
$member_function
=
$key
[
$i
];
$result
=
$comparison
(
$first
->
$member_function
(),
$second
->
$member_function
());
if
(
$result
!=
0
)
return
$result
;
}
...
...
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