File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -79,12 +79,29 @@ public function files()
7979 // main language files of the application, in this case we will
8080 // neglect all vendor files.
8181 if (! Str::contains ($ this ->path , 'vendor ' )) {
82- $ filesByFile = $ filesByFile ->filter (function ($ value , $ key ) {
83- return ! Str::contains ($ key , ': ' );
84- });
82+ $ filesByFile = $ this ->neglectVendorFiles ($ filesByFile );
83+ }
84+
85+ return $ filesByFile ;
86+ }
87+
88+ /**
89+ * Nelgect all vendor files.
90+ *
91+ * @param $filesByFile Collection
92+ * @return array
93+ */
94+ private function neglectVendorFiles ($ filesByFile )
95+ {
96+ $ return = [];
97+
98+ foreach ($ filesByFile ->toArray () as $ key => $ value ) {
99+ if (! Str::contains ($ key , ': ' )) {
100+ $ return [$ key ] = $ value ;
101+ }
85102 }
86103
87- return $ filesByFile -> toArray () ;
104+ return $ return ;
88105 }
89106
90107 /**
You can’t perform that action at this time.
0 commit comments