It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
It seems like you code against a concrete implementation and not the interface Iterator as the method count() does only exist in the following implementations of said interface: ArrayIterator, CachingIterator, DoctrineTest\InstantiatorTestAsset\PharAsset, Gielfeldt\Iterators\CountableIterator, Gielfeldt\Iterators\CsvFileObject, Gielfeldt\Iterators\GlobIterator, Gielfeldt\Iterators\RecursiveSortIterator, Gielfeldt\Iterators\RepeatIterator, Gielfeldt\Iterators\ShuffleIterator, Gielfeldt\Iterators\SortIterator, GlobIterator, HttpMessage, HttpRequestPool, Issue523, MongoCursor, MongoGridFSCursor, PHP_Token_Stream, Phar, PharData, RecursiveArrayIterator, RecursiveCachingIterator, SQLiteResult, SimpleXMLIterator, SplDoublyLinkedList, SplFixedArray, SplHeap, SplMaxHeap, SplMinHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, TheSeer\Tokenizer\TokenCollection.
Let’s take a look at an example:
interfaceUser{/** @return string */publicfunctiongetPassword();}classMyUserimplementsUser{publicfunctiongetPassword(){// return something}publicfunctiongetDisplayName(){// return some name.}}classAuthSystem{publicfunctionauthenticate(User$user){$this->logger->info(sprintf('Authenticating %s.',$user->getDisplayName()));// do something.}}
In the above example, the authenticate() method works fine as long as you just pass
instances of MyUser. However, if you now also want to pass a different implementation
of User which does not have a getDisplayName() method, the code will break.
classAuthSystem{publicfunctionauthenticate(User$user){if($userinstanceofMyUser){$this->logger->info(/** ... */);}// or alternativelyif(!$userinstanceofMyUser){thrownew\LogicException('$user must be an instance of MyUser, '.'other instances are not supported.');}}}
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types
inside the if block in such a case.
It seems like you code against a concrete implementation and not the interface Iterator as the method count() does only exist in the following implementations of said interface: ArrayIterator, CachingIterator, DoctrineTest\InstantiatorTestAsset\PharAsset, Gielfeldt\Iterators\CountableIterator, Gielfeldt\Iterators\CsvFileObject, Gielfeldt\Iterators\GlobIterator, Gielfeldt\Iterators\RecursiveSortIterator, Gielfeldt\Iterators\RepeatIterator, Gielfeldt\Iterators\ShuffleIterator, Gielfeldt\Iterators\SortIterator, GlobIterator, HttpMessage, HttpRequestPool, Issue523, MongoCursor, MongoGridFSCursor, PHP_Token_Stream, Phar, PharData, RecursiveArrayIterator, RecursiveCachingIterator, SQLiteResult, SimpleXMLIterator, SplDoublyLinkedList, SplFixedArray, SplHeap, SplMaxHeap, SplMinHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, TheSeer\Tokenizer\TokenCollection.
Let’s take a look at an example:
interfaceUser{/** @return string */publicfunctiongetPassword();}classMyUserimplementsUser{publicfunctiongetPassword(){// return something}publicfunctiongetDisplayName(){// return some name.}}classAuthSystem{publicfunctionauthenticate(User$user){$this->logger->info(sprintf('Authenticating %s.',$user->getDisplayName()));// do something.}}
In the above example, the authenticate() method works fine as long as you just pass
instances of MyUser. However, if you now also want to pass a different implementation
of User which does not have a getDisplayName() method, the code will break.
classAuthSystem{publicfunctionauthenticate(User$user){if($userinstanceofMyUser){$this->logger->info(/** ... */);}// or alternativelyif(!$userinstanceofMyUser){thrownew\LogicException('$user must be an instance of MyUser, '.'other instances are not supported.');}}}
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types
inside the if block in such a case.
It seems like you code against a concrete implementation and not the interface Iterator as the method count() does only exist in the following implementations of said interface: ArrayIterator, CachingIterator, DoctrineTest\InstantiatorTestAsset\PharAsset, Gielfeldt\Iterators\CountableIterator, Gielfeldt\Iterators\CsvFileObject, Gielfeldt\Iterators\GlobIterator, Gielfeldt\Iterators\RecursiveSortIterator, Gielfeldt\Iterators\RepeatIterator, Gielfeldt\Iterators\ShuffleIterator, Gielfeldt\Iterators\SortIterator, GlobIterator, HttpMessage, HttpRequestPool, Issue523, MongoCursor, MongoGridFSCursor, PHP_Token_Stream, Phar, PharData, RecursiveArrayIterator, RecursiveCachingIterator, SQLiteResult, SimpleXMLIterator, SplDoublyLinkedList, SplFixedArray, SplHeap, SplMaxHeap, SplMinHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, TheSeer\Tokenizer\TokenCollection.
Let’s take a look at an example:
interfaceUser{/** @return string */publicfunctiongetPassword();}classMyUserimplementsUser{publicfunctiongetPassword(){// return something}publicfunctiongetDisplayName(){// return some name.}}classAuthSystem{publicfunctionauthenticate(User$user){$this->logger->info(sprintf('Authenticating %s.',$user->getDisplayName()));// do something.}}
In the above example, the authenticate() method works fine as long as you just pass
instances of MyUser. However, if you now also want to pass a different implementation
of User which does not have a getDisplayName() method, the code will break.
classAuthSystem{publicfunctionauthenticate(User$user){if($userinstanceofMyUser){$this->logger->info(/** ... */);}// or alternativelyif(!$userinstanceofMyUser){thrownew\LogicException('$user must be an instance of MyUser, '.'other instances are not supported.');}}}
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types
inside the if block in such a case.
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.