{
  "name": "<% if (control.repository) { -%><%= account.packagist %><% } else { -%><%= owner.canonical %><% } -%>/<%= project.name %>",
  "description": "<%= project.description %>",
<% if (project.type !== 'library') { -%>
  "type": "<%= project.type %>",
<% } -%>
  "keywords": [<% for (var i = 0; i < project.keywords.length; i++) { -%>

    "<%= project.keywords[i] %>"<% if (i < project.keywords.length - 1) { -%>,<% } -%><% } -%>

  ],
<% if (project.homepage) { -%>
  "homepage": "<%= project.homepage %>",
<% }
if (project.license != '') { -%>
  "license": "<%= project.license %>",
<% } -%>
  "authors": [
    {
      "name": "<%= owner.name %>"<% if (owner.email) { -%>,
      "email": "<%= owner.email %>"<% } -%><% if (owner.homepage) { -%>,
      "homepage": "<%= owner.homepage %>"<% } -%>,
      "role": "Developer"
    }
  ],
<% if (control.repository) { -%>
  "support": {
    "source": "<%= repository.homepage %>",
    "issues": "<%= repository.homepage %>/issues"
  },
<% } -%>
  "minimum-stability": "dev",
  "prefer-stable": true,
  "require": {
    "php": "^<%= project.phpVersion.toFixed(1) %><% if (project.phpVersion.toFixed(1) < 7) { -%>|^7.0<% } -%>"<% for (var i = 0; i < project.dependencies.length; i++) { -%>,
    "<%= project.dependencies[i][0] %>": "<%= project.dependencies[i][1] %>"<% } -%>

  },
  "require-dev": {
    "brainmaestro/composer-git-hooks": "^2.5",
    "friendsofphp/php-cs-fixer": "^2.0"<% if (project.phpVersion >= 7.0) { -%>,
    "infection/infection": "<% if (project.phpVersion >= 7.1) { -%>^0.9<% } else { -%>0.8<% } -%>"<% } -%><% if (control.homestead) { -%>,
    "laravel/homestead": "^6.0"<% } -%>,
    "phpmd/phpmd": "^2.0",
    "phpmetrics/phpmetrics": "^2.0"<% if (project.phpVersion >= 7.0) { -%>,
    "phpstan/phpstan": "<% if (project.phpVersion >= 7.1) { -%>^0.10<% } else { -%>0.9<% } -%>"<% if (project.phpVersion >= 7.1) { -%>,
    "phpstan/phpstan-deprecation-rules": "^0.10",
    "phpstan/phpstan-phpunit": "^0.10"<% } -%>,
    "phpstan/phpstan-strict-rules": "<% if (project.phpVersion >= 7.1) { -%>^0.10<% } else { -%>0.9<% } -%>"<% } -%>,
    "phpunit/phpunit": "<%= project.phpunitVersion %>",
    "povils/phpmnd": "<% if (project.phpVersion >= 7.1) { -%>^2.0<% } else { -%>^1.1<% } -%>",
    "roave/security-advisories": "dev-master",
    "sebastian/phpcpd": "^2.0|^4.0",
    "squizlabs/php_codesniffer": "^2.0"<% if (project.phpVersion >= 7.1) { -%>,
    "thecodingmachine/phpstan-strict-rules": "~0.10.1"<% } -%>

  },
  "suggest": {
  },
  "autoload": {
    "psr-4": {
      "<%= project.namespace.replace(/\\/g, '\\\\') %>\\": "<%= dir.src %>/"
    }
  },
  "autoload-dev": {
    "psr-4": {
      "<%= project.namespace.replace(/\\/g, '\\\\') %>\\Tests\\": "tests/<%= dir.testsSrc %>/"
    }
  },
  "bin": [
  ],
  "config": {
    "preferred-install": "dist",
    "sort-packages": true
  },
  "scripts": {
    "cghooks": "cghooks",
    "post-install-cmd": "cghooks add --no-lock",
    "post-update-cmd": "cghooks update",
    "lint-php": "php -l <%= dir.src %> && php -l <%= dir.tests %>",
    "lint-phpcs": "phpcs --standard=PSR2 <%= dir.src %> <%= dir.tests %>",
    "lint-phpcs-fixer": "php-cs-fixer fix --dry-run --verbose",
    "fix-phpcs": "php-cs-fixer fix --verbose",
    "qa-phpcpd": "phpcpd <%= dir.src %>",
    "qa-phpmd": "phpmd <%= dir.src %> text unusedcode,naming,design,controversial,codesize",
    "qa-phpmnd": "phpmnd ./ --exclude=<%= dir.tests %>"<% if (project.phpVersion >= 7.0) { -%>,
    "qa-phpstan": "phpstan analyse --level max<% if (project.phpVersion >= 7.0) { -%> -c phpstan.neon<% } -%> src"<% } -%>,
    "test-phpunit": "phpunit"<% if (project.phpVersion >= 7.0) { -%>,
    "test-infection": "infection"<% } -%>,
    "report-phpmetrics": "phpmetrics --report-html=build/metrics --offline .",
    "report-phpunit-coverage": "phpunit --coverage-html <%= dir.build %>/coverage",
    "report-phpunit-clover": "phpunit --coverage-clover build/logs/clover.xml",
    "lint": [
      "@lint-php",
      "@lint-phpcs",
      "@lint-phpcs-fixer"
    ],
    "fix": [
      "@fix-phpcs"
    ],
    "qa": [
      "@qa-phpcpd",
      "@qa-phpmd",
      "@qa-phpmnd"<% if (project.phpVersion >= 7.0) { -%>,
      "@qa-phpstan"<% } -%>

    ],
    "security": "composer outdated",
    "test": [
      "@test-phpunit"<% if (project.phpVersion >= 7.0) { -%>,
      "@test-infection"<% } -%>

    ],
    "report": [
      "@report-phpmetrics",
      "@report-phpunit-coverage",
      "@report-phpunit-clover"
    ]
  },
  "extra": {
    "hooks": {
      "pre-commit": "composer lint && composer qa && composer test-phpunit"
    }
  }
}
