Download the PHP package monomelodies/codein without Composer

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

monomelodies/codein

Code analysis, creation and modification library

Installation

Usage

Codein is a CLI tool to inspect PHP files or directories of PHP files for code smells. It currently works best on classes.

If the supplied argument is a PHP file, just that file is analysed. If it is a directory, all PHP files in it are scanned.

Options

-r|--recursive Recursively iterate underlying directories --check=name/of/check One or more names of things to check

Adding checks

By default, Codein only scans for PHP parsing errors (hopefully, your editor is already set up to do that!). To make it more useful, one should add plugins.

Why plugins one might ask? Well, my coding style isn't going to be yours, and what I consider a code smell (missing return type hint, for instance) might be perfectly valid in your codebase (because you need to support legacy PHP versions, for instance).

Let's add a check for those return type hints:

Writing plugins

Each plugin should extend Sensi\Codein\Check. The grunt of the work is done in the check method. It takes a single argument (the name of the file to check) and returns a Generator. Every time your plugin encounters a code smell, it should yield a string containing an error message. You can use the builtin extractClass method to get the name of the class contained in the file, allowing you to inspect.

Codein auto-appends the classname Check to the namespace specified in the --check=... option. Normal namespace resolution rules are applied:

E.g., monomelodies/codein-typehints resolves to the class Monomelodies\CodeinTypehints\Check.

Look at existing plugins to get a feel for this.

The yielded messages are formatted using simple ansi colors, with a "<reset>\n" automatically appended. You can play with the colors; use for something really bad, for a warning etc.

The codein.json config file

Codein looks for a codein.json config file in the current working directory. It allows you to specify a few things:


All versions of codein with dependencies

PHP Build Version
Package Version
Requires simoneast/simple-ansi-colors Version ^1.0
monolyth/cliff Version ^0.7.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 monomelodies/codein contains the following files

Loading the files please wait ....