This repository was archived by the owner on May 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ protected function cleanPackage(BasePackage $package)
122122
123123 $ rules = isset ($ this ->rules [$ packageName ]) ? $ this ->rules [$ packageName ] : null ;
124124 if (!$ rules ) {
125- return ;
125+ return false ;
126126 }
127127
128128 $ dir = $ this ->filesystem ->normalizePath (realpath ($ vendorDir . '/ ' . $ packageDir ));
@@ -132,8 +132,8 @@ protected function cleanPackage(BasePackage $package)
132132
133133 foreach ((array )$ rules as $ part ) {
134134 // Split patterns for single globs (should be max 260 chars)
135- $ patterns = explode ( ' ' , trim ( $ part)) ;
136-
135+ $ patterns = ( array ) $ part ;
136+
137137 foreach ($ patterns as $ pattern ) {
138138 try {
139139 foreach (glob ($ dir . '/ ' . $ pattern ) as $ file ) {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class CleanupRules
1111 public static function getRules ()
1212 {
1313 // Default patterns for common files
14- $ removeList = implode ( ' ' , array (
14+ $ docs = array (
1515 'README* ' ,
1616 'CHANGELOG* ' ,
1717 'FAQ* ' ,
@@ -26,6 +26,9 @@ public static function getRules()
2626 'doc ' ,
2727 'docs ' ,
2828 'readme* ' ,
29+ );
30+
31+ $ tests = array (
2932 '.travis.yml ' ,
3033 '.scrutinizer.yml ' ,
3134 'phpunit.xml* ' ,
@@ -38,16 +41,16 @@ public static function getRules()
3841 '.gitignore ' ,
3942 'demo.php ' ,
4043 'test.php ' ,
41- )) ;
44+ );
4245
4346 return array (
4447 // JBZoo pack
45- 'jbzoo/data ' => array ($ removeList ),
46- 'jbzoo/sqlbuilder ' => array ($ removeList ),
47- 'jbzoo/simpletypes ' => array ($ removeList ),
48+ 'jbzoo/data ' => array ($ docs , $ tests ),
49+ 'jbzoo/sqlbuilder ' => array ($ docs , $ tests ),
50+ 'jbzoo/simpletypes ' => array ($ docs , $ tests ),
4851
4952 // Others
50- 'symfony/yaml ' => array ($ removeList ),
53+ 'symfony/yaml ' => array ($ docs , $ tests ),
5154 );
5255 }
5356
You can’t perform that action at this time.
0 commit comments