Test Setup Failed
Push — master ( cdd49c...373038 )
by Paweł
02:51
created
src/EntityDefinitionCreator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@
 block discarded – undo
12 12
         $methods = $entityReflection->getMethods(\ReflectionMethod::IS_PUBLIC);
13 13
 
14 14
         $entityDefinition = new EntityDefinition($className);
15
-        foreach($methods as $method) {
15
+        foreach ($methods as $method) {
16 16
             $methodName = $method->getName();
17 17
 
18
-            if(!strpos($methodName, 'get') === 0) {
18
+            if (!strpos($methodName, 'get') === 0) {
19 19
                 continue;
20 20
             }
21 21
 
22 22
             $fieldName = lcfirst(substr($methodName, 3));
23
-            $fieldType = $method->getReturnType() === NULL ? 'string' : (string)$method->getReturnType();
23
+            $fieldType = $method->getReturnType() === NULL ? 'string' : (string) $method->getReturnType();
24 24
 
25 25
             $entityDefinition->addField(new EntityFieldDefinition($fieldName, $fieldType));
26 26
         }
Please login to merge, or discard this patch.
src/EntityMapper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 namespace Agares\MicroORM;
4 4
 
5 5
 use Agares\MicroORM\TypeMappers\IntegerTypeMapper;
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function __construct(array $typeMappers = null)
14 14
     {
15
-        if($typeMappers == null) {
15
+        if ($typeMappers == null) {
16 16
             $typeMappers = [
17 17
                 'string' => new StringTypeMapper(),
18 18
                 'int' => new IntegerTypeMapper()
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
     private function mapEntityFields(array $fields, \ReflectionClass $entityReflection, $entityInstance, array $fieldsDefinition)
57 57
     {
58 58
         foreach ($fields as $field => $value) {
59
-            if(!isset($fieldsDefinition[$field])) {
59
+            if (!isset($fieldsDefinition[$field])) {
60 60
                 continue;
61 61
             }
62 62
 
63 63
             $typeName = $fieldsDefinition[$field]->getTypeName();
64 64
 
65
-            if(!isset($this->typeMappers[$typeName])) {
65
+            if (!isset($this->typeMappers[$typeName])) {
66 66
                 throw new UnknownFieldTypeException($typeName);
67 67
             }
68 68
 
Please login to merge, or discard this patch.
src/TypeMappers/IntegerTypeMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
      */
13 13
     public function fromString(string $value)
14 14
     {
15
-        return (int)$value;
15
+        return (int) $value;
16 16
     }
17 17
 }
18 18
\ No newline at end of file
Please login to merge, or discard this patch.