Skip to content

Commit

Permalink
Use isset()
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Mar 11, 2024
1 parent e8d0a9e commit 5db255f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resources/ElementResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function __construct(array $config = [])
*/
public function init(): void
{
if ($this->elementType === null || !is_subclass_of($this->elementType, ElementInterface::class)) {
if (!isset($this->elementType) || !is_subclass_of($this->elementType, ElementInterface::class)) {
throw new InvalidConfigException('Endpoint has an invalid elementType');
}

Expand Down

0 comments on commit 5db255f

Please sign in to comment.