File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/Console/Commands/Hooks Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,16 @@ abstract class BaseCodeAnalyzerPreCommitHook implements CodeAnalyzerPreCommitHoo
67
67
*/
68
68
protected string $ dockerContainer = '' ;
69
69
70
+ /**
71
+ * @var Chunk size used for analyze
72
+ */
73
+ protected int $ chunkSize = 100 ;
74
+
70
75
public function __construct ()
71
76
{
72
77
$ this ->setCwd (base_path ());
78
+
79
+ $ this ->chunkSize = config ('git-hooks.analyzer_chunk_size ' );
73
80
}
74
81
75
82
/**
@@ -191,10 +198,8 @@ public function getDockerContainer(): string
191
198
*/
192
199
protected function analizeCommittedFiles (Collection $ commitFiles ): self
193
200
{
194
- $ chunkSize = config ('git-hooks.analyzer_chunk_size ' );
195
-
196
201
/** @var Collection<int, ChangedFile> $chunk */
197
- foreach ($ commitFiles ->chunk ($ chunkSize ) as $ chunk ) {
202
+ foreach ($ commitFiles ->chunk ($ this -> chunkSize ) as $ chunk ) {
198
203
$ filePaths = [];
199
204
200
205
/** @var ChangedFile $file */
You can’t perform that action at this time.
0 commit comments