Completed
Push — master ( 68250e...501a81 )
by Muhammad Kashif
23:17
created
src/Factory/JsonServiceFactory.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function __construct($jsonFile)
25 25
     {
26
-       $this->loadServiceList($jsonFile);
26
+        $this->loadServiceList($jsonFile);
27 27
     }
28 28
 
29 29
     /**
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
      */
45 45
     private function loadServiceList($jsonFile)
46 46
     {
47
-       $services =  $this->loadJsonFile($jsonFile);
47
+        $services =  $this->loadJsonFile($jsonFile);
48 48
 
49
-       foreach($services->services as $service) {
50
-           $this->services[$service->id] = $service;
51
-       }
49
+        foreach($services->services as $service) {
50
+            $this->services[$service->id] = $service;
51
+        }
52 52
     }
53 53
 
54 54
     /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
      */
45 45
     private function loadServiceList($jsonFile)
46 46
     {
47
-       $services =  $this->loadJsonFile($jsonFile);
47
+       $services = $this->loadJsonFile($jsonFile);
48 48
 
49
-       foreach($services->services as $service) {
49
+       foreach ($services->services as $service) {
50 50
            $this->services[$service->id] = $service;
51 51
        }
52 52
     }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function create($service)
58 58
     {
59
-        if(!isset($this->services[$service])) {
59
+        if (!isset($this->services[$service])) {
60 60
             throw new NotFoundException('Service not found: ' . $service);
61 61
         }
62 62
 
Please login to merge, or discard this patch.
src/Container.php 3 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace Gr8abbasi\Container;
4 4
 
5
-use Interop\Container\ContainerInterface;
6
-use Gr8abbasi\Container\Exception\NotFoundException;
7 5
 use Gr8abbasi\Container\Exception\ContainerException;
6
+use Gr8abbasi\Container\Exception\NotFoundException;
8 7
 use Gr8abbasi\Container\Factory\ConfigFileServiceFactory;
9 8
 use Gr8abbasi\Container\Repository\InMemoryServiceRepository;
9
+use Interop\Container\ContainerInterface;
10 10
 
11 11
 /**
12 12
  * Container Class
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,8 +76,9 @@
 block discarded – undo
76 76
      * Create service and add to the
77 77
      * repository
78 78
      *
79
-     * @param string $name
80 79
      *
80
+     * @param string $id
81
+     * @param Container $container
81 82
      * @return void
82 83
      */
83 84
     private function createService($id, $container)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 
114 114
         if (isset($this->currentServices[$name])) {
115 115
             throw new CircularDependencyException(
116
-                'Circular dependency detected: '. key($this->resolvedServices[$name]) . '=> {$name}'
116
+                'Circular dependency detected: ' . key($this->resolvedServices[$name]) . '=> {$name}'
117 117
             );
118 118
         }
119 119
     }
Please login to merge, or discard this patch.
src/Factory/ConfigFileServiceFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         $class = new \ReflectionClass($service['class']);
38 38
 
39
-        $arguments = isset($service['arguments'])? $service['arguments'] : [] ;
39
+        $arguments = isset($service['arguments']) ? $service['arguments'] : [];
40 40
 
41 41
         return $class->newInstanceArgs(
42 42
             $this->resolveArguments(
Please login to merge, or discard this patch.