Skip to content

Commit 7fa6f6d

Browse files
authored
Merge pull request #5 from phalcon/v1.1.0
V1.1.0
2 parents 8b69803 + da68c5d commit 7fa6f6d

6 files changed

Lines changed: 17 additions & 107 deletions

File tree

.travis.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,21 @@ cache:
2121
- vendor
2222
- $HOME/.composer/cache
2323

24-
env:
25-
global:
26-
- PHALCON_VERSION=v3.3.2 #TODO change this version to 4.0 later
24+
2725

2826
before_install:
2927
- phpenv config-rm xdebug.ini || true
3028
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com $GH_TOKEN; fi;
3129

3230
install:
33-
- bash tests/_ci/install_phalcon.sh
34-
- cd $TRAVIS_BUILD_DIR
3531
- travis_retry composer install --prefer-dist --no-interaction
3632

3733
before_script:
3834

3935
script:
4036
- vendor/bin/phpcs
41-
- phpunit tests -v
37+
- vendor/bin/phpunit tests -v
4238
- vendor/bin/phpstan analyse -l max -c phpstan.neon src -v
4339

4440
notifications:
45-
email:
46-
on_success: never
47-
on_failure: never
41+
email: false
File renamed without changes.

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"forum": "https://forum.phalconphp.com/"
2323
},
2424
"require": {
25-
"php": ">=7.0",
26-
"ext-phalcon": "~3.3"
25+
"php": ">=7.0"
2726
},
2827
"require-dev": {
2928
"phpunit/phpunit": "^6.5",

src/Exception.php

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

src/Parser.php

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
<?php
22

3-
/*
4-
+------------------------------------------------------------------------+
5-
| Phalcon Cli option parser |
6-
+------------------------------------------------------------------------+
7-
| Copyright (c) 2011-present Phalcon Team (https://www.phalconphp.com) |
8-
+------------------------------------------------------------------------+
9-
| This source file is subject to the New BSD License that is bundled |
10-
| with this package in the file LICENSE.txt. |
11-
| |
12-
| If you did not receive a copy of the license and are unable to |
13-
| obtain it through the world-wide-web, please send an email |
14-
| to license@phalconphp.com so we can send you a copy immediately. |
15-
+------------------------------------------------------------------------+
16-
| Authors: Sergii Svyrydenko <sergey.v.sviridenko@gmail.com> |
17-
+------------------------------------------------------------------------+
18-
*/
3+
/**
4+
* This file is part of the Cop package.
5+
*
6+
* (c) Phalcon Team <team@phalconphp.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
1911

2012
namespace Phalcon\Cop;
2113

@@ -44,16 +36,17 @@ class Parser
4436
];
4537

4638
/**
47-
* Parse CLI command
39+
* Parse console input.
4840
*
49-
* @param array $argv
41+
* @param array $argv
5042
* @return array
5143
*/
5244
public function parse(array $argv = []): array
5345
{
5446
if (empty($argv)) {
5547
$argv = $this->getArgvFromServer();
5648
}
49+
5750
array_shift($argv);
5851
$this->parsedCommands = [];
5952

@@ -81,18 +74,13 @@ public function getBoolean(string $key, bool $default = false): bool
8174
}
8275

8376
/**
84-
* Get console command either from argument or from Server
77+
* Gets array of arguments passed from the input.
8578
*
8679
* @return array
87-
* @throws Exception
8880
*/
8981
protected function getArgvFromServer(): array
9082
{
91-
if (!empty($_SERVER['argv'])) {
92-
return $_SERVER['argv'];
93-
}
94-
95-
throw new Exception("Parameters haven't been defined yet");
83+
return empty($_SERVER['argv']) ? [] : $_SERVER['argv'];
9684
}
9785

9886
/**

tests/_ci/install_phalcon.sh

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

0 commit comments

Comments
 (0)