PSR-2 fixes
This commit is contained in:
parent
518fe175b8
commit
aaf09e61c1
|
@ -53,7 +53,7 @@ class FormatTalksExtension extends Twig_Extension
|
||||||
*/
|
*/
|
||||||
public function getUpcoming($talks, array $eventData = [])
|
public function getUpcoming($talks, array $eventData = [])
|
||||||
{
|
{
|
||||||
return $this->format($talks, $eventData)
|
return $this->format($talks, $eventData)
|
||||||
->filter(function ($talk) {
|
->filter(function ($talk) {
|
||||||
return $talk['event']['date'] >= $this->today;
|
return $talk['event']['date'] >= $this->today;
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function tap($value, $callback) {
|
function tap($value, $callback)
|
||||||
|
{
|
||||||
$callback($value);
|
$callback($value);
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|
|
@ -27,7 +27,7 @@ class FormatTalksTest extends TestCase
|
||||||
*/
|
*/
|
||||||
public function testFormat()
|
public function testFormat()
|
||||||
{
|
{
|
||||||
$event_data = [
|
$event_data = [
|
||||||
'event-a' => [
|
'event-a' => [
|
||||||
'name' => 'Event A',
|
'name' => 'Event A',
|
||||||
'location' => 'Somewhere',
|
'location' => 'Somewhere',
|
||||||
|
@ -40,7 +40,7 @@ class FormatTalksTest extends TestCase
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$talks = [
|
$talks = [
|
||||||
[
|
[
|
||||||
'title' => 'Talk A',
|
'title' => 'Talk A',
|
||||||
'events' => [
|
'events' => [
|
||||||
|
|
Reference in a new issue