Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sepehr-mohseni/strict-types

Adds strict types declaration recursively to your PHP files
https://github.com/sepehr-mohseni/strict-types

composer package php php-library php7 php8

Last synced: 22 days ago
JSON representation

Adds strict types declaration recursively to your PHP files

Awesome Lists containing this project

README

        

# PHP Strict Types Adder

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Latest Version](https://img.shields.io/packagist/v/sepmni/strict-types)](https://packagist.org/packages/sepmni/strict-types)
[![Total Downloads](https://img.shields.io/packagist/dt/sepmni/strict-types)](https://packagist.org/packages/sepmni/strict-types)

The PHP Strict Types Adder is a Composer package that allows you to automatically add `declare(strict_types=1);` to PHP files within a directory recursively. It ensures your PHP files are consistent and have strict type checking enabled without the need for manual editing.

## Features

- Recursively add `declare(strict_types=1);` to PHP files within a specified directory.
- Ignores files that already have a `declare(strict_types=1);` statement.
- Excludes files within the "vendor" folder and those with ".blade.php" in the name.
- Automatically detects and handles existing `