Passed
Push — master ( dff13b...dab0e7 )
by Jesse
03:04
created
src/PredefinedObjects.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
 
18 18
     private function __construct(...$objects)
19 19
     {
20
-        $this->objects = $objects;
21
-        $this->current = 0;
20
+        $this->objects=$objects;
21
+        $this->current=0;
22 22
     }
23 23
 
24 24
     /**
Please login to merge, or discard this patch.
src/Instantiator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
     private function newInstanceFromDeserialization(): object
64 64
     {
65
-        $class = $this->getName();
65
+        $class=$this->getName();
66 66
         return unserialize(sprintf(
67 67
             'O:%d:"%s":0:{}',
68 68
             strlen($class),
Please login to merge, or discard this patch.
tests/Instantiator_creates_empty_instances.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     function creating_instances_without_calling_the_constructor(string $class)
38 38
     {
39
-        $instance = Instantiator::forThe($class)->instance();
39
+        $instance=Instantiator::forThe($class)->instance();
40 40
 
41 41
         $this->assertInstanceOf($class, $instance);
42 42
     }
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
      */
48 48
     function creating_a_new_instance_on_each_call(string $class)
49 49
     {
50
-        $instantiator = Instantiator::forThe($class);
50
+        $instantiator=Instantiator::forThe($class);
51 51
 
52
-        $instance1 = $instantiator->instance();
53
-        $instance2 = $instantiator->instance();
52
+        $instance1=$instantiator->instance();
53
+        $instance2=$instantiator->instance();
54 54
 
55 55
         $this->assertEquals($instance1, $instance2);
56 56
         $this->assertNotSame($instance1, $instance2);
@@ -86,17 +86,17 @@  discard block
 block discarded – undo
86 86
      */
87 87
     function either_throwing_an_exception_in_the_constructor_or_correctly_instantiating(
88 88
         string $class,
89
-        string $expectedClass = 'N/A',
90
-        string $expectedMessage = 'N/A'
89
+        string $expectedClass='N/A',
90
+        string $expectedMessage='N/A'
91 91
     ) {
92 92
         try {
93
-            $instantiator = Instantiator::forThe($class);
93
+            $instantiator=Instantiator::forThe($class);
94 94
         } catch (CannotInstantiateThis $exception) {
95 95
             $this->assertInstanceOf($expectedClass, $exception);
96 96
             $this->assertEquals($expectedMessage, $exception->getMessage());
97 97
             return;
98 98
         }
99
-        $instance = $instantiator->instance();
99
+        $instance=$instantiator->instance();
100 100
         $this->assertInstanceOf($class, $instance);
101 101
     }
102 102
 
Please login to merge, or discard this patch.
tests/PredefinedObjects_iterates_over_a_list_of_instances.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
     /** @test */
19 19
     function retrieving_the_objects_one_by_one()
20 20
     {
21
-        $foo1 = new Foo;
22
-        $foo2 = new Foo;
23
-        $instances = PredefinedObjects::use($foo1, $foo2);
21
+        $foo1=new Foo;
22
+        $foo2=new Foo;
23
+        $instances=PredefinedObjects::use($foo1, $foo2);
24 24
 
25 25
         $this->assertSame($foo1, $instances->instance());
26 26
         $this->assertSame($foo2, $instances->instance());
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
     /** @test */
30 30
     function retrieving_the_class_of_the_next_instance()
31 31
     {
32
-        $foo = new Foo;
33
-        $bar = new Bar;
32
+        $foo=new Foo;
33
+        $bar=new Bar;
34 34
 
35
-        $instances = PredefinedObjects::use($foo, $bar);
35
+        $instances=PredefinedObjects::use($foo, $bar);
36 36
 
37 37
         $this->assertSame(Foo::class, $instances->class());
38 38
         $this->assertInstanceOf(Foo::class, $instances->instance());
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
     /** @test */
45 45
     function throwing_an_exception_when_out_of_objects()
46 46
     {
47
-        $foo = new Foo;
48
-        $bar = new Bar;
47
+        $foo=new Foo;
48
+        $bar=new Bar;
49 49
 
50
-        $instances = PredefinedObjects::use($foo, $bar);
50
+        $instances=PredefinedObjects::use($foo, $bar);
51 51
 
52 52
         $instances->instance();
53 53
         $instances->instance();
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
     /** @test */
64 64
     function returning_an_empty_string_when_asked_for_the_class_while_out_of_objects()
65 65
     {
66
-        $foo = new Foo;
67
-        $bar = new Bar;
66
+        $foo=new Foo;
67
+        $bar=new Bar;
68 68
 
69
-        $instances = PredefinedObjects::use($foo, $bar);
69
+        $instances=PredefinedObjects::use($foo, $bar);
70 70
 
71 71
         $instances->instance();
72 72
         $instances->instance();
Please login to merge, or discard this patch.