To inherit the tip explana through the Interface of the vendor?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
13 views
There are IDE issues that exaplin not been thrown out because the interface he documented
/** * {@inheritdoc} */ public function getUser(UserProviderInterface $userProvider) { try { return $userProvider->loadUserByUsername($email); } catch (UserNotFoundException $e) { // Exception 'UserNotFoundException' is never thrown in the corresponding try block


custom port adaptor UserProviderInterface

UserEntityProvider class implements UserProviderInterface { /** * {@inheritdoc} * @throws Exception * @throws UserNotFoundException */ public function loadUserByUsername($username) : UserInterface


lies in vendors
interface UserProviderInterface { /** * Loads the user for the given username. * * This method must throw UsernameNotFoundException if the user is not * found. * * @param string $username The username * * @return UserInterface * * @throws UsernameNotFoundException if the user is not found */ public function loadUserByUsername($username);


How to tell the IDE that it is still there, exepct?
by | 13 views

2 Answers

0 like 0 dislike
Derive your interface and declare the exception in docblock, or in this specific case, the block error in the IDE.
by
0 like 0 dislike
1. A show that writes IDA
2. In implementatsii UserProviderInterface indicated @inheritdoc ?
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
6 answers
110,608 questions
257,187 answers
0 comments
40,796 users