Skip to content

Commit

Permalink
Fix attribute instantiation, mark as repeatable
Browse files Browse the repository at this point in the history
  • Loading branch information
Padam87 committed Aug 2, 2022
1 parent c61a4e5 commit 1beeb52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Annotation/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @NamedArgumentConstructor
* @Target("CLASS")
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
class Job
{
public string $minute;
Expand Down
2 changes: 1 addition & 1 deletion Util/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function createTab(InputInterface $input, ?array $config = null): Tab

if (count($attributes) > 0) {
foreach ($attributes as $attribute) {
$this->processJob(new Job(...$attribute->getArguments()), $input, $config, $commandInstance, $tab);
$this->processJob($attribute->newInstance(), $input, $config, $commandInstance, $tab);
}

// Don't process annotations
Expand Down

0 comments on commit 1beeb52

Please sign in to comment.