File tree Expand file tree Collapse file tree 5 files changed +35
-128
lines changed
Expand file tree Collapse file tree 5 files changed +35
-128
lines changed Original file line number Diff line number Diff line change 4444 - name : Install dependencies with composer
4545 run : composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4646
47- - name : Setup project
48- run : |
49- mv config/autoload/local.php.dist config/autoload/local.php
50- mv config/autoload/mail.local.php.dist config/autoload/mail.local.php
51- mv config/autoload/local.test.php.dist config/autoload/local.test.php
52-
5347 - name : Collect code coverage with PHPUnit
5448 run : vendor/bin/phpunit --colors=always --coverage-clover clover.xml
5549
Original file line number Diff line number Diff line change 4444 - name : Install dependencies with composer
4545 run : composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4646
47- - name : Setup project
48- run : |
49- mv config/autoload/local.php.dist config/autoload/local.php
50- mv config/autoload/mail.local.php.dist config/autoload/mail.local.php
51- mv config/autoload/local.test.php.dist config/autoload/local.test.php
52-
5347 - name : Run static analysis with PHPStan
5448 run : vendor/bin/phpstan analyse
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ if [[ ${COMMAND} =~ phpunit ]];then
99 apt-get install php" ${PHP_VERSION} " -sqlite3
1010
1111 cp config/autoload/local.php.dist config/autoload/local.php
12- cp config/autoload/mail.local.php.dist config/autoload/mail.local.php
1312 cp config/autoload/local.test.php.dist config/autoload/local.test.php
1413
1514fi
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols
6+
7+ function copyFile (array $ file ): void
8+ {
9+ if (is_readable ($ file ['destination ' ])) {
10+ echo "File {$ file ['destination ' ]} already exists. " . PHP_EOL ;
11+ } else {
12+ if (! copy ($ file ['source ' ], $ file ['destination ' ])) {
13+ echo "Cannot copy {$ file ['source ' ]} file to {$ file ['destination ' ]}" . PHP_EOL ;
14+ } else {
15+ echo "File {$ file ['source ' ]} copied successfully to {$ file ['destination ' ]}. " . PHP_EOL ;
16+ }
17+ }
18+ }
19+
20+ $ files = [
21+ [
22+ 'source ' => 'config/autoload/local.php.dist ' ,
23+ 'destination ' => 'config/autoload/local.php ' ,
24+ ],
25+ [
26+ 'source ' => 'config/autoload/local.test.php.dist ' ,
27+ 'destination ' => 'config/autoload/local.test.php ' ,
28+ ],
29+ [
30+ 'source ' => 'vendor/dotkernel/dot-mail/config/mail.global.php.dist ' ,
31+ 'destination ' => 'config/autoload/mail.global.php ' ,
32+ ],
33+ ];
34+
35+ array_walk ($ files , 'copyFile ' );
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments