- Add following to
composer.json
of project which uses the package to update/debug :
"repositories": [
{
"type": "path",
"url": "../path/to/directory/of/package",
"options": {
"symlink": true
}
}
name: A NAME | |
description: A DESCRIPTION | |
inputs: | |
my-multiline-input: | |
description: A multiline user input | |
outputs: | |
my-output: | |
description: Returns "bar" |
# Paste that function on your ~/.bashrc (or ~/.bashrc_profile for mac) | |
# /!\ PHP version has to be already installed, if not command won't work /!\ | |
# | |
# Usage: `pvm 5.6` / `pvm 8.2` / ... | |
function pvm() | |
{ | |
current=$(php --version | head -n 1 | sed 's/PHP \([0-9][0-9]*\)\.\([0-9][0-9]*\)\.[0-9][0-9]* .*/\1.\2/') | |
if [[ "$current" == "$1" ]]; then | |
echo "PHP already at $1 !" | |
else |
composer.json
of project which uses the package to update/debug :"repositories": [
{
"type": "path",
"url": "../path/to/directory/of/package",
"options": {
"symlink": true
}
}
TWGIT_GIT_COMMIT_GPG_SIGN_OPTION=' -S '
TWGIT_GIT_MERGE_GPG_SIGN_OPTION=' -S '
TWGIT_GIT_TAG_GPG_SIGN_OPTION=' -s '
\set QUIET 1 | |
/* Replace null value on display by '(null)' */ | |
\pset null '(null)' | |
/* Prompt customization */ | |
\set PROMPT1 '%n@%/%R%x%#' | |
\pset linestyle unicode | |
\pset border 1 | |
\pset pager_min_lines 100 | |
\set COMP_KEYWORD_CASE upper | |
/* History by database */ |
<?php | |
Class Sample | |
{ | |
private function deleteDirectory($dir) | |
{ | |
if ($handle = opendir($dir)) { | |
while (false !== ($file = readdir($handle))) { | |
if ('.' != $file && '..' != $file) { | |
$path = implode(DIRECTORY_SEPARATOR, [$dir, $file]); |
{ | |
"require": { | |
"php": ">=5.5" | |
}, | |
"require-dev": { | |
"phpunit/phpunit": "~4.0", | |
"squizlabs/php_codesniffer": "2.*", | |
"behat/behat": "~3.0" | |
}, | |
"scripts": { |
checks: | |
php: | |
code_rating: true | |
duplication: true | |
build_failure_conditions: | |
- 'project.metric_change("scrutinizer.quality", < -0.10)' | |
- 'elements.rating(<= D).exists' # No classes/methods with a rating of D or worse | |
- 'elements.rating(<= D).new.exists' # No new classes/methods with a rating of D or worse allowed | |
- 'issues.label("coding-style").exists' # No coding style issues allowed |