Skip to content

Commit e19a8b3

Browse files
author
Anton
authored
Merge pull request #40 from bluzphp/develop
Fixed `getModelPath()` method
2 parents 963d3f2 + 73ac654 commit e19a8b3

14 files changed

Lines changed: 86 additions & 41 deletions

File tree

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2012-2017 by Bluz PHP Team
3+
Copyright (c) 2012-2019 by Bluz PHP Team
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
Bluzman - Simple workflow manager for Bluz Framework
22
======================================
3-
Bluzman is a set of command-line tools which provides a simple workflow with an application based and mantained by Bluz framework.
3+
Bluzman is a set of command-line tools which provides a simple workflow with an application based and maintained by Bluz framework.
44

55
## Achievements
66

7-
[![Build Status](https://secure.travis-ci.org/bluzphp/bluzman.png?branch=master)](https://travis-ci.org/bluzphp/bluzman)
8-
[![Dependency Status](https://www.versioneye.com/user/projects/58cbb18f6893fd004792c5da/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/58cbb18f6893fd004792c5da)
7+
[![PHP >= 7.1+](https://img.shields.io/packagist/php-v/bluzphp/bluzman.svg?style=flat)](https://php.net/)
98

10-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bluzphp/bluzman/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/bluzphp/bluzman/?branch=master)
11-
[![Code Coverage](https://scrutinizer-ci.com/g/bluzphp/bluzman/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/bluzphp/bluzman/?branch=master)
9+
[![Latest Stable Version](https://img.shields.io/packagist/v/bluzphp/bluzman.svg?label=version&style=flat)](https://packagist.org/packages/bluzphp/bluzman)
1210

13-
[![Latest Stable Version](https://poser.pugx.org/bluzphp/bluzman/v/stable.png)](https://packagist.org/packages/bluzphp/bluzman)
14-
[![Total Downloads](https://poser.pugx.org/bluzphp/bluzman/downloads.png)](https://packagist.org/packages/bluzphp/bluzman)
11+
[![Build Status](https://img.shields.io/travis/bluzphp/bluzman/master.svg?style=flat)](https://travis-ci.org/bluzphp/bluzman)
1512

16-
[![License](https://poser.pugx.org/bluzphp/bluzman/license.svg)](https://packagist.org/packages/bluzphp/bluzman)
13+
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/bluzphp/bluzman.svg?style=flat)](https://scrutinizer-ci.com/g/bluzphp/bluzman/)
14+
15+
[![Coverage Status](https://img.shields.io/coveralls/bluzphp/bluzman/master.svg?style=flat)](https://coveralls.io/r/bluzphp/bluzman?branch=master)
16+
17+
[![Total Downloads](https://img.shields.io/packagist/dt/bluzphp/bluzman.svg?style=flat)](https://packagist.org/packages/bluzphp/bluzman)
18+
19+
[![License](https://img.shields.io/packagist/l/bluzphp/bluzman.svg?style=flat)](https://packagist.org/packages/bluzphp/bluzman)
1720

1821
Features
1922
-------------------------

bin/bluzman

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
if (PHP_SAPI !== 'cli') {
99
die('Must run from command line');
1010
}
11-
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
11+
if (stripos(PHP_OS, 'WIN') === 0) {
1212
// sorry windows lovers
13-
throw new \Exception();
13+
die('Windows is not supported');
1414
}
1515

1616
// Root path, double level up
@@ -30,7 +30,7 @@ defined('PATH_PUBLIC') ? : define('PATH_PUBLIC', $root . '/public');
3030
$env = getenv('BLUZ_ENV') ?: 'production';
3131
define('BLUZ_ENV', $env);
3232

33-
error_reporting(E_ALL | E_STRICT);
33+
error_reporting(E_ALL);
3434
ini_set('display_errors', 1);
3535
ini_set('log_errors', 0);
3636
ini_set('html_errors', 0);

composer.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@
1212
],
1313
"require": {
1414
"php": ">=7.1",
15-
"bluzphp/framework": "~7.10",
16-
"codeception/codeception": "~2.3",
17-
"composer/composer": "~1.5",
15+
"bluzphp/framework": "~7.11",
16+
"codeception/codeception": "2.5.3",
17+
"composer/composer": "~1.8",
1818
"robmorgan/phinx": "~0.9",
19-
"symfony/console": "~3.0",
20-
"symfony/event-dispatcher": "~3.0",
21-
"symfony/filesystem": "~3.0",
22-
"symfony/finder": "~3.0",
23-
"symfony/process": "~3.0",
24-
"symfony/yaml": "~3.0"
19+
"symfony/console": "~4.2",
20+
"symfony/event-dispatcher": "~4.2",
21+
"symfony/filesystem": "~4.2",
22+
"symfony/finder": "~4.2",
23+
"symfony/process": "~4.2",
24+
"symfony/yaml": "~4.2"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "~6.4",
28-
"mockery/mockery": "~1.0",
29-
"nelmio/alice": "~3.0",
30-
"fzaninotto/faker": "~1.7",
31-
"squizlabs/php_codesniffer": "~3.1",
32-
"satooshi/php-coveralls": "~1.0"
27+
"phpunit/phpunit": "~7.0",
28+
"mockery/mockery": "~1.2",
29+
"nelmio/alice": "~3.5",
30+
"fzaninotto/faker": "~1.8",
31+
"squizlabs/php_codesniffer": "~3.4",
32+
"satooshi/php-coveralls": "~2.0"
3333
},
3434
"bin": ["bin/bluzman"],
3535
"scripts": {

phpunit.xml.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,5 @@
1616
<directory suffix=".php">./vendor/</directory>
1717
</exclude>
1818
</whitelist>
19-
<blacklist>
20-
<directory suffix=".php">./vendor</directory>
21-
</blacklist>
2219
</filter>
2320
</phpunit>

src/Application/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function getModelPath($name) : string
148148
return $this->getWorkingPath() . DIRECTORY_SEPARATOR
149149
. 'application' . DIRECTORY_SEPARATOR
150150
. 'models' . DIRECTORY_SEPARATOR
151-
. $name;
151+
. ucfirst(strtolower($name));
152152
}
153153

154154
/**

src/Command/Generate/CrudCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ protected function execute(InputInterface $input, OutputInterface $output) : voi
6565
}
6666

6767
/**
68-
* @param InputInterface $input
68+
* @param InputInterface $input
6969
* @param OutputInterface $output
70+
*
7071
* @return void
72+
* @throws Generator\GeneratorException
7173
* @throws InputException
7274
*/
7375
protected function generate(InputInterface $input, OutputInterface $output) : void
@@ -133,6 +135,7 @@ public function verify(InputInterface $input, OutputInterface $output) : void
133135
}
134136

135137
$this->write(" |> CRUD for <info>{$model}</info> has been successfully created.");
138+
136139
if ($module) {
137140
$this->write(
138141
" |> <options=bold>Open page <info>/acl</info> in your browser " .

src/Command/Generate/GridCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ public function verify(InputInterface $input, OutputInterface $output) : void
130130
}
131131
}
132132

133-
// notifications
134133
$this->write(" |> GRID for <info>{$model}</info> has been successfully created.");
135134

136135
if ($module) {

src/Command/Generate/ScaffoldCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ protected function execute(InputInterface $input, OutputInterface $output) : voi
6363
* Generate Model
6464
*
6565
* @return void
66+
* @throws \Symfony\Component\Console\Exception\ExceptionInterface
6667
*/
6768
protected function runGenerateModel() : void
6869
{
@@ -83,6 +84,7 @@ protected function runGenerateModel() : void
8384
* Generate Module
8485
*
8586
* @return void
87+
* @throws \Symfony\Component\Console\Exception\ExceptionInterface
8688
*/
8789
protected function runGenerateModule() : void
8890
{
@@ -102,6 +104,7 @@ protected function runGenerateModule() : void
102104
* Generate Crud
103105
*
104106
* @return void
107+
* @throws \Symfony\Component\Console\Exception\ExceptionInterface
105108
*/
106109
protected function runGenerateCrud() : void
107110
{
@@ -122,6 +125,7 @@ protected function runGenerateCrud() : void
122125
* Generate Grid
123126
*
124127
* @return void
128+
* @throws \Symfony\Component\Console\Exception\ExceptionInterface
125129
*/
126130
protected function runGenerateGrid() : void
127131
{

0 commit comments

Comments
 (0)