PHP Class JonathanTorres\Construct\Construct

显示文件 Open project: jonathantorres/construct

Protected Properties

Property Type Description
$developmentRequirements array The Composer development requirements/packages.
$exportIgnores array The files to ignore on exporting.
$file JonathanTorres\Construct\Helpers\Filesystem The filesystem helper.
$gitIgnores array The directories and files to ignore in Git repositories.
$projectLower string ex: construct
$projectUpper string ex: Construct
$settings Settings The construct command selections instance.
$srcPath string Folder to store source files.
$str JonathanTorres\Construct\Helpers\Str String helper.
$vendorLower string ex: jonathantorres
$vendorUpper string ex: JonathanTorres

Public Methods

Method Description
__construct ( Filesystem $file, Str $str ) : void Initialize.
generate ( Settings $settings, JonathanTorres\Construct\Helpers\Git $git, Script $script ) : void Generate project.
getprojectLower ( ) : string Get project root folder.

Protected Methods

Method Description
behat ( ) : void Add behat to development requirements.
changelog ( ) : void Generate CHANGELOG.md file.
codeOfConduct ( ) : void Generate Code of Conduct file.
codeception ( ) : void Add codeception to development requirements.
composer ( JonathanTorres\Construct\Helpers\Git $git ) : void Generate composer file.
composerInstall ( Script $script ) : void Do an initial composer install and require the set development packages in the constructed project.
contributing ( ) : void Generate CONTRIBUTING.md file.
createNamespace ( boolean $useDoubleSlashes = false ) : string Construct a correct project namespace name.
docs ( ) : void Generate documentation (README, CONTRIBUTING, CHANGELOG) files.
editorConfig ( ) : void Generate EditorConfig configuration file.
environmentFiles ( ) : void Generate .env environment files and add package to the development requirements.
gitInit ( JonathanTorres\Construct\Helpers\Git $git ) : void Initialize an empty git repo.
gitattributes ( ) : void Generate gitattributes file.
githubDocs ( ) : void Generate GitHub documentation files.
githubTemplates ( ) : void Generate GitHub template files.
gitignore ( ) : void Generate gitignore file.
gitmessage ( ) : void Copy .gitmessage stub file.
lgtmFiles ( ) : void Generate LGTM configuration files.
license ( JonathanTorres\Construct\Helpers\Git $git ) : void Generate LICENSE.md file.
phpcs ( ) : void Generate PHP CS Fixer configuration file and add package to the development requirements.
phpspec ( ) : void Generate phpspec config file, create a specs directory and add package to development requirements.
phpunit ( ) : void Generate phpunit test/file/settings and add package to the development requirements.
phpunitTest ( ) : void Generate phpunit test file.
projectClass ( ) : void Generate project class file.
readme ( ) : void Generate README.md file.
root ( ) : void Create project root folder.
saveNames ( ) : void Save versions of project names.
scripts ( Script $script ) : void Run any extra scripts.
src ( ) : void Create 'src' folder.
testing ( ) : void Generate files for the selected testing framework.
travis ( ) : void Generate .travis.yml file.
vagrant ( ) : void Generate Vagrant file.

Method Details

__construct() public method

Initialize.
public __construct ( Filesystem $file, Str $str ) : void
$file JonathanTorres\Construct\Helpers\Filesystem
$str JonathanTorres\Construct\Helpers\Str
return void

behat() protected method

Add behat to development requirements.
protected behat ( ) : void
return void

changelog() protected method

Generate CHANGELOG.md file.
protected changelog ( ) : void
return void

codeOfConduct() protected method

Generate Code of Conduct file.
protected codeOfConduct ( ) : void
return void

codeception() protected method

Add codeception to development requirements.
protected codeception ( ) : void
return void

composer() protected method

Generate composer file.
protected composer ( JonathanTorres\Construct\Helpers\Git $git ) : void
$git JonathanTorres\Construct\Helpers\Git The git helper.
return void

composerInstall() protected method

Do an initial composer install and require the set development packages in the constructed project.
protected composerInstall ( Script $script ) : void
$script JonathanTorres\Construct\Helpers\Script
return void

contributing() protected method

Generate CONTRIBUTING.md file.
protected contributing ( ) : void
return void

createNamespace() protected method

Construct a correct project namespace name.
protected createNamespace ( boolean $useDoubleSlashes = false ) : string
$useDoubleSlashes boolean Whether or not to create the namespace with double slashes \\
return string

