9

Swagger PHP アノテーションを含む PHP ブロック ドキュメントを含む多数のファイルを扱っていますが、インデントされていません。スペースで自動的にフォーマットする方法はありますか?

旋回

/**
 * @SWG\Api(
 * path="/building/{buildingId}",
 * @SWG\Operation(
 * method="GET",
 * type="Building",
 * summary="Returns a Building object by ID",
 * nickname="building/getBuilding",
 * @SWG\Parameter(
 * name="buildingId",
 * description="ID of the building that needs to be fetched",
 * paramType="path",
 * required=false,
 * type="string",
 * defaultValue="1"
 * )
 * )
 * )
 */

の中へ

/**
 * @SWG\Api(
 *   path="/building/{buildingId}",
 *   @SWG\Operation(
 *     method="GET",
 *     type="Building",
 *     summary="Returns a Building object by ID",
 *     nickname="building/getBuilding",
 *     @SWG\Parameter(
 *       name="buildingId",
 *       description="ID of the building that needs to be fetched",
 *       paramType="path",
 *       required=false,
 *       type="string",
 *       defaultValue="1"
 *     )
 *   )
 * )
 */
4

1 に答える 1

6

残念ながら、これを調べると、これを行うために PHPStorm に組み込まれたものはありません。私はこの問題を少しノードで修正し、他の誰かが必要とする場合は私の作品をオープンソースにしました。

:)

https://github.com/eknowles/grunt-tidy-annotations

于 2015-06-13T15:30:50.883 に答える