Passed
Push — master ( 35af6e...660627 )
by Михаил
05:31
created
Tests/Query/Select/AbstractSelectQueryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             ));
103 103
 
104 104
         $query->reset();
105
-        $this->assertEquals( '', $query->getQueryString());
105
+        $this->assertEquals('', $query->getQueryString());
106 106
     }
107 107
 
108 108
     public function testAddOrWhere()
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $query->addRangeOrWhere($entityFieldName, $from, $to, true);
193 193
         $query->addRangeOrWhere($entityFieldName, $from, $to, true, true);
194 194
         $query->addRangeOrWhere($entityFieldName, $from, $to, false, true);
195
-        $query->addRangeOrWhere($entityFieldName, $from, $to, false, false , true);
195
+        $query->addRangeOrWhere($entityFieldName, $from, $to, false, false, true);
196 196
         $query->addRangeOrWhere($entityFieldName, $from, $to, false, true, true);
197 197
         $this->assertEquals(
198 198
             sprintf('(%3$s:[%1$s TO %2$s] OR %3$s:{%1$s TO %2$s] OR %3$s:{%1$s TO %2$s} OR %3$s:[%1$s TO %2$s} OR (*:* AND -%3$s:[%1$s TO %2$s]) OR (*:* AND -%3$s:[%1$s TO %2$s})) AND ()',
Please login to merge, or discard this patch.
Tests/Query/Select/ClassSelectQueryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
         $configFieldName = 'type';
16 16
         $documentFieldName = 'd_type';
17 17
         $configFieldValue = 'article';
18
-        $entityConfig =  [
18
+        $entityConfig = [
19 19
             'config' => [
20
-                [ 'name' => $configFieldName, 'value' => $configFieldValue ]
20
+                ['name' => $configFieldName, 'value' => $configFieldValue]
21 21
             ]
22 22
         ];
23 23
 
@@ -49,6 +49,6 @@  discard block
 block discarded – undo
49 49
             $hydrator
50 50
         );
51 51
 
52
-        $this->assertEquals( sprintf('%s:"%s"', $documentFieldName, $configFieldValue) ,$query->getQueryString());
52
+        $this->assertEquals(sprintf('%s:"%s"', $documentFieldName, $configFieldValue), $query->getQueryString());
53 53
     }
54 54
 }
55 55
\ No newline at end of file
Please login to merge, or discard this patch.
Tests/Schema/SchemaTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $configFields = $schema->getConfigEntityFields();
62 62
 
63 63
         $discriminator = false;
