senttor / trainingsortinglibrary-project
This is a training library for sorting array
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.13
This package is auto-updated.
Last update: 2025-06-06 11:10:56 UTC
README
This is a test Sorting library.
Installation
For creating new project based on this template just execute the following command
$ composer require senttor/trainingsortinglibrary-project
NOTE: You can add
--no-dev
right aftercreate-project
flag if you don't want to install dev dependencies to your project
Main changes that you need to do:
-
Update
name
,description
,keywords
,authors
section of thecomposer.json
file, lines 2-4, 9-10. -
Update header template in
.php_cs
file, lines 4-9. -
Update copyright in
LICENSE
file, line 3.
Other changes that you may do:
-
Change namespace for source code in
composer.json
, line 23 and for tests line 28. -
Change PHP version in
composer.json
line 15. -
Change rules for code style in
.php_cs
file. -
Add some new files and directories to
.gitignore
file to exclude them from Git. -
Update readme according to your project
-
Update changelog according to your project
Usage
input value
1.$stringArray = ['first', 'second', 'third', 'fourth'];
goal - asc sorting Choosing Asc sort
2. $asc_sort = new \Vendor\Sorting\AscSorting();
$strategy_asc = new \Vendor\Sorting\Strategy( $asc_sort );
sorting...
$strategy_asc->sorting($stringArray)
Code style fixer
To fix the code style just run the following command
$ composer cs-fix
License
This project is released under the terms of the BSD-3-Clause license.
Copyright (c) 2018, c