Skip to content

Commit

Permalink
Small fix to previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
runz0rd committed Sep 4, 2016
1 parent 5216565 commit a270632
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Common/ModelReflection/ModelClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace Common\ModelReflection;
use Common\Util\Validation;
use Common\ModelReflection\Enum\AnnotationEnum;

class ModelClass {

Expand Down
2 changes: 2 additions & 0 deletions src/Common/ModelReflection/ModelProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

namespace Common\ModelReflection;
use Common\Util\Validation;
use Common\ModelReflection\Enum\TypeEnum;
use Common\ModelReflection\Enum\AnnotationEnum;

class ModelProperty {

Expand Down
1 change: 1 addition & 0 deletions src/Common/ModelReflection/ModelPropertyType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace Common\ModelReflection;
use Common\Util\Validation;
use Common\ModelReflection\Enum\TypeEnum;

class ModelPropertyType {

Expand Down
2 changes: 1 addition & 1 deletion src/Common/Util/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function isEmpty($value) {
*/
public static function isCustomType(string $type) {
$result = true;
$simpleTypes = ['NULL', 'boolean', 'bool', 'int', 'integer', 'double', 'string', 'array', 'object', 'boolean[]',
$simpleTypes = ['any', 'NULL', 'boolean', 'bool', 'int', 'integer', 'double', 'string', 'array', 'object', 'boolean[]',
'integer[]', 'double[]', 'string[]', '[]', 'object[]'];
foreach($simpleTypes as $simpleType) {
if($type == $simpleType) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Common/ModelReflection/ModelPropertyTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function testGetModelClassName($index, $isModel, $propertyType, $annotate

public function validValues() {
return [
[0, false, 'NULL', 'NULL', 'NULL', ''],
[0, false, 'NULL', 'any', 'any', ''],
[1, false, 'boolean', 'boolean', 'boolean', ''],
[2, false, 'boolean', 'boolean', 'boolean', ''],
[3, false, 'string', 'string', 'string', ''],
Expand Down

0 comments on commit a270632

Please sign in to comment.