Download the PHP package michael34435/php-ranker without Composer

On this page you can find all versions of the php package michael34435/php-ranker. 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 php-ranker

php-ranker

Build Status Code Climate

What's php-ranker?

php-ranker is a command line based parser to parse xml format report file generated by phpmd, phpcs and phpcpd.
All scores calculated by php-ranker are based on codeclimate except duplication report from phpcpd, because codeclimate use their own analysis tool(flay) to identify the code block is identical or similar but phpcpd cannot do it.

What metric do php-ranker use?

There are three dimensions php-ranker taken.

How grades are calculated?

What's GPA(Grade Point Average)?

All grades are following GPA(Grade Point Average) a concept to determine you is good or bad in average in U.S school, most of it are 4-point-rule.

How to calculate it?

In general, GPA is four-point, it means the greatest student gets 4-point while the worst gets 0-point in this subject.
And we'll end up getting an average score from a person.
Like this chart:

Grade Point
A 4.0
B 3.0
C 2.0
D 1.0
F 0.0

For example, there is a student who gets two A's(represents 4-point) and one B(represents 3-point) and we will get a formula -> (2 x 4 + 3) / (2 + 1) = 3.67
3.67 is the final score for this student.

How php-ranker get file score

You have to add a config file named .php-ranker(see .php-ranker.example) in your project and composer require php-ranker.
Then php-ranker will read your config file and glob them to compare violation report from phpcs, phpmd or phpcpd.
Finally, php-ranker gives each file a point below.(all rules are following codeclimate)

Points Rank
0-2M A
>2M-4M B
>4M-8M C
>8M-16M D
>16M F

So your file will get a total point and php-ranker converts it to alphabetic rank finally.

How php-ranker get total GPA

All GPAs are based on file size.
For example, php-ranker finds three files

Filename Rank Lines
Foo.php A 100
FooBar.php A 200
Bar.php F 1000

Foo.php A rank represent 4 point
FooBar.php A rank represent 4 point, too
But Bar.php is too bad to get score and get 0 point.

And we can find a formula -> (4 x 100 + 4 x 200 + 0 x 1000) / (200 + 100 + 1000) = 0.93

0.93 is the total GPA score for these files.

How to use php-ranker

Install

Composer

Phar

Usage

Notice

Version 0.01 and 0.02 only support jenkins report, i would like to recommend you to upgrade to 1.0.0 or dev-master ASAP.


All versions of php-ranker with dependencies

PHP Build Version
Package Version
Requires phpmd/phpmd Version ^2.5
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 michael34435/php-ranker contains the following files

Loading the files please wait ....