|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not yet rated by the users||Total: 105 ||All time: 9,484 This week: 170|
This package can detect the type of project license text.
It can take as parameters the text of a license given in the format of a string or a file that contains the license text.
The package can detect the type of license by checking the similarity of the text of the given license with other well known types of license provided by this package as license files.
|There are many types of licenses being used by software projects to distribute their code and other types of files. Some of those licenses are just variants of each other.
This package can be used to analyse a license text and detect its type of license comparing with a list of well known licenses that are more popular and are provided withing the package.
A License information detector, inspired by Licensee and relies on data from
Using Composer run the following
$ composer require sycho/license-detector
The code uses php's
similar_text() function to tell which license is the one used, the function is quiet expensive and can take up to one second for the results.
parseByPath() methods, you get a
License object containing data about the license
$detector = new Detector();
// By license contents
$license = $detector->parse($contents);
// By file path
$license = $detector->parseByPath($path_to_license);
Sign-off your commits, to acknowledge your submission under the license of the project.
Signed-off-by: Your Name <email@example.com>
This package is released under the MIT License. A full copy of this license is included in the package file.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.