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
6767 */
6868 protected string $ dockerContainer = '' ;
6969
70+ /**
71+ * @var Chunk size used for analyze
72+ */
73+ protected int $ chunkSize = 100 ;
74+
7075 public function __construct ()
7176 {
7277 $ this ->setCwd (base_path ());
78+
79+ $ this ->chunkSize = config ('git-hooks.analyzer_chunk_size ' );
7380 }
7481
7582 /**
@@ -191,10 +198,8 @@ public function getDockerContainer(): string
191198 */
192199 protected function analizeCommittedFiles (Collection $ commitFiles ): self
193200 {
194- $ chunkSize = config ('git-hooks.analyzer_chunk_size ' );
195-
196201 /** @var Collection<int, ChangedFile> $chunk */
197- foreach ($ commitFiles ->chunk ($ chunkSize ) as $ chunk ) {
202+ foreach ($ commitFiles ->chunk ($ this -> chunkSize ) as $ chunk ) {
198203 $ filePaths = [];
199204
200205 /** @var ChangedFile $file */
You can’t perform that action at this time.
0 commit comments