Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cappuc committed May 13, 2024
1 parent a1ce292 commit 9bdc1cc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ parameters:
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
treatPhpDocTypesAsCertain: false

excludePaths:
- src/Integrations/LaravelData/TemporalSerializableCastAndTransformer.php

ignoreErrors:
- identifier: missingType.generics
- identifier: missingType.iterableValue
4 changes: 3 additions & 1 deletion src/Support/DiscoverActivities.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class DiscoverActivities
{
/**
* Get all the activities by searching the given activities directory.
*
* @return class-string[]
*/
public static function within(string $activitiesPath): array
{
Expand All @@ -26,7 +28,7 @@ public static function within(string $activitiesPath): array
foreach (array_keys($generator->getClassMap()->getMap()) as $class) {
$activity = new \ReflectionClass($class);

/** @var \ReflectionClass[] $interfaces */
/** @var \ReflectionClass<object>[] $interfaces */
$interfaces = array_merge(
$activity->getInterfaces(),
[$activity->getName() => $activity],
Expand Down
6 changes: 4 additions & 2 deletions src/Support/DiscoverWorkflows.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class DiscoverWorkflows
{
/**
* Get all the workflows by searching the given workflow directory.
*
* @return class-string[]
*/
public static function within(string $workflowPath): array
{
Expand All @@ -18,15 +20,15 @@ public static function within(string $workflowPath): array
}

/** @var Collection<class-string,class-string|null> $workflows */
$workflows = Collection::make([]);
$workflows = Collection::make();

$generator = new ClassMapGenerator();
$generator->scanPaths($workflowPath);

foreach (array_keys($generator->getClassMap()->getMap()) as $class) {
$workflow = new \ReflectionClass($class);

/** @var \ReflectionClass[] $interfaces */
/** @var \ReflectionClass<object>[] $interfaces */
$interfaces = array_merge(
$workflow->getInterfaces(),
[$workflow->getName() => $workflow]
Expand Down
3 changes: 3 additions & 0 deletions src/TemporalRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class TemporalRegistry implements Arrayable
*/
protected array $registeredWorkflows = [];

/**
* @var array<array-key,class-string>
*/
protected array $registeredActivities = [];

/**
Expand Down

0 comments on commit 9bdc1cc

Please sign in to comment.