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
pkg:composer/senttor/trainingsortinglibrary-project
Requires
- php: >=7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.13
This package is auto-updated.
Last update: 2025-11-06 12:03:05 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-devright aftercreate-projectflag if you don't want to install dev dependencies to your project
Main changes that you need to do:
-
Update
name,description,keywords,authorssection of thecomposer.jsonfile, lines 2-4, 9-10. -
Update header template in
.php_csfile, lines 4-9. -
Update copyright in
LICENSEfile, 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.jsonline 15. -
Change rules for code style in
.php_csfile. -
Add some new files and directories to
.gitignorefile 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