only reformatted source code to match the rest of the project

This commit is contained in:
Christian Bläul
2018-02-20 22:06:06 +01:00
parent d188921ab6
commit 2206ec1e7c

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace ParseCsv\enums; namespace ParseCsv\enums;
/** /**
@@ -8,8 +9,7 @@ namespace ParseCsv\enums;
* *
* todo: needs a basic parent enum class for error handling. * todo: needs a basic parent enum class for error handling.
*/ */
class DatatypeEnum class DatatypeEnum {
{
const __DEFAULT = self::TYPE_STRING; const __DEFAULT = self::TYPE_STRING;
@@ -39,7 +39,7 @@ class DatatypeEnum
self::TYPE_INT => 'isValidInteger', self::TYPE_INT => 'isValidInteger',
self::TYPE_BOOL => 'isValidBoolean', self::TYPE_BOOL => 'isValidBoolean',
self::TYPE_FLOAT => 'isValidFloat', self::TYPE_FLOAT => 'isValidFloat',
self::TYPE_DATE => 'isValidDate' self::TYPE_DATE => 'isValidDate',
); );
/** /**
@@ -49,15 +49,15 @@ class DatatypeEnum
* *
* @return bool|string * @return bool|string
*/ */
public static function getValidTypeFromSample($value){ public static function getValidTypeFromSample($value) {
$value = trim((string) $value); $value = trim((string) $value);
if (empty($value)){ if (empty($value)) {
return false; return false;
} }
foreach (self::$validators as $type => $validator){ foreach (self::$validators as $type => $validator) {
if ($validator === null){ if ($validator === null) {
continue; continue;
} }