Passed
Push — master ( 1eab0f...766e74 )
by Php Easy Api
03:09
created
src/resta/Support/FileProcess.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * @var array
27 27
      */
28
-    protected $stubList=array();
28
+    protected $stubList = array();
29 29
 
30 30
     /**
31 31
      * FileProcess constructor.
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
      * @param $data
42 42
      * @return bool
43 43
      */
44
-    public function dumpFile($file,$data)
44
+    public function dumpFile($file, $data)
45 45
     {
46 46
         try {
47
-            $this->fs->dumpFile($file,$data);
47
+            $this->fs->dumpFile($file, $data);
48 48
             return true;
49 49
         } catch (IOExceptionInterface $exception) {
50 50
             return false;
@@ -56,21 +56,21 @@  discard block
 block discarded – undo
56 56
      * @param bool $status
57 57
      * @return mixed
58 58
      */
59
-    public function makeDirectory($data,$status=false)
59
+    public function makeDirectory($data, $status = false)
60 60
     {
61
-        if($data->type=="project" && file_exists($data->project)){
61
+        if ($data->type=="project" && file_exists($data->project)) {
62 62
             throw new \LogicException('This Project Is Already Available');
63 63
         }
64
-        if(false===$status){
64
+        if (false===$status) {
65 65
 
66
-            if($data->type!=="project" && !file_exists($data->project)){
66
+            if ($data->type!=="project" && !file_exists($data->project)) {
67 67
                 throw new \LogicException('Project No');
68 68
             }
69 69
         }
70
-        foreach ($data->directory as $directory){
70
+        foreach ($data->directory as $directory) {
71 71
             try {
72
-                $this->fs->mkdir($directory,'0777');
73
-                chmod($directory,0777);
72
+                $this->fs->mkdir($directory, '0777');
73
+                chmod($directory, 0777);
74 74
             } catch (IOExceptionInterface $e) {
75 75
                 return "An error occurred while creating your directory at ".$e->getPath();
76 76
             }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function setDirectory($directory)
85 85
     {
86 86
         try {
87
-            $this->fs->mkdir($directory,'07777');
87
+            $this->fs->mkdir($directory, '07777');
88 88
         } catch (IOExceptionInterface $e) {
89 89
             return "An error occurred while creating your directory at ".$e->getPath();
90 90
         }
@@ -102,25 +102,25 @@  discard block
 block discarded – undo
102 102
      * @param $data
103 103
      * @param array $complex
104 104
      */
105
-    public function touch($data,$complex=array())
105
+    public function touch($data, $complex = array())
106 106
     {
107
-        $this->data=$data;
107
+        $this->data = $data;
108 108
 
109
-        if(isset($complex['stub']) && isset($this->data->argument['stub'])){
109
+        if (isset($complex['stub']) && isset($this->data->argument['stub'])) {
110 110
 
111 111
             $this->stubManager($complex);
112 112
         }
113 113
 
114
-        $execArray=(count($this->stubList)) ? $this->stubList : $this->data->touch;
114
+        $execArray = (count($this->stubList)) ? $this->stubList : $this->data->touch;
115 115
 
116
-        foreach ($execArray as $execution=>$touch){
116
+        foreach ($execArray as $execution=>$touch) {
117 117
 
118
-            if(!file_exists($touch) && $touch!==null){
118
+            if (!file_exists($touch) && $touch!==null) {
119 119
                 touch($touch);
120 120
 
121
-                $executionPath=$this->stubPath.'/'.$execution.'.stub';
122
-                if(file_exists($executionPath)){
123
-                    $this->fopenprocess($executionPath,$touch,$data);
121
+                $executionPath = $this->stubPath.'/'.$execution.'.stub';
122
+                if (file_exists($executionPath)) {
123
+                    $this->fopenprocess($executionPath, $touch, $data);
124 124
                 }
125 125
             }
126 126
         }
@@ -129,37 +129,37 @@  discard block
 block discarded – undo
129 129
     /**
130 130
      * @param array $complex
131 131
      */
132
-    private function stubManager($complex=array())
132
+    private function stubManager($complex = array())
133 133
     {
134
-        $stubStructure      = explode("_",$complex['stub']);
134
+        $stubStructure      = explode("_", $complex['stub']);
135 135
         $stubStructure[]    = $this->data->argument['stub'];
136 136
 
137
-        $stubberDirectoryList=path()->stubs();
137
+        $stubberDirectoryList = path()->stubs();
138 138
 
139
-        foreach ($stubStructure as $stubberDirectory){
139
+        foreach ($stubStructure as $stubberDirectory) {
140 140
 
141
-            $stubberDirectoryList=$stubberDirectoryList.'/'.$stubberDirectory;
141
+            $stubberDirectoryList = $stubberDirectoryList.'/'.$stubberDirectory;
142 142
 
143 143
             $this->setDirectory($stubberDirectoryList);
144 144
         }
145 145
         
146
-        foreach ($this->data->touch as $execution=>$executionFile){
146
+        foreach ($this->data->touch as $execution=>$executionFile) {
147 147
 
148
-            $executionArray=explode("/",$execution);
148
+            $executionArray = explode("/", $execution);
149 149
 
150 150
             $executionStub                      = end($executionArray).'';
151 151
             $this->stubList[$executionStub]     = $executionFile;
152 152
             $stubberFile                        = $stubberDirectoryList.'/'.$executionStub.'.stub';
153 153
 
154
-            $originalPath=$this->stubPath.'/'.$execution.'.stub';
154
+            $originalPath = $this->stubPath.'/'.$execution.'.stub';
155 155
 
156
-            if(!file_exists($stubberFile)){
156
+            if (!file_exists($stubberFile)) {
157 157
 
158
-                $this->fs->copy($originalPath,$stubberFile);
158
+                $this->fs->copy($originalPath, $stubberFile);
159 159
             }
160 160
         }
161 161
 
162
-        $this->stubPath=$stubberDirectoryList;
162
+        $this->stubPath = $stubberDirectoryList;
163 163
     }
164 164
 
165 165
 
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
      * @param $param
170 170
      * @return bool
171 171
      */
172
-    public function fopenprocess($executionPath,$path,$param)
172
+    public function fopenprocess($executionPath, $path, $param)
173 173
     {
174 174
         $dt = fopen($executionPath, "r");
175 175
         $content = fread($dt, filesize($executionPath));
176 176
         fclose($dt);
177 177
 
178
-        foreach ($param->argument as $key=>$value){
178
+        foreach ($param->argument as $key=>$value) {
179 179
 
180
-            $content=str_replace("__".$key."__",$value,$content);
180
+            $content = str_replace("__".$key."__", $value, $content);
181 181
         }
182 182
 
183 183
         $dt = fopen($path, "w");
@@ -193,14 +193,14 @@  discard block
 block discarded – undo
193 193
      * @param $param
194 194
      * @return bool
195 195
      */
196
-    public function stubCopy($executionPath,$path,$param)
196
+    public function stubCopy($executionPath, $path, $param)
197 197
     {
198 198
         $dt = fopen($executionPath, "r");
199 199
         $content = fread($dt, filesize($executionPath));
200 200
         fclose($dt);
201 201
 
202
-        foreach ($param->argument as $key=>$value){
203
-            $content=str_replace("__".$key."__",$value,$content);
202
+        foreach ($param->argument as $key=>$value) {
203
+            $content = str_replace("__".$key."__", $value, $content);
204 204
         }
205 205
 
206 206
         $dt = fopen($path, "w");
@@ -214,9 +214,9 @@  discard block
 block discarded – undo
214 214
      * @param null $file
215 215
      * @return mixed|null
216 216
      */
217
-    public function callFile($file=null)
217
+    public function callFile($file = null)
218 218
     {
219
-        if(file_exists($file)){
219
+        if (file_exists($file)) {
220 220
             return require_once($file);
221 221
         }
222 222
         return null;
Please login to merge, or discard this patch.
bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 //root definer: application root path
4
-define("root",str_replace("\\","/",realpath(__DIR__.'/')));
4
+define("root", str_replace("\\", "/", realpath(__DIR__.'/')));
5 5
 
6 6
 /**
7 7
  * resta system composer vendor autoload.
Please login to merge, or discard this patch.
src/resta/Request/RequestHttpManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@
 block discarded – undo
33 33
     {
34 34
         $inputs = $this->app->get($this->method);
35 35
 
36
-        $content = json_decode($this->app['request']->getContent(),1);
36
+        $content = json_decode($this->app['request']->getContent(), 1);
37 37
 
38
-        if(is_array($inputs) && count($inputs)){
38
+        if (is_array($inputs) && count($inputs)) {
39 39
             return $inputs;
40 40
         }
41 41
 
Please login to merge, or discard this patch.
src/resta/Contracts/ContainerContracts.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
      * @param $callback null
11 11
      * @return mixed
12 12
      */
13
-    public function bind($object=null,$callback=null);
13
+    public function bind($object = null, $callback = null);
14 14
 
15 15
     /**
16 16
      * @param $abstract
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @param $container false
38 38
      * @return mixed
39 39
      */
40
-    public function make($object=null,$callback=null,$container=false);
40
+    public function make($object = null, $callback = null, $container = false);
41 41
 
42 42
     /**
43 43
      * @param $key
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
      * @param null $concrete
46 46
      * @return mixed
47 47
      */
48
-    public function register($key,$object,$concrete=null);
48
+    public function register($key, $object, $concrete = null);
49 49
 
50 50
     /**
51 51
      * @param null $object
52 52
      * @param null $callback
53 53
      * @return mixed
54 54
      */
55
-    public function share($object=null,$callback=null);
55
+    public function share($object = null, $callback = null);
56 56
 
57 57
     /**
58 58
      * @method singleton
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @param array $bind
66 66
      * @return mixed
67 67
      */
68
-    public function resolve($class,$bind=array());
68
+    public function resolve($class, $bind = array());
69 69
 
70 70
     /**
71 71
      * @param $class
Please login to merge, or discard this patch.
src/resta/Provider/ServiceProvider.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
      * @param string $provider
22 22
      * @param string $method
23 23
      */
24
-    private function applyProvider($key,$provider,$method='register')
24
+    private function applyProvider($key, $provider, $method = 'register')
25 25
     {
26 26
         // If the provider classes are a real object
27 27
         // we will run them.
28
-        if(Utils::isNamespaceExists($provider)){
28
+        if (Utils::isNamespaceExists($provider)) {
29 29
 
30 30
             // after determining whether the register or boot methods
31 31
             // we are running the provider.
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
             $providerInstance = $this->app->resolve($provider);
34 34
 
35 35
             //we need to do method check for provider.
36
-            if(method_exists($providerInstance,$method)){
36
+            if (method_exists($providerInstance, $method)) {
37 37
                 $providerInstance->{$method}();
38 38
 
39
-                if($method=="register"){
39
+                if ($method=="register") {
40 40
                     /** @scrutinizer ignore-call */
41
-                    $this->app->register('loadedProviders',$key,$provider);
41
+                    $this->app->register('loadedProviders', $key, $provider);
42 42
                 }
43 43
             }
44 44
         }
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
      */
52 52
     private function assignerLoadedProvidersInitialCoreValue()
53 53
     {
54
-        if(!isset($this->app['loadedProviders'])){
54
+        if (!isset($this->app['loadedProviders'])) {
55 55
 
56 56
             // for loaded providers,
57 57
             // we register an empty array for the container object.
58 58
             /** @scrutinizer ignore-call */
59
-            $this->app->register('loadedProviders',[]);
59
+            $this->app->register('loadedProviders', []);
60 60
         }
61 61
     }
62 62
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         /** @scrutinizer ignore-call */
72 72
         $providers = $this->app->serviceProviders();
73 73
 
74
-        if(count($providers)){
74
+        if (count($providers)) {
75 75
             $this->providers = $providers;
76 76
         }
77 77
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function handle()
87 87
     {
88
-        define ('serviceprovider',true);
88
+        define('serviceprovider', true);
89 89
 
90 90
         //check providers and resolve
91 91
         $this->resolveProviders($this->getServiceProviders());
@@ -96,28 +96,28 @@  discard block
 block discarded – undo
96 96
      *
97 97
      * @param array $providers
98 98
      */
99
-    public function resolveProviders($providers=array())
99
+    public function resolveProviders($providers = array())
100 100
     {
101 101
         // for loaded providers,
102 102
         // we register an empty array for the container object.
103 103
         $this->assignerLoadedProvidersInitialCoreValue();
104 104
 
105 105
         //first we are running register methods of provider classes.
106
-        foreach($providers as $key=>$provider){
106
+        foreach ($providers as $key=>$provider) {
107 107
 
108 108
             // providers can only be installed once.
109 109
             // apply providers and register for kernel
110
-            if(!isset($this->app['loadedProviders'][$key])){
111
-                $this->applyProvider($key,$provider);
110
+            if (!isset($this->app['loadedProviders'][$key])) {
111
+                $this->applyProvider($key, $provider);
112 112
             }
113 113
         }
114 114
 
115 115
         //then we are running boot methods of provider classes.
116
-        foreach($providers as $key=>$provider){
116
+        foreach ($providers as $key=>$provider) {
117 117
 
118 118
             //if the providers register is already booted.
119
-            if(isset($this->app['loadedProviders'][$key])){
120
-                $this->applyProvider($key,$provider,'boot');
119
+            if (isset($this->app['loadedProviders'][$key])) {
120
+                $this->applyProvider($key, $provider, 'boot');
121 121
             }
122 122
         }
123 123
     }
Please login to merge, or discard this patch.
src/resta/Foundation/Bootstrapper/CustomBooter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,20 +48,20 @@  discard block
 block discarded – undo
48 48
 
49 49
         //Now, let's get our custom boot list.
50 50
         //Let's assign the final state to our booterList list along with our custom boot list.
51
-        foreach (array_keys($this->getBootDirectory()) as $customBoots){
51
+        foreach (array_keys($this->getBootDirectory()) as $customBoots) {
52 52
 
53 53
             //We assign the namespace data of the bootable class to the bootNamespace property.
54
-            $this->bootNamespace=''.StaticPathList::$boot.'\\'.$customBoots;
54
+            $this->bootNamespace = ''.StaticPathList::$boot.'\\'.$customBoots;
55 55
 
56 56
             //Your custom boot objects in
57 57
             //the boot directory should not be in the middlewaregroups list.
58
-            if(false===app()->console() && !in_array($this->bootNamespace,$booterList)){
58
+            if (false===app()->console() && !in_array($this->bootNamespace, $booterList)) {
59 59
                 $this->booterManifest();
60 60
             }
61 61
         }
62 62
 
63 63
         //The booterList property combines booterList variables.
64
-        return array_merge($booterList,$this->booterList);
64
+        return array_merge($booterList, $this->booterList);
65 65
     }
66 66
 
67 67
     /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         //if the boot list belongs to the custom booter,
74 74
         //then we can boot our custom boot objects by adding them at the end of this class.
75
-        if(array_pop($booter)==$this->customBooter){
75
+        if (array_pop($booter)==$this->customBooter) {
76 76
             return $this->addCustomBooter();
77 77
         }
78 78
 
Please login to merge, or discard this patch.
src/resta/Contracts/ApplicationContracts.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,18 +39,18 @@  discard block
 block discarded – undo
39 39
     /**
40 40
      * @return mixed
41 41
      */
42
-   public function console();
42
+    public function console();
43 43
 
44 44
     /**
45 45
      * @return mixed
46 46
      */
47
-   public function corePath();
47
+    public function corePath();
48 48
 
49 49
     /**
50 50
      * @param array $environment
51 51
      * @return mixed
52 52
      */
53
-   public function environment($environment=array());
53
+    public function environment($environment=array());
54 54
 
55 55
     /**
56 56
      * @param $abstract
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * @return mixed
63 63
      */
64
-   public function handle();
64
+    public function handle();
65 65
 
66 66
     /**
67 67
      * @param $abstract
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
      * @param $instance
75 75
      * @return mixed
76 76
      */
77
-   public function instance ($abstract,$instance);
77
+    public function instance ($abstract,$instance);
78 78
 
79 79
     /**
80 80
      * @return mixed
81 81
      */
82
-   public function isLocale();
82
+    public function isLocale();
83 83
 
84 84
     /**
85 85
      * @method kernel
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
     /**
91 91
      * @return array
92 92
      */
93
-   public function kernelGroupKeys();
93
+    public function kernelGroupKeys();
94 94
 
95 95
     /**
96 96
      * @return array
97 97
      */
98
-   public function kernelGroupList();
98
+    public function kernelGroupList();
99 99
 
100 100
     /**
101 101
      * @param callable $callback
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      * @param string $path
161 161
      * @return mixed
162 162
      */
163
-   public function setPaths($name,$path);
163
+    public function setPaths($name,$path);
164 164
 
165 165
     /**
166 166
      * @param null $object
@@ -178,5 +178,5 @@  discard block
 block discarded – undo
178 178
     /**
179 179
      * @return mixed
180 180
      */
181
-   public function version();
181
+    public function version();
182 182
 }
183 183
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
      * @param $callback null
11 11
      * @return mixed
12 12
      */
13
-    public function bind($object=null,$callback=null);
13
+    public function bind($object = null, $callback = null);
14 14
 
15 15
     /**
16 16
      * @param $object
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param array $arguments
24 24
      * @return mixed
25 25
      */
26
-    public function command($command,$arguments=array());
26
+    public function command($command, $arguments = array());
27 27
 
28 28
     /**
29 29
      * @return array
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @param array $environment
51 51
      * @return mixed
52 52
      */
53
-   public function environment($environment=array());
53
+   public function environment($environment = array());
54 54
 
55 55
     /**
56 56
      * @param $abstract
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * @param $instance
75 75
      * @return mixed
76 76
      */
77
-   public function instance ($abstract,$instance);
77
+   public function instance($abstract, $instance);
78 78
 
79 79
     /**
80 80
      * @return mixed
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * @param array $loaders
108 108
      * @return mixed
109 109
      */
110
-    public function loadIfNotExistBoot($loaders=array());
110
+    public function loadIfNotExistBoot($loaders = array());
111 111
 
112 112
     /**
113 113
      * @method bind
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      * @param $container false
117 117
      * @return mixed
118 118
      */
119
-    public function make($object=null,$callback=null,$container=false);
119
+    public function make($object = null, $callback = null, $container = false);
120 120
 
121 121
     /**
122 122
      * @param $maker
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
      * @param null $concrete
131 131
      * @return mixed
132 132
      */
133
-    public function register($key,$object,$concrete=null);
133
+    public function register($key, $object, $concrete = null);
134 134
 
135 135
     /**
136 136
      * @param $class
137 137
      * @param array $bind
138 138
      * @return mixed
139 139
      */
140
-    public function resolve($class,$bind=array());
140
+    public function resolve($class, $bind = array());
141 141
 
142 142
     /**
143 143
      * @param $class
@@ -160,14 +160,14 @@  discard block
 block discarded – undo
160 160
      * @param string $path
161 161
      * @return mixed
162 162
      */
163
-   public function setPaths($name,$path);
163
+   public function setPaths($name, $path);
164 164
 
165 165
     /**
166 166
      * @param null $object
167 167
      * @param null $callback
168 168
      * @return mixed
169 169
      */
170
-    public function share($object=null,$callback=null);
170
+    public function share($object = null, $callback = null);
171 171
 
172 172
     /**
173 173
      * @method singleton
Please login to merge, or discard this patch.
src/resta/Url/UrlVersionIdentifier.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public static function clientVersion()
22 22
     {
23
-        if(defined('version')){
23
+        if (defined('version')) {
24 24
             return version;
25 25
         }
26 26
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public static function getConsoleVersion()
46 46
     {
47
-        if(Utils::isNamespaceExists(self::versionNamespace()) && method_exists(self::versionNamespace(),'consoleVersion')){
47
+        if (Utils::isNamespaceExists(self::versionNamespace()) && method_exists(self::versionNamespace(), 'consoleVersion')) {
48 48
             return self::versionNamespace()::consoleVersion();
49 49
         }
50 50
 
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
      * @param array $versions
56 56
      * @return array
57 57
      */
58
-    private static function getSupportedVersions($versions=array())
58
+    private static function getSupportedVersions($versions = array())
59 59
     {
60
-        if(count($versions)){
60
+        if (count($versions)) {
61 61
             return $versions;
62 62
         }
63 63
         return self::$supportedVersions;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param array $versions
70 70
      * @return mixed
71 71
      */
72
-    public static function supportedVersions($versions=array())
72
+    public static function supportedVersions($versions = array())
73 73
     {
74 74
         return self::versionNamespace()::getSupportedVersions($versions);
75 75
     }
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public static function version()
83 83
     {
84
-        if(self::clientVersion()!==null){
84
+        if (self::clientVersion()!==null) {
85 85
             return self::clientVersion();
86 86
         }
87 87
 
88
-        if(app()->console() && self::getConsoleVersion()!==null){
88
+        if (app()->console() && self::getConsoleVersion()!==null) {
89 89
             return self::getConsoleVersion();
90 90
         }
91 91
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public static function versionNamespace()
101 101
     {
102
-        if(file_exists(app()->path()->kernel())){
102
+        if (file_exists(app()->path()->kernel())) {
103 103
             return app()->namespace()->kernel().'\Version';
104 104
         }
105 105
 
Please login to merge, or discard this patch.
src/resta/Url/UrlParseException.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  discard block
 block discarded – undo
10 10
     /**
11 11
      * @param array $data
12 12
      */
13
-    public function exception($data=array())
13
+    public function exception($data = array())
14 14
     {
15
-        if(!isset($data['project']) and !isset($data['version'])){
15
+        if (!isset($data['project']) and !isset($data['version'])) {
16 16
             throw new DomainException('No Project or Version');
17 17
         }
18 18
 
@@ -21,17 +21,17 @@  discard block
 block discarded – undo
21 21
 
22 22
         //If there is no project on the url
23 23
         //we throw an exception
24
-        if($data['project']===null OR !file_exists($appPath)){
24
+        if ($data['project']===null OR !file_exists($appPath)) {
25 25
             throw new DomainException('No Project');
26 26
         }
27 27
 
28
-        if(!in_array($data['version'],UrlVersionIdentifier::supportedVersions())){
28
+        if (!in_array($data['version'], UrlVersionIdentifier::supportedVersions())) {
29 29
             throw new DomainException('Version Number is not supported');
30 30
         }
31 31
 
32 32
         //If there is no endpoint on the url
33 33
         //we throw an exception
34
-        if($data['endpoint']===null){
34
+        if ($data['endpoint']===null) {
35 35
             throw new DomainException('No Endpoint');
36 36
         }
37 37
     }
Please login to merge, or discard this patch.