File: src/Interfaces/UserInterface.php

Recommend this page to a friend!
  Classes of Marcel Pociot  >  BotMan  >  src/Interfaces/UserInterface.php  
File: src/Interfaces/UserInterface.php
Role: Class source
Content type: text/plain
Description: Class source
Class: BotMan
A framework agnostic PHP library to build chat bot
Author: By
Last change: Indicate possible null values in PHPDoc @return (#1097)

To prevent error messages from PHPStan like:

```
Method
MyProject\Domain\Bot::getChatUsername()
never returns null so it can be removed from the return typehint.
```

when using code like this:
```php
class Bot{

/** @var BotManApiClient */
private $botMan;

public function getChatUsername() : ?string
{
return $this->botMan->getUser()->getUserName();
}
}
```
Date: 2 months ago
Size: 481 bytes

You need to be a registered user and login to get this file.

1,573,370 PHP developers registered to the PHP Classes site.
Be One of Us!

Login Immediately with your account on:

FacebookGmailHotmailStackOverflowGitHubYahoo

For more information send a message to info at phpclasses dot org.