File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
echo " The affected files will be:"
4
- grep -R --include=" *.php" " <?php" . | awk ' {print $1 }' FS=" :"
4
+ grep -R --exclude-dir= " vendor " -- include=" *.php" " <?php" . | awk ' {print $1 }' FS=" :"
5
5
6
6
7
7
# Change to strict types
8
- grep -R --include=" *.php" " <?php" . | awk ' {print $1 }' FS=" :" | xargs sed -i ' s/declare(strict_types=1);//g'
9
- grep -R --include=" *.php" " <?php" . | awk ' {print $1 }' FS=" :" | xargs sed -i ' s/declare(strict_types = 1);//g'
10
- grep -R --include=" *.php" " <?php" . | awk ' {print $1 }' FS=" :" | xargs sed -i ' s/<?php/<?php\n\ndeclare(strict_types=1);/g'
8
+ grep -R --exclude-dir= " vendor " -- include=" *.php" " <?php" . | awk ' {print $1 }' FS=" :" | xargs sed -i ' s/declare(strict_types=1);//g'
9
+ grep -R --exclude-dir= " vendor " -- include=" *.php" " <?php" . | awk ' {print $1 }' FS=" :" | xargs sed -i ' s/declare(strict_types = 1);//g'
10
+ grep -R --exclude-dir= " vendor " -- include=" *.php" " <?php" . | awk ' {print $1 }' FS=" :" | xargs sed -i ' s/<?php/<?php\n\ndeclare(strict_types=1);/g'
11
11
echo " Done"
You can’t perform that action at this time.
0 commit comments