ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
BySize.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
32{
33 protected function sortResourceIdentification(array $identifications): array
34 {
35 usort($identifications, function (ResourceIdentification $a, ResourceIdentification $b): int {
36 $a_size = $this->resource_builder->get($a)->getCurrentRevision()->getInformation()->getSize();
37 $b_size = $this->resource_builder->get($b)->getCurrentRevision()->getInformation()->getSize();
38 return $a_size - $b_size;
39 });
40 return $identifications;
41 }
42}
sortResourceIdentification(array $identifications)
Definition: BySize.php:33
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples