Skip to content

Commit

Permalink
array(array("string"), 'count')
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotchance committed Sep 29, 2014
1 parent 2d78e1f commit 1fd1701
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Concise/Services/DataTypeChecker.php
Expand Up @@ -2,6 +2,8 @@

namespace Concise\Services;

use Closure;

class DataTypeChecker
{
/**
Expand Down Expand Up @@ -118,7 +120,7 @@ protected function getType($value)
if ($this->isAttribute($value)) {
return $this->getType($this->getAttribute($value->getValue()));
}
if (is_callable($value)) {
if ($value instanceof Closure) {
return 'callable';
}

Expand Down
1 change: 1 addition & 0 deletions tests/Concise/Services/DataTypeCheckerTest.php
Expand Up @@ -48,6 +48,7 @@ public function dataTypes()
array(array("number"), 12.3),
array(array("number"), '12.3'),
array(array("bool"), true),
array(array("string"), 'count'),
);
}

Expand Down

0 comments on commit 1fd1701

Please sign in to comment.