docs() protected method

Generate documentation (README, CONTRIBUTING, CHANGELOG) files.
protected docs ( ) : void
return void

editorConfig() protected method

Generate EditorConfig configuration file.
protected editorConfig ( ) : void
return void

environmentFiles() protected method

Generate .env environment files and add package to the development requirements.
protected environmentFiles ( ) : void
return void

generate() public method

Generate project.
public generate ( Settings $settings, JonathanTorres\Construct\Helpers\Git $git, Script $script ) : void
$settings Settings The command settings made by the user.
$git JonathanTorres\Construct\Helpers\Git The git helper.
$script JonathanTorres\Construct\Helpers\Script The script helper.
return void

getprojectLower() public method

Get project root folder.
public getprojectLower ( ) : string
return string

gitInit() protected method

Initialize an empty git repo.
protected gitInit ( JonathanTorres\Construct\Helpers\Git $git ) : void
$git JonathanTorres\Construct\Helpers\Git
return void

gitattributes() protected method

Generate gitattributes file.
protected gitattributes ( ) : void
return void

githubDocs() protected method

Generate GitHub documentation files.
protected githubDocs ( ) : void
return void

githubTemplates() protected method

Generate GitHub template files.
protected githubTemplates ( ) : void
return void

gitignore() protected method

Generate gitignore file.
protected gitignore ( ) : void
return void

gitmessage() protected method

Copy .gitmessage stub file.
protected gitmessage ( ) : void
return void

lgtmFiles() protected method

Generate LGTM configuration files.
protected lgtmFiles ( ) : void
return void

license() protected method

Generate LICENSE.md file.
protected license ( JonathanTorres\Construct\Helpers\Git $git ) : void
$git JonathanTorres\Construct\Helpers\Git The git helper.
return void

phpcs() protected method

Generate PHP CS Fixer configuration file and add package to the development requirements.
protected phpcs ( ) : void
return void

phpspec() protected method

Generate phpspec config file, create a specs directory and add package to development requirements.
protected phpspec ( ) : void
return void

phpunit() protected method

Generate phpunit test/file/settings and add package to the development requirements.
protected phpunit ( ) : void
return void

phpunitTest() protected method

Generate phpunit test file.
protected phpunitTest ( ) : void
return void

projectClass() protected method

Generate project class file.
protected projectClass ( ) : void
return void

readme() protected method

Generate README.md file.
protected readme ( ) : void
return void

root() protected method

Create project root folder.
protected root ( ) : void
return void

saveNames() protected method

Save versions of project names.
protected saveNames ( ) : void
return void

scripts() protected method

Run any extra scripts.
protected scripts ( Script $script ) : void
$script JonathanTorres\Construct\Helpers\Script
return void

src() protected method

Create 'src' folder.
protected src ( ) : void
return void

testing() protected method

Generate files for the selected testing framework.
protected testing ( ) : void
return void

travis() protected method

Generate .travis.yml file.
protected travis ( ) : void
return void

vagrant() protected method

Generate Vagrant file.
protected vagrant ( ) : void
return void

Property Details

$developmentRequirements protected_oe property

The Composer development requirements/packages.
protected array $developmentRequirements
return array

$exportIgnores protected_oe property

The files to ignore on exporting.
protected array $exportIgnores
return array

$file protected_oe property

The filesystem helper.
protected Filesystem,JonathanTorres\Construct\Helpers $file
return JonathanTorres\Construct\Helpers\Filesystem

$gitIgnores protected_oe property

The directories and files to ignore in Git repositories.
protected array $gitIgnores
return array

$projectLower protected_oe property

ex: construct
protected string $projectLower
return string

$projectUpper protected_oe property

ex: Construct
protected string $projectUpper
return string

$settings protected_oe property

The construct command selections instance.
protected Settings,JonathanTorres\Construct $settings
return Settings

$srcPath protected_oe property

Folder to store source files.
protected string $srcPath
return string

$str protected_oe property

String helper.
protected Str,JonathanTorres\Construct\Helpers $str
return JonathanTorres\Construct\Helpers\Str

$vendorLower protected_oe property

ex: jonathantorres
protected string $vendorLower
return string

$vendorUpper protected_oe property

ex: JonathanTorres
protected string $vendorUpper
return string