sras/cliche

A package for managing classes

1.2.0 2014-06-05 09:42 UTC

This package is not auto-updated.

Last update: 2020-08-17 10:18:12 UTC


README

Introduction

Cliche is a PHP CLI tool that uses static analysis, Reflection API and a projects auto loading routines to provide a set of tools for managing and working with class files.

Requirements

  1. PHP version > 5.5
  2. Tokenizer library
  3. Availability of some kind of autoloading.

Features

  1. When you have to create a new class, you can just specify the fully qualified name of the class and Cliche will create the class file in the correct directory, as dictated by your autoloader.

  2. Cliche can check for cyclic dependencies for classes that are loaded from dependency injection containers like pimple. Cliche can check the number of arguments passed to the constructors in a container file satisfy required number of parameters for every 'new' statement in it.

  3. Cliche Will provide context sensitive auto completion data for variables and chained expressions by using a mix of static analysis and Reflection API. It does not rely on doc comments or annotations for inferring the variable types, but uses type hints provided in the argument list of functions and constructors. It will use @var and @return doc comment tags when they are available. A VIM plug-in that uses this feature is provided with this package.

  4. Can provide context aware auto completion for namespaces that uses namespace declarations and import statements to provide the appropriate name for a class that can be used in the edited file.

Detailed documentation is available Here