2017 © Pedro Peláez
 

library proofreader-php

image

elife/proofreader-php

  • Wednesday, April 25, 2018
  • by thewilkybarkid
  • Repository
  • 7 Watchers
  • 4 Stars
  • 941 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

It uses: - PHP Coding Standard Fixer to check conformance of PHP code to stylistic coding standards.. - PHP Copy/Paste Detector to check there is no clear duplication between different PHP files., (*1)

Usage

$ composer install
# from some project
# /path/to/proofreader-php/bin/proofreader $folder

Configuration

By default, this configuration file is used:, (*2)

  • .php_cs

by PHP CS Fixer., (*3)

Sample output

$ ~/code/proofreader-php/bin/proofreader src/
PHP-CS-Fixer consistency check with local project
PHP-CS-Fixer
Loaded config from "/home/giorgio/code/proofreader-php/.php_cs"
.........................
Legend: ?-unknown, I-invalid file syntax, file ignored, .-no changes, F-fixed, E-error
Checked all files in 1.792 seconds, 6.000 MB memory used

PHPCPD
phpcpd 2.0.4 by Sebastian Bergmann.

0.00% duplicated lines out of 725 total lines of code.

Time: 43 ms, Memory: 4.00MB

Containerization

Execute proofreader on the src folder of your own project:, (*4)

docker run -v $(pwd):/code elifesciences/proofreader-php bin/proofreader /code/src

Execute php-cs-fixer on the src folder of your own project (experimental):, (*5)

touch .php_cs.cache
docker run -v $(pwd):/code -v $(pwd)/.php_cs.cache:/srv/proofreader-php/.php_cs.cache -u $(id -u) elifesciences/proofreader-php vendor/bin/php-cs-fixer fix /code/src

Import proofreader in another project's image:, (*6)

FROM elifesciences/proofreader-php:latest AS proofreader
...
USER elife
COPY --from=proofreader --chown=elife:elife /srv/proofreader-php /srv/proofreader-php
RUN ln -s /srv/proofreader-php/bin/proofreader /srv/bin/proofreader

The Versions

25/04 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by Giorgio Sironi

25/04 2018

dev-php-image

dev-php-image

  Sources   Download

MIT

The Requires

 

by Giorgio Sironi

20/03 2018

dev-fix-php-cs-fixer-consistency-check

dev-fix-php-cs-fixer-consistency-check

  Sources   Download

MIT

The Requires

 

by Giorgio Sironi

20/03 2018

dev-new-fixers

dev-new-fixers

  Sources   Download

MIT

The Requires

 

by Giorgio Sironi

13/03 2018
23/02 2018
26/01 2018

dev-containerization

dev-containerization

  Sources   Download

MIT

The Requires

 

The Development Requires

by Giorgio Sironi

17/11 2017

dev-container_local

dev-container_local

  Sources   Download

MIT

The Requires

 

The Development Requires

by Giorgio Sironi

20/07 2016

dev-ordered_use

dev-ordered_use

  Sources   Download

MIT

The Requires

 

The Development Requires

by Giorgio Sironi