@@ -40,15 +40,15 @@ public function __construct(Environment $env, Tokenizer $tokenizer)
4040 /**
4141 * Run the linter on the given $files against the given $ruleset.
4242 *
43- * @param array $files List of files to process.
44- * @param Ruleset $ruleset Set of rules to check.
45- * @param bool $fix If true, the linter will fix the file
43+ * @param iterable $files List of files to process.
44+ * @param Ruleset $ruleset Set of rules to check.
45+ * @param bool $fix If true, the linter will fix the file
4646 *
4747 * @return Report an object with all violations and stats.
4848 *
4949 * @throws Exception
5050 */
51- public function run (array $ files , Ruleset $ ruleset , bool $ fix = false )
51+ public function run (iterable $ files , Ruleset $ ruleset , bool $ fix = false )
5252 {
5353 if (empty ($ files )) {
5454 throw new Exception ('No files to process, provide at least one file to be linted ' );
@@ -84,12 +84,12 @@ public function run(array $files, Ruleset $ruleset, bool $fix = false)
8484 }
8585
8686 /**
87- * @param array $files
88- * @param Ruleset $ruleset
87+ * @param iterable $files
88+ * @param Ruleset $ruleset
8989 *
9090 * @throws Exception
9191 */
92- public function fix (array $ files , Ruleset $ ruleset )
92+ public function fix (iterable $ files , Ruleset $ ruleset )
9393 {
9494 $ fixer = new Fixer ($ ruleset , $ this ->tokenizer );
9595
0 commit comments