Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daaarkling/php-add-strict-types-line
Command-line script for adding `declare(strict_types=1);` line to PHP files
https://github.com/daaarkling/php-add-strict-types-line
command-line php strict-types
Last synced: 19 days ago
JSON representation
Command-line script for adding `declare(strict_types=1);` line to PHP files
- Host: GitHub
- URL: https://github.com/daaarkling/php-add-strict-types-line
- Owner: Daaarkling
- License: bsd-3-clause
- Created: 2018-02-13T21:35:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-22T18:11:20.000Z (about 4 years ago)
- Last Synced: 2024-04-24T07:27:20.416Z (9 months ago)
- Topics: command-line, php, strict-types
- Language: PHP
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
PHP add-strict-types-line
=================================Command-line script for adding `declare(strict_types=1);` line to PHP files
It uses native PHP tokenizer, so conversion is safe. It adds the line only to files where `declare(strict_types=1);` was not found.
Usage
-----To convert all `*.php` and `*.phpt` files in whole directory recursively or to convert a single file use:
```
php add-line.php
```