Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iqdevTranningProj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Александр Плохих
iqdevTranningProj
Merge requests
!8
make controller
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
make controller
PTPS|Controller_8
into
main
Overview
1
Commits
3
Pipelines
0
Changes
5
1 unresolved thread
Hide all comments
Merged
Александр Плохих
requested to merge
PTPS|Controller_8
into
main
11 months ago
Overview
1
Commits
3
Pipelines
0
Changes
5
1 unresolved thread
Hide all comments
Expand
0
0
Merge request reports
Viewing commit
4ebf14ce
Show latest version
5 files
+
142
−
15
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
4ebf14ce
symplify controller
· 4ebf14ce
Александр Плохих
authored
11 months ago
src/Actions/SortPriceAction.php
+
3
−
7
Options
@@ -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