dypa/declare_strict_types

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP7 tool for easy add/remove "declare(strict_types=1)"

Maintainers

Package info

github.com/dypa/declare-strict-types

Type:project

pkg:composer/dypa/declare_strict_types

Statistics

Installs: 23

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

1.0.0 2017-08-23 17:51 UTC

This package is auto-updated.

Last update: 2026-03-17 10:23:10 UTC


README

Build Status Latest Stable Version Latest Unstable Version Total Downloads

Enable strict typing in your project with one command. Based on PCRE and supports PSR-2.

WARNING: before run command ensure that you have backup of your files!!!

Usage

Install via composer

composer require-dev dypa/declare_strict_types

Run command to add "declare(strict_types=1)" in all files in specified folders

bin/declare_strict_types add --exclude=bar/baz/bah foo/directory bar/baz

Also supports remove mode

bin/declare_strict_types remove foo/directory

PS

You may prefer PHP-CS-Fixer with "declare_strict_types" rule!