File tree Expand file tree Collapse file tree 5 files changed +86
-0
lines changed Expand file tree Collapse file tree 5 files changed +86
-0
lines changed Original file line number Diff line number Diff line change
1
+ vendor /
2
+ build /
3
+ phpunit * .xml
4
+ phpunit
5
+ * .cache
6
+ composer.lock
7
+ .DS_Store
8
+ .idea /
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ /**
6
+ * This file is part of Shield OAuth.
7
+ *
8
+ * (c) Datamweb <pooya_parsa_dadashi@yahoo.com>
9
+ *
10
+ * For the full copyright and license information, please view
11
+ * the LICENSE file that was distributed with this source code.
12
+ */
13
+
14
+ use CodeIgniter \CodingStandard \CodeIgniter4 ;
15
+ use Nexus \CsConfig \Factory ;
16
+ use PhpCsFixer \Finder ;
17
+
18
+ $ finder = Finder::create ()
19
+ ->files ()
20
+ ->in ([
21
+ __DIR__ . '/src/ ' ,
22
+ // __DIR__ . '/tests/',
23
+ ])
24
+ ->exclude ('build ' )
25
+ ->append ([__FILE__ ]);
26
+
27
+ $ overrides = [
28
+ 'declare_strict_types ' => true ,
29
+ 'void_return ' => true ,
30
+ ];
31
+
32
+ $ options = [
33
+ 'finder ' => $ finder ,
34
+ 'cacheFile ' => '.php-cs-fixer.cache ' ,
35
+ ];
36
+
37
+ return Factory::create (new CodeIgniter4 (), $ overrides , $ options )->forLibrary (
38
+ 'Shield OAuth ' ,
39
+ 'Datamweb ' ,
40
+ 'pooya_parsa_dadashi@yahoo.com '
41
+ );
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ if [ " $FILES " != " " ]; then
3
+ echo " Running PHP CS Fixer..."
4
+
5
+ if [ -d /proc/cygdrive ]; then
6
+ ./vendor/bin/php-cs-fixer fix --verbose --dry-run --diff
7
+ else
8
+ php ./vendor/bin/php-cs-fixer fix --verbose --dry-run --diff
9
+ fi
10
+
11
+ if [ $? != 0 ]; then
12
+ echo " Some files are not following the coding standards. Please fix them before commit (try 'composer style')."
13
+ exit 1
14
+ fi
15
+ fi
16
+
17
+ exit $?
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # Install a pre-commit hook that
4
+ # automatically runs phpcs to fix styles
5
+ cp admin/pre-commit .git/hooks/pre-commit
6
+ chmod +x .git/hooks/pre-commit
Original file line number Diff line number Diff line change 20
20
}
21
21
],
22
22
"homepage" : " https://github.com/datamweb/shield-oauth" ,
23
+ "minimum-stability" : " dev" ,
24
+ "prefer-stable" : true ,
23
25
"require" : {
24
26
"php" : " ^7.4.3 || ^8.0 || ^8.1" ,
25
27
"codeigniter4/shield" : " dev-develop"
43
45
"Tests\\ Support\\ " : " tests/_support"
44
46
}
45
47
},
48
+ "scripts" : {
49
+ "post-update-cmd" : [
50
+ " bash admin/setup.sh"
51
+ ],
52
+ "ci" : [
53
+ " Composer\\ Config::disableProcessTimeout" ,
54
+ " @cs"
55
+ ],
56
+ "cs" : " php-cs-fixer fix --ansi --verbose --dry-run --diff" ,
57
+ "cs-fix" : " php-cs-fixer fix --ansi --verbose --diff" ,
58
+ "style" : " @cs-fix"
59
+ },
46
60
"support" : {
47
61
"forum" : " https://github.com/datamweb/shield-oauth/discussions" ,
48
62
"source" : " https://github.com/datamweb/shield-oauth" ,
You can’t perform that action at this time.
0 commit comments