Skip to content

Commit afa97b6

Browse files
authored
Exclude vendor folder
1 parent 03b0b58 commit afa97b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

force_strict_types_php.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

33
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=":"
55

66

77
# 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'
1111
echo "Done"

0 commit comments

Comments
 (0)