You are here

private function ArrayCountToken::isCountable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php \Prophecy\Argument\Token\ArrayCountToken::isCountable()

Returns true if object is either array or instance of \Countable

Parameters

$argument:

Return value

bool

1 call to ArrayCountToken::isCountable()
ArrayCountToken::scoreArgument in vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php
Scores 6 when argument has preset number of elements.

File

vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php, line 70

Class

ArrayCountToken
Array elements count token.

Namespace

Prophecy\Argument\Token

Code

private function isCountable($argument) {
  return is_array($argument) || $argument instanceof \Countable;
}