Skip to content
Snippets Groups Projects

make controller

Merged Александр Плохих requested to merge PTPS|Controller_8 into main
1 unresolved thread
5 files
+ 142
15
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -2,19 +2,15 @@
namespace App\Actions;
use App\Entity\InterfaceDataEntity;
class SortPriceAction implements InterfaceAction
class SortPriceAction
{
/**
* Выполняет сортировку массива по убыванию цены
* @param InterfaceDataEntity $model
* @param array $array
* @return array отсортированный
*/
public function act(InterfaceDataEntity $model): array
public function act(array $array): array
{
$array = $model->prices;
$priceColumn = array_column($array, "price");
$countColumn = array_column($array, "count");
Loading