PHP code example of mridang / cpd-annotations
1. Go to this page and download the library: Download mridang/cpd-annotations library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mridang / cpd-annotations example snippets
yml
# ...
jobs:
phcpd-analysis:
name: phcpd static code analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: none # disable xdebug, pcov
tools: cpd2pr
- run: |
composer install # install your apps dependencies
vendor/bin/phcpd . xml codesize,naming,unusedcode,controversial,design --exclude libs,var,build,tests --ignore-violations-on-exit | cpd2pr