PHPackages                             millancore/lake - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. millancore/lake

ActiveLibrary[CLI &amp; Console](/categories/cli)

millancore/lake
===============

Command line utility for agile project creation

v0.0.7(6y ago)39MITPHPPHP &gt;=7.1CI failing

Since Mar 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/millancore/lake)[ Packagist](https://packagist.org/packages/millancore/lake)[ RSS](/packages/millancore-lake/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (8)Versions (9)Used By (0)

[![](https://raw.githubusercontent.com/millancore/lake/master/logo.jpg)](https://raw.githubusercontent.com/millancore/lake/master/logo.jpg)

[![Build Status](https://camo.githubusercontent.com/3a767b755b46ca9ae39daca5a2497d556150d4996f6c8dc049a7a2b0a1911b88/68747470733a2f2f7472617669732d63692e6f72672f6d696c6c616e636f72652f6c616b652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/millancore/lake?branch=master)[![](https://camo.githubusercontent.com/67b9d588db46edf1bbc1b7dc8543674724278988e35e338eb242413bdc7d6fa9/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f38303263333432343130303038636264386330382f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/millancore/lake/maintainability)[![](https://camo.githubusercontent.com/f132b0340b2101b5c684fe4a280aafc583a6bc9b5e084f8657eb0dc2543c5449/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f38303263333432343130303038636264386330382f746573745f636f766572616765)](https://codeclimate.com/github/millancore/lake/test_coverage)

Lake is a command line utility that allows you to dynamically create classes and methods and create your reflexes for testing, also Lake can add methods to existing classes.

One of the most powerful features of Lake is that it automatically adds **"USE"** statements, Lake can recognize internal PHP classes, project classes and those that are present as Composer dependencies.

Install
-------

[](#install)

**PHP 7.1 or newer**

```
composer require --dev millancore/lake
```

Configure
---------

[](#configure)

Lake takes to Composer the configuration of your project, he expects that the folder `tests` to store the reflections of test.

But not all projects have the same structure, if that's the case you can use the configuration file `lake.yml` and [Config options](#config-options).

Usage
-----

[](#usage)

In order for Lake to automatically add the `USE` statements from Composer's dependencies, you must run `lake dump`. If in the process of creation there is ambiguity in the name of the class or interface Lake will give you a choice from those available.

**Only run once after installing some dependencies with Composer.**

```
vendor/bin/lake dump
```

### Create a class + method

[](#create-a-class--method)

```
vendor/bin/lake make src/DirName/ClassName MethodName
```

**If the name of the method is not defined, the defined arguments will be those of the constructor.**

Options
-------

[](#options)

OptionNameExampleDescription**-e**Extends`-e Controller`Define the class of the one that extends.**-a**Arguments`-a Int:id`Method argument, you can use this option many times.......`-a Request`If the name of the variable is not defined
 Lake will create the variable name from the type.......`-a ?Array:params`Nullable argument.**-r**Return`-r Response`Defines the type of return.**-d**DocBlock`-d 'description'`DocBlock Description of the method.Examples
--------

[](#examples)

```
vendor/bin/lake make src/App/Command/CommandLake -e Command configure -a array:params
```

classFile: `src/App/Command/CommandLake.php`

```
