Download the PHP package astronati/fantasy-football-calculator without Composer

On this page you can find all versions of the php package astronati/fantasy-football-calculator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fantasy-football-calculator

Build Status Codacy Badge Codacy Badge Dependency Status Latest Stable Version

Fantasy Football Calculator

This library allows user to calculate the points that a team has reached after a soccer match. The total can be altered through some bonus like the defense one.

Installation

You can install the library and its dependencies using composer running:

Usage

The library returns a result:

Rules

Calculator can be configured with different rules in order to apply different bonus/malus to the final result. Rules can be applied to a single team or in a match context: take a look at following folders to see which bonus are supported:

Each rule can be added to the Calculator configuration as shown in the example as follows.

NOTE: To request another rule please file a new issue.

Formation and Footballers

Calculator needs one or two formations: so developer has to provide Formation instances.

NOTE Footballer abstract class needs to be extended by developer that has to set the code property. The code property is the one provided by the Quotation(s) instances.

Take a look at the Footballer class that has been implemented in the example folder.

Example

A couple of examples are provided in order to figure out better how this library can be integrated in the own system.

Match Result

The following snippet is extracted from the example/sample.php file and shows how configuring a calculator in a match.

Result

The following snippet is extracted from the example/sample.php file and shows how configuring a calculator when a fantasyteam plays alone or against all others.

Development

The environment requires phpunit, that has been already included in the dev-dependencies of the composer.json.

Dependencies

To install all modules you just need to run following command:

Testing

Tests files are created in dedicates folders that replicate the src structure as follows:

Execute following command to run the tests suite:

Run what follows to see the code coverage:

License

This package is released under the MIT license.


All versions of fantasy-football-calculator with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
astronati/fantasy-football-quotations-parser Version ^3.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package astronati/fantasy-football-calculator contains the following files

Loading the files please wait ....