Skip to content

Commit c740e77

Browse files
committed
* update configuration & phpfmt script
1 parent 5581083 commit c740e77

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.phpfmt.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
; cakephp = 0
55

66
; 自动分析类的属性并生成构造方法
7-
; 可选择 camel/snak/golang 三种风格的构造方法
7+
; 可选择 camel/snake/golang 三种风格的构造方法
88
; constructor = camel
99

1010
; 自动分析类的属性并生成 set/get 方法
11-
; 可选择 camel/snak/golang 三种风格的方法命名
11+
; 可选择 camel/snake/golang 三种风格的方法命名
1212
; setters_and_getters = camel
1313

1414
; 试运行

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo "./app ./bootstrap ./database" > ./.fmtdirs
2929

3030
```bash
3131
cd /workspace/myapplication
32-
vendor/bin/phpfmt .
32+
vendor/bin/phpfmt
3333
```
3434

3535
## Global Installation

phpfmt

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ php=`which php`
44

55
fmtconf=$PWD/.phpfmt.ini
66
dirconf=$PWD/.phpfmtdirs
7+
fmtphar=$PWD/verndor/zhouyl/phpfmt-tool/fmt.phar
78
fmthome=$HOME/.phpfmt
8-
fmtphar=$fmthome/fmt.phar
99

1010
# url prefix for phpfmt & configuration download
1111
downurl="--no-check-certificate https://raw.githubusercontent.com/zhouyl/phpfmt-tool/master"
@@ -46,8 +46,11 @@ else
4646
fi
4747

4848
if [ ! -f $fmtphar ]; then
49-
echo "Download the phpfmt.phar: $fmtphar"
50-
download $fmtphar
49+
fmtphar=$fmthome/fmt.phar
50+
if [ ! -f $fmtphar ]; then
51+
echo "Download the phpfmt.phar: $fmtphar"
52+
download $fmtphar
53+
fi
5154
fi
5255

5356
# get the target directories

0 commit comments

Comments
 (0)