64
-        foreach($configFields as $configField) {
64
+        foreach ($configFields as $configField) {
65 65
             $this->assertInstanceOf('Mdiyakov\DoctrineSolrBundle\Schema\Field\ConfigEntityField', $configField);
66 66
             $discriminator = $discriminator ? $discriminator : $configField->isDiscriminator();
67 67
             $this->assertArrayHasKey($configField->getConfigFieldName(), $configFieldNames);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $this->assertEquals('d_id', $primaryKeyField->getDocumentFieldName());
81 81
 
82 82
         $fields = $schema->getFields();
83
-        foreach($fields as $field) {
83
+        foreach ($fields as $field) {
84 84
             $this->assertInstanceOf('Mdiyakov\DoctrineSolrBundle\Schema\Field\Entity\Field', $field);
85 85
             $this->assertArrayHasKey($field->getEntityFieldName(), $fieldNames);
86 86
             $this->assertArrayHasKey($field->getDocumentFieldName(), $documentFieldNames);
Please login to merge, or discard this patch.
Tests/Schema/Field/Entity/DateFieldTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         $entity->date = $value;
31 31
         $fieldValue = $field->getDocumentFieldValue($entity);
32
-        $this->assertEquals('2018-01-04T09:30:00Z',$fieldValue);
32
+        $this->assertEquals('2018-01-04T09:30:00Z', $fieldValue);
33 33
     }
34 34
 
35 35
     public function testGetDocumentValueForNull()
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $entity->date = $value;
43 43
         $fieldValue = $field->getDocumentFieldValue($entity);
44
-        $this->assertEquals(null,$fieldValue);
44
+        $this->assertEquals(null, $fieldValue);
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
Tests/Schema/Field/Entity/BooleanFieldTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
 
21 21
         $entity->enabled = $string;
22 22
         $fieldValue = $field->getDocumentFieldValue($entity);
23
-        $this->assertEquals(true ,$fieldValue);
23
+        $this->assertEquals(true, $fieldValue);
24 24
 
25 25
         $entity->enabled = $int;
26 26
         $fieldValue = $field->getDocumentFieldValue($entity);
27
-        $this->assertEquals(true ,$fieldValue);
27
+        $this->assertEquals(true, $fieldValue);
28 28
 
29 29
 
30 30
         $entity->enabled = $bool;
Please login to merge, or discard this patch.
Tests/Schema/Field/Entity/StringFieldTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,16 +38,16 @@
 block discarded – undo
38 38
 
39 39
         $entity->title = $int;
40 40
         $fieldValue = $field->getDocumentFieldValue($entity);
41
-        $this->assertEquals(strval($int) ,$fieldValue);
41
+        $this->assertEquals(strval($int), $fieldValue);
42 42
 
43 43
         $entity->title = $bool;
44 44
         $fieldValue = $field->getDocumentFieldValue($entity);
45
-        $this->assertEquals(strval($bool) ,$fieldValue);
45
+        $this->assertEquals(strval($bool), $fieldValue);
46 46
 
47 47
         $entity->title = $null;
48 48
         $fieldValue = $field->getDocumentFieldValue($entity);
49 49
 
50
-        $this->assertEquals($null ,$fieldValue);
50
+        $this->assertEquals($null, $fieldValue);
51 51
     }
52 52
 
53 53
     public function testGetDocumentValueForObject()
Please login to merge, or discard this patch.
Tests/Schema/Field/Entity/IntFieldTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@
 block discarded – undo
18 18
 
19 19
         $entity->price = $double;
20 20
         $fieldValue = $field->getDocumentFieldValue($entity);
21
-        $this->assertEquals(123,$fieldValue);
21
+        $this->assertEquals(123, $fieldValue);
22 22
 
23 23
         $entity->price = $int;
24 24
         $fieldValue = $field->getDocumentFieldValue($entity);
25
-        $this->assertEquals(123,$fieldValue);
25
+        $this->assertEquals(123, $fieldValue);
26 26
 
27 27
         $entity->price = $null;
28 28
         $fieldValue = $field->getDocumentFieldValue($entity);
29
-        $this->assertEquals(0,$fieldValue);
29
+        $this->assertEquals(0, $fieldValue);
30 30
     }
31 31
 
32 32
     /**
Please login to merge, or discard this patch.
Tests/Schema/Field/Entity/DoubleFieldTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@
 block discarded – undo
17 17
 
18 18
         $entity->price = $double;
19 19
         $fieldValue = $field->getDocumentFieldValue($entity);
20
-        $this->assertEquals(123.83 ,$fieldValue);
20
+        $this->assertEquals(123.83, $fieldValue);
21 21
 
22 22
         $entity->price = $int;
23 23
         $fieldValue = $field->getDocumentFieldValue($entity);
24
-        $this->assertEquals(123.00 ,$fieldValue);
24
+        $this->assertEquals(123.00, $fieldValue);
25 25
 
26 26
     }
27 27
 
Please login to merge, or discard this patch.
Tests/Schema/Field/Entity/ArrayFieldTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,38 +20,38 @@  discard block
 block discarded – undo
20 20
 
21 21
         $entity->tags = $string;
22 22
         $fieldValue = $field->getDocumentFieldValue($entity);
23
-        $this->assertEquals([$string] ,$fieldValue);
23
+        $this->assertEquals([$string], $fieldValue);
24 24
 
25 25
         $entity->tags = $int;
26 26
         $fieldValue = $field->getDocumentFieldValue($entity);
27
-        $this->assertEquals([$int] ,$fieldValue);
27
+        $this->assertEquals([$int], $fieldValue);
28 28
 
29 29
         $entity->tags = $bool;
30 30
         $fieldValue = $field->getDocumentFieldValue($entity);
31
-        $this->assertEquals([$bool] ,$fieldValue);
31
+        $this->assertEquals([$bool], $fieldValue);
32 32
 
33 33
         $entity->tags = $null;
34 34
         $fieldValue = $field->getDocumentFieldValue($entity);
35
-        $this->assertEquals([] ,$fieldValue);
35
+        $this->assertEquals([], $fieldValue);
36 36
     }
37 37
 
38 38
 
39 39
     public function testGetDocumentValueForArray()
40 40
     {
41
-        $array = [1,'string', false];
41
+        $array = [1, 'string', false];
42 42
 
43 43
         $entity = new \stdClass();
44 44
         $field = new ArrayField('tags', 'd_tags', false, 10, false);
45 45
 
46 46
         $entity->tags = $array;
47 47
         $fieldValue = $field->getDocumentFieldValue($entity);
48
-        $this->assertEquals($array ,$fieldValue);
48
+        $this->assertEquals($array, $fieldValue);
49 49
     }
50 50
 
51 51
 
52 52
     public function testGetDocumentValueForIterator()
53 53
     {
54
-        $array = [1,3,4,4,5,6,9];
54
+        $array = [1, 3, 4, 4, 5, 6, 9];
55 55
         $iterator = new \ArrayIterator($array);
56 56
 
57 57
         $entity = new \stdClass();
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
         $entity->tags = $iterator;
61 61
         $fieldValue = $field->getDocumentFieldValue($entity);
62 62
 
63
-        $this->assertEquals($array ,$fieldValue);
63
+        $this->assertEquals($array, $fieldValue);
64 64
     }
65 65
 
66 66
     public function testGetDocumentValueForIteratorAggregate()
67 67
     {
68
-        $array = [1,3,4,4,5,6,9];
68
+        $array = [1, 3, 4, 4, 5, 6, 9];
69 69
         $arrayObject = new \ArrayObject($array);
70 70
 
71 71
         $entity = new \stdClass();
@@ -74,6 +74,6 @@  discard block
 block discarded – undo
74 74
         $entity->tags = $arrayObject;
75 75
         $fieldValue = $field->getDocumentFieldValue($entity);
76 76
 
77
-        $this->assertEquals($array ,$fieldValue);
77
+        $this->assertEquals($array, $fieldValue);
78 78
     }
79 79
 }
80 80
\ No newline at end of file
Please login to merge, or discard this patch.