Skip to content

Commit

Permalink
Fix phpstan reports
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Nov 30, 2023
1 parent f8d772d commit 9cebf64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public function getConfigTreeBuilder(): TreeBuilder

private function addResourceOwnersConfiguration(ArrayNodeDefinition $node): void
{
/* @phpstan-ignore-next-line */
$node
->fixXmlConfig('resource_owner')
->children()
Expand Down
10 changes: 4 additions & 6 deletions src/OAuth/Response/SensioConnectUserResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@ final class SensioConnectUserResponse extends AbstractUserResponse
* @var \DOMNode
*/
protected $data;
/**
* @var \DOMXPath|null
*/
private $xpath;

private ?\DOMXPath $xpath;

/**
* {@inheritdoc}
*/
public function getUserIdentifier(): string
{
/** @var \DOMAttr $attribute */
/** @var \DOMAttr|null $attribute */
$attribute = $this->data->attributes->getNamedItem('id');
if (null === $attribute->value) {
if (null === $attribute) {
throw new \InvalidArgumentException('User identifier was not found in response.');
}

Expand Down

0 comments on commit 9cebf64

Please sign in to comment.