Skip to content

Commit

Permalink
Ignore errors
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Oct 15, 2022
1 parent 61efb0c commit f379bb5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Entities/Connectors/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function toArray(): array
];
}

public function getSource(): MetadataTypes\ModuleSource
public function getSource(): MetadataTypes\ModuleSource|MetadataTypes\PluginSource|MetadataTypes\ConnectorSource
{
return MetadataTypes\ModuleSource::get(MetadataTypes\ModuleSource::SOURCE_MODULE_DEVICES);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Devices/Device.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ public function toArray(): array
];
}

public function getSource(): MetadataTypes\ModuleSource
public function getSource(): MetadataTypes\ModuleSource|MetadataTypes\PluginSource|MetadataTypes\ConnectorSource
{
return MetadataTypes\ModuleSource::get(MetadataTypes\ModuleSource::SOURCE_MODULE_DEVICES);
}
Expand Down
6 changes: 6 additions & 0 deletions tools/phpstan.src.neon
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ parameters:
- ../tests/stubs/LinkInterface.stub
- ../tests/stubs/PositionInterface.stub
- ../tests/stubs/SchemaInterface.stub

ignoreErrors:
- message: '#^Method FastyBird\\DevicesModule\\Entities\\Devices\\Device::getSource\(\) never returns FastyBird\\Metadata\\Types\\ConnectorSource so it can be removed from the return type.#'
- message: '#^Method FastyBird\\DevicesModule\\Entities\\Devices\\Device::getSource\(\) never returns FastyBird\\Metadata\\Types\\PluginSource so it can be removed from the return type.#'
- message: '#^Method FastyBird\\DevicesModule\\Entities\\Connectors\\Connector::getSource\(\) never returns FastyBird\\Metadata\\Types\\ConnectorSource so it can be removed from the return type.#'
- message: '#^Method FastyBird\\DevicesModule\\Entities\\Connectors\\Connector::getSource\(\) never returns FastyBird\\Metadata\\Types\\PluginSource so it can be removed from the return type.#'

0 comments on commit f379bb5

Please sign in to comment.