Completed
Branch develop (9f43d2)
by Filipe
05:14
created
spec/ContainerSpec.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     function it_registers_a_callable_executing_it_when_resolving()
78 78
     {
79
-        $callable = function ($test) {
79
+        $callable = function($test) {
80 80
             return $test;
81 81
         };
82 82
         $this->register(
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     function it_registers_an_alias_that_points_to_other_definition()
92 92
     {
93
-        $object = (object)[];
93
+        $object = (object) [];
94 94
         $this->register('test-object', $object);
95 95
         $this->register('alias', '@test-object');
96 96
         $this->get('alias')->shouldBe($object);
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
 
99 99
     function it_is_aware_of_definition_resolution_scope()
100 100
     {
101
-        $callable = function () {
101
+        $callable = function() {
102 102
             static $calls;
103 103
 
104
-            if (!$calls) { $calls = 0;}
104
+            if (!$calls) { $calls = 0; }
105 105
 
106 106
             return $calls++;
107 107
         };
Please login to merge, or discard this patch.
spec/Definition/FactorySpec.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     function let()
13 13
     {
14 14
         $this->beConstructedWith(
15
-            function (){
15
+            function() {
16 16
                 return 'Test Callable';
17 17
             }
18 18
         );
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     function it_can_have_parameters_to_pass_to_callable_on_resolve()
37 37
     {
38 38
         $this->beConstructedWith(
39
-            function ($test) {
39
+            function($test) {
40 40
                 return $test;
41 41
             },
42 42
             ['test with parameters']
Please login to merge, or discard this patch.
spec/Definition/ObjectDefinitionSpec.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
     public function getMatchers()
103 103
     {
104 104
         return [
105
-            'haveArgumentsEquals' => function ($subject, $arguments) {
105
+            'haveArgumentsEquals' => function($subject, $arguments) {
106 106
                  return $subject->arguments == $arguments;
107 107
             },
108
-            'haveACallEquals' => function (DefinitionData $subject, $expectedCall) {
108
+            'haveACallEquals' => function(DefinitionData $subject, $expectedCall) {
109 109
                 $call = null;
110 110
                 foreach ($subject->calls as $call) {
111 111
                     if ($call == $expectedCall) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 try {
117 117
                     \PHPUnit_Framework_Assert::assertEquals($expectedCall, $call);
118 118
                 } catch (\PHPUnit_Framework_ExpectationFailedException $caught) {
119
-                    $message .=  "\n". $caught->getComparisonFailure()->getDiff();
119
+                    $message .= "\n".$caught->getComparisonFailure()->getDiff();
120 120
 
121 121
                 }
122 122
 
Please login to merge, or discard this patch.
spec/ContainerBuilderSpec.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     function it_hydrates_a_container_with_an_array_from_a_file(ContainerInterface $container)
42 42
     {
43 43
         $container->register(Argument::type('string'), Argument::any())->shouldBeCalledTimes(3);
44
-        $this->beConstructedWith(__DIR__ .'/services/services1.php');
44
+        $this->beConstructedWith(__DIR__.'/services/services1.php');
45 45
         $this->setContainer($container);
46 46
         $this->getContainer()->shouldBeAnInstanceOf(ContainerInterface::class);
47 47
     }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     function it_hydrates_a_container_with_all_arrays_form_the_files_within_a_directory(ContainerInterface $container)
50 50
     {
51 51
         $container->register(Argument::type('string'), Argument::any())->shouldBeCalledTimes(6);
52
-        $this->beConstructedWith(__DIR__ .'/services');
52
+        $this->beConstructedWith(__DIR__.'/services');
53 53
         $this->setContainer($container);
54 54
         $this->getContainer()->shouldBeAnInstanceOf(ContainerInterface::class);
55 55
     }
Please login to merge, or discard this patch.
src/ObjectHydrator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
     {
74 74
         $annotations = $this->inspector->getMethodAnnotations($method);
75 75
 
76
-        if (! $annotations->hasAnnotation('@inject')) {
76
+        if (!$annotations->hasAnnotation('@inject')) {
77 77
             return;
78 78
         }
79 79
 
Please login to merge, or discard this patch.
src/ContainerBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     protected function hydrateContainer($definitions)
75 75
     {
76
-        if (! is_array($definitions)) {
76
+        if (!is_array($definitions)) {
77 77
             $this->hydrateFromFile($definitions);
78 78
             return;
79 79
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function hydrateFromFile($definitions)
92 92
     {
93
-        if (! is_file($definitions)) {
93
+        if (!is_file($definitions)) {
94 94
             $this->hydrateFromDirectory($definitions);
95 95
             return;
96 96
         }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             $directory = new \RecursiveDirectoryIterator($definitions);
106 106
         } catch (\Exception $caught) {
107 107
             throw new InvalidDefinitionsPathException(
108
-                'Provided definitions path is not valid or is not found. ' .
108
+                'Provided definitions path is not valid or is not found. '.
109 109
                 'Could not create container. Please check '.$definitions
110 110
             );
111 111
         }
Please login to merge, or discard this patch.
src/Definition/Alias.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@
 block discarded – undo
51 51
      */
52 52
     public function resolve()
53 53
     {
54
-        if (! $this->container instanceof ContainerInterface) {
54
+        if (!$this->container instanceof ContainerInterface) {
55 55
             throw new ContainerNotSetException(
56
-                "No container was set for definition. " .
56
+                "No container was set for definition. ".
57 57
                 "It is not possible to look for alias '{$this->alias}'"
58 58
             );
59 59
         }
Please login to merge, or discard this patch.
src/Definition/ObjectDefinition.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function __construct($className)
59 59
     {
60
-        if (! class_exists($className)) {
60
+        if (!class_exists($className)) {
61 61
             throw new ClassNotFoundException(
62
-                "The class '{$className}' does not exists or it cannot be " .
63
-                "loaded. Object definition therefore cannot be " .
62
+                "The class '{$className}' does not exists or it cannot be ".
63
+                "loaded. Object definition therefore cannot be ".
64 64
                 "created."
65 65
             );
66 66
         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     public function callMethod($methodName, ...$arguments)
198 198
     {
199 199
 
200
-        if (! method_exists($this->definitionData->className, $methodName)) {
200
+        if (!method_exists($this->definitionData->className, $methodName)) {
201 201
             throw new MethodNotFoundException(
202 202
                 "The method '{$methodName}' is not defined in the class ".
203 203
                 "{$this->definitionData->className}"
@@ -236,9 +236,9 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function to($property)
238 238
     {
239
-        if (! property_exists($this->definitionData->className, $property)) {
239
+        if (!property_exists($this->definitionData->className, $property)) {
240 240
             throw new PropertyNotFoundException(
241
-                "The class '{$this->definitionData->className}' has no " .
241
+                "The class '{$this->definitionData->className}' has no ".
242 242
                 "property called '{$property}'."
243 243
             );
244 244
         }
Please login to merge, or discard this patch.
src/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
      */
126 126
     protected function resolve($name)
127 127
     {
128
-        if (! array_key_exists($name, self::$instances)) {
128
+        if (!array_key_exists($name, self::$instances)) {
129 129
             $entry = $this->definitions[$name];
130 130
             return $this->registerEntry($name, $entry);
131 131
         }
Please login to merge, or discard this patch.