Download the PHP package josantonius/algorithm without Composer
On this page you can find all versions of the php package josantonius/algorithm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download josantonius/algorithm
More information about josantonius/algorithm
Files in josantonius/algorithm
Package algorithm
Short Description Class with algorithms to solve and display mathematical sequences.
License MIT
Informations about the package algorithm
PHP Algorithm class
Translations: Español
Class with algorithms to solve and display mathematical sequences.
- Requirements
- Installation
- Available Methods
- Quick Start
- Usage
- Tests
- Changelog
- Contribution
- Sponsor
- License
Requirements
This class is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher...
Installation
The preferred way to install this extension is through Composer.
To install PHP Algorithm class, simply:
The previous command will only install the necessary files, if you prefer to download the entire source code you can use:
You can also clone the complete repository with Git:
Or install it manually:
Available Methods
Available methods in this class:
Print "Look-and-Say" sequence
Attribute | Description | Type | Required | Default |
---|---|---|---|---|
$lastSequence | Initial value to start the sequence | int | No | 1 |
$maxLines | Maximum lines number to show | int | No | 15 |
# Return (string) → Sequence.
Quick Start
To use this class with Composer:
Or If you installed it manually, use it:
Usage
Example of use for this class:
Tests
To run composer and to execute the following:
Run unit tests with PHPUnit:
Run PSR2 code standard tests with PHPCS:
Run PHP Mess Detector tests to detect inconsistencies in code style:
Run all previous tests:
Changelog
Detailed changes for each release are documented in the release notes.
Contribution
Please make sure to read the Contributing Guide, before making a pull request, start a discussion or report a issue.
Thanks to all contributors to this project! :heart:
Sponsor
If you found this interesting, you can become my sponsor! :blush:
License
This project is licensed under the MIT License.
Copyright © 2017-2022, Josantonius