Commit 48db467c authored by nicola85's avatar nicola85

Code standard

parent cf368ff2
......@@ -3,7 +3,7 @@
/**
* Merge non blocking events so that we display them as a continuous single event.
*
* @param $events array
* @param array $events
*
* @return array
*/
......
......@@ -112,8 +112,6 @@ class UnitIndex extends ServiceDefinitionBase implements ContainerFactoryPluginI
$unit_types = $request->query->get('types');
$unit_ids = $request->query->get('ids');
$return_children = TRUE;
$create_event_access = FALSE;
if (bat_event_access(bat_event_create(['type' => $event_type]), 'create', $this->currentUser) == AccessResult::allowed()) {
$create_event_access = TRUE;
......@@ -159,19 +157,11 @@ class UnitIndex extends ServiceDefinitionBase implements ContainerFactoryPluginI
foreach ($childrens as $type_id => $children) {
$unit_type = bat_type_load($type_id);
if ($return_children) {
$units[] = [
'id' => $unit_type->id(),
'title' => $unit_type->label(),
'children' => $children,
];
}
else {
$units[] = [
'id' => $unit_type->id(),
'title' => $unit_type->label(),
];
}
$units[] = [
'id' => $unit_type->id(),
'title' => $unit_type->label(),
'children' => $children,
];
}
}
......
......@@ -24,10 +24,8 @@ class BatApiMiddleware implements HttpKernelInterface {
/**
* Constructs a BatApiMiddleware object.
*
* @param \Symfony\Component\HttpKernel\HttpKernelInterface $kernel
* @param \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel
* The decorated kernel.
* @param mixed $optional_argument
* (optional) An optional argument.
*/
public function __construct(HttpKernelInterface $http_kernel) {
$this->httpKernel = $http_kernel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment