fnash/desugar-constructor

将 php8 类构造函数转换为等价的类属性和构造函数赋值

0.1 2021-03-09 09:51 UTC

This package is auto-updated.

Last update: 2024-09-09 18:23:38 UTC


README

将 php8 类构造函数转换为等价的类属性和构造函数赋值

安装

$ mkdir -p tools/desugar-constructor
$ composer require --working-dir=tools/desugar-constructor fnash/desugar-constructor @dev

用法

$ tools/desugar-constructor/vendor/bin/desugar ./myClass.php

美化打印

请考虑使用像 PHP-CS-Fixer 这样的工具。

作为 PhpStorm 外部工具使用

菜单首选项 => 工具 => 外部工具

对话框表单

程序:tools/desugar-constructor/vendor/bin/desugar

参数:

工作目录:

添加快捷键

享受吧!