@@ -22,8 +22,7 @@ public function editApp($name, $appSetting)
2222
2323 try {
2424 $ setting = Tools::jsonDecode ($ option , true );
25- } catch (Exception $ e ) {
26-
25+ } catch (Exception $ e ) {
2726 }
2827
2928 $ app = $ this ->getApp ($ name );
@@ -38,19 +37,19 @@ public function editApp($name, $appSetting)
3837 $ setting [] = $ appSetting ;
3938 }
4039
41- Configuration::updateValue ('vuefront-apps ' , Tools::jsonEncode ($ setting ), null ,0 , 0 );
40+ Configuration::updateValue ('vuefront-apps ' , Tools::jsonEncode ($ setting ), null , 0 , 0 );
4241 }
4342
44- public function checkAccess () {
43+ public function checkAccess ()
44+ {
4545
4646 $ option = Configuration::get ('vuefront-settings ' );
4747
4848 $ setting = array ();
4949
5050 try {
5151 $ setting = Tools::jsonDecode ($ option , true );
52- } catch (Exception $ e ) {
53-
52+ } catch (Exception $ e ) {
5453 }
5554
5655 if (!Tools::getValue ('accessKey ' )) {
@@ -59,7 +58,7 @@ public function checkAccess() {
5958
6059 $ result = false ;
6160 foreach ($ setting as $ key => $ value ) {
62- if ($ key === 'accessKey ' && Tools::getValue ('accessKey ' ) === $ value ) {
61+ if ($ key === 'accessKey ' && Tools::getValue ('accessKey ' ) === $ value ) {
6362 $ result = true ;
6463 }
6564 }
@@ -74,7 +73,7 @@ public function getApp($name)
7473
7574 try {
7675 $ setting = Tools::jsonDecode ($ option , true );
77- } catch (Exception $ e ) {
76+ } catch (Exception $ e ) {
7877 }
7978 foreach ($ setting as $ value ) {
8079 if ($ value ['codename ' ] == $ name ) {
@@ -85,14 +84,15 @@ public function getApp($name)
8584 return false ;
8685 }
8786
88- public function getAppsForEvent () {
87+ public function getAppsForEvent ()
88+ {
8989 $ option = Configuration::get ('vuefront-apps ' );
9090
9191 $ setting = array ();
9292
9393 try {
9494 $ setting = Tools::jsonDecode ($ option , true );
95- } catch (Exception $ e ) {
95+ } catch (Exception $ e ) {
9696 }
9797 $ result = [];
9898 foreach ($ setting as $ value ) {
@@ -122,7 +122,8 @@ public function pushEvent($name, $data)
122122 return $ data ;
123123 }
124124
125- public function request ($ url , $ data , $ token = false ) {
125+ public function request ($ url , $ data , $ token = false )
126+ {
126127 $ ch = curl_init ();
127128 $ headers = array ();
128129
@@ -151,7 +152,8 @@ public function request($url, $data, $token = false) {
151152 }
152153
153154
154- public function mergeSchemas ($ files ) {
155+ public function mergeSchemas ($ files )
156+ {
155157 $ rootQueryType = '' ;
156158 $ types = '' ;
157159 $ rootMutationType = '' ;
@@ -169,7 +171,8 @@ public function mergeSchemas($files) {
169171 $ types = $ types .PHP_EOL .$ typesMatched [1 ];
170172 }
171173 }
172-
173- return "$ {types}" .PHP_EOL ."type RootQueryType { " .PHP_EOL ."$ {rootQueryType}" .PHP_EOL ."} " .PHP_EOL ."type RootMutationType { " .PHP_EOL ."$ {rootMutationType}" .PHP_EOL ."} " ;
174+ return "$ {types}" .PHP_EOL ."type RootQueryType { " .PHP_EOL ."$ {rootQueryType}"
175+ .PHP_EOL ."} " .PHP_EOL ."type RootMutationType { " .PHP_EOL ."$ {rootMutationType}"
176+ .PHP_EOL ."} " ;
174177 }
175- }
178+ }
0 commit comments