Skip to content

Commit

Permalink
minor #35081 [Notifier] Add more specific types at documentation leve…
Browse files Browse the repository at this point in the history
…l when php engine can't (Philippe Segatori)

This PR was squashed before being merged into the 5.0 branch (closes #35081).

Discussion
----------

[Notifier] Add more specific types at documentation level when php engine can't

| Q             | A
| ------------- | ---
| Branch?       | 5.0 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #35078  <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | . <!-- required for new features -->

This an example of the proposal made in #35078 to document a narrower type when php type declaration cannot.

Commits
-------

b9931f5 [Notifier] Add more specific types at documentation level when php engine can't
  • Loading branch information
fabpot committed Jan 8, 2020
2 parents 8c9e278 + b9931f5 commit ad7d241
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
*/
final class NexmoTransportFactory extends AbstractTransportFactory
{
/**
* @return NexmoTransport
*/
public function create(Dsn $dsn): TransportInterface
{
$scheme = $dsn->getScheme();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
*/
final class SlackTransportFactory extends AbstractTransportFactory
{
/**
* @return SlackTransport
*/
public function create(Dsn $dsn): TransportInterface
{
$scheme = $dsn->getScheme();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
*/
final class TelegramTransportFactory extends AbstractTransportFactory
{
/**
* @return TelegramTransport
*/
public function create(Dsn $dsn): TransportInterface
{
$scheme = $dsn->getScheme();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
*/
final class TwilioTransportFactory extends AbstractTransportFactory
{
/**
* @return TwilioTransport
*/
public function create(Dsn $dsn): TransportInterface
{
$scheme = $dsn->getScheme();
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Notifier/Message/SmsMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getPhone(): string
return $this->phone;
}

public function getRecipientId(): ?string
public function getRecipientId(): string
{
return $this->phone;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
*/
final class NullTransportFactory extends AbstractTransportFactory
{
/**
* @return NullTransport
*/
public function create(Dsn $dsn): TransportInterface
{
if ('null' === $dsn->getScheme()) {
Expand Down

0 comments on commit ad7d241

Please sign in to comment.