Skip to content

Commit

Permalink
Merge pull request #24 from cafferata/grumphp
Browse files Browse the repository at this point in the history
Introduction of Grumphp
  • Loading branch information
andrederoos authored Aug 10, 2017
2 parents 95b50a6 + 3657b91 commit c405051
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 10 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ vendor/
tmp/

.DS_STORE

31 changes: 31 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . "/src");

return PhpCsFixer\Config::create()
->setRules(
[
'@PSR2' => true,
'array_syntax' => [
'syntax' => 'short'
],
'class_keyword_remove' => false,
'concat_space' => [
'spacing' => 'one'
],
'combine_consecutive_unsets' => true,
'general_phpdoc_annotation_remove' => [
'annotations' => ['@author'],
],
'linebreak_after_opening_tag' => true,
'no_short_echo_tag' => true,
'no_useless_return' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'protected_to_private' => true,
'semicolon_after_instruction' => true,
]
)
->setFinder($finder);
17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,19 @@
}
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.4",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"phpro/grumphp": "^0.11.6",
"phpunit/phpunit": "^5.7",
"friendsofphp/php-cs-fixer": "^2.4"
"sensiolabs/security-checker": "^4.1"
},
"bin": [
"bin/bunq-install"
],
"scripts": {
"phpcs": [
"./vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no src"
],
"phpcs-fix": [
"./vendor/bin/php-cs-fixer fix -v --using-cache=no src"
]
"config": {
"sort-packages": true,
"platform": {
"php": "5.6"
}
}
}
75 changes: 75 additions & 0 deletions grumphp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
parameters:
bin_dir: "./vendor/bin"
git_dir: "."
hide_circumvention_tip: false
hooks_dir: ~
hooks_preset: local
ignore_unstaged_changes: false
process_async_limit: 10
process_async_wait: 1000
process_timeout: 60
stop_on_failure: true
ascii:
failed: ~
succeeded: ~
tasks:
composer:
file: ./composer.json
no_check_all: false
no_check_lock: false
no_check_publish: false
with_dependencies: false
strict: true
git_blacklist:
keywords:
- "die("
- "dump("
- "exit;"
- "print_r("
- "print_rr("
- "var_dump("
triggered_by: ['php']
phpcpd:
directory: '.'
exclude: ['vendor']
names_exclude: []
fuzzy: false
min_lines: 5
min_tokens: 70
triggered_by: ['php']
phpcsfixer2:
allow_risky: false
cache_file: ~
config: ~
rules: []
using_cache: true
path_mode: ~
verbose: true
phplint:
exclude: ['vendor']
jobs: ~
triggered_by: ['php', 'phtml']
phpunit:
config_file: ~
testsuite: ~
group: []
always_execute: false
phpversion:
project: '5.6'
securitychecker:
lockfile: ./composer.lock
format: ~
end_point: ~
timeout: ~
run_always: true
xmllint:
ignore_patterns: []
load_from_net: false
x_include: false
dtd_validation: false
scheme_validation: false
triggered_by: ['xml']
yamllint:
ignore_patterns: []
object_support: false
exception_on_invalid_type: true
2 changes: 1 addition & 1 deletion src/Util/InstallationUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static function interactiveInstall()
);
$methodInitializeInstallationContext->invoke($context);

$description = static::readline(self::PROMPT_DESCRIPTION, self::ERROR_EMPTY_DESCRIPTION);
$description = static::readLine(self::PROMPT_DESCRIPTION, self::ERROR_EMPTY_DESCRIPTION);
$permittedIpsInput = static::readLineOrNull(self::PROMPT_PERMITTED_IPS);
$permittedIps = static::formatIps($permittedIpsInput);
$methodRegisterDevice = static::createAccessibleReflectionMethod(ApiContext::class, self::METHOD_REGISTER_DEVICE);
Expand Down

0 comments on commit c405051

Please sign in to comment.