GitXplorerGitXplorer
f

php-array-shortener

public
14 stars
1 forks
1 issues

Commits

List of commits on branch master.
Verified
6b3ecd017e068ea24698458fc6a92c7238606677

Disable Travis CI

ffranzliedke committed 4 years ago
Verified
70b3146987090918f6a4d722737faa7bde6d7b00

Drop support for PHP <7

ffranzliedke committed 4 years ago
Verified
5dd53a84e09174cdf22b3f2a4c82cb4e7de2e219

Install PhpUnit via Composer for CI

ffranzliedke committed 4 years ago
Verified
5fb6d34e6c54e1c036dc397eab6250b5c7449f31

Make composer.json pass validation

ffranzliedke committed 4 years ago
Verified
75e104fae0e37e5e8ecf3c7e5499e01c1cf0b24b

CI: Run tests on GitHub Actions

ffranzliedke committed 4 years ago
Verified
85be235cb0bb9f7fa92c5cd09399a5868e02ee49

Merge pull request #7 from ralflang/patch-2

ffranzliedke committed 4 years ago

README

The README file for this repository.

PHP Array Shortener

Build status

A CLI tool that converts PHP files to use the new PHP 5.4+ shorthand array syntax.

Installation

After downloading, make sure you have Composer installed and run composer install.

Usage

In your command line, run:

php shortener shorten <filename.php>

This will print the converted code to the command line so that you can pipe it to another file, for example.

To convert all PHP files in an entire directory, run:

php shortener shorten <dirname>

To convert all PHP files in an entire directory and all of its subdirectories, run either of the following two commands:

php shortener shorten -r <dirname>
php shortener shorten --recursive <dirname>

All converted files will be written to the shortened_files directory. If you want to change that behavior (e.g. to convert existing files directly), provide the output option:

php shortener shorten <dirname> -o <myoutputdir>
php shortener shorten <dirname> --output <myoutputdir>