Completed
Push — master ( bc53b5...fc9cad )
by Jean-Christophe
03:58
created
Ajax/php/cakephp/_JsUtils.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,15 +48,15 @@
 block discarded – undo
48 48
 	}
49 49
 
50 50
 	public function renderContent($initialControllerInstance,$viewName, $params=NULL) {
51
-        if ($initialControllerInstance->has('templating')) {
52
-            return $initialControllerInstance->get('templating')->render($viewName, $params);
53
-        }
51
+		if ($initialControllerInstance->has('templating')) {
52
+			return $initialControllerInstance->get('templating')->render($viewName, $params);
53
+		}
54 54
 
55
-        if (!$initialControllerInstance->has('twig')) {
56
-            throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available.');
57
-        }
55
+		if (!$initialControllerInstance->has('twig')) {
56
+			throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available.');
57
+		}
58 58
 
59
-        return $initialControllerInstance->get('twig')->render($viewName, $params);
59
+		return $initialControllerInstance->get('twig')->render($viewName, $params);
60 60
 	}
61 61
 
62 62
 	public function fromDispatcher($dispatcher){
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -5,23 +5,23 @@  discard block
 block discarded – undo
5 5
 
6 6
 use Ajax\service\JString;
7 7
 use Cake\Routing\Router;
8
-class _JsUtils extends \Ajax\JsUtils{
9
-	public function getUrl($url){
8
+class _JsUtils extends \Ajax\JsUtils {
9
+	public function getUrl($url) {
10 10
 		return Router::url($url);
11 11
 	}
12
-	public function addViewElement($identifier,$content,&$view){
12
+	public function addViewElement($identifier, $content, &$view) {
13 13
 		$viewVars=$view->viewVars;
14
-		if (isset($viewVars["q"]) === false) {
15
-			$controls=array ();
16
-		}else{
14
+		if (isset($viewVars["q"])===false) {
15
+			$controls=array();
16
+		} else {
17 17
 			$controls=$viewVars["q"];
18 18
 		}
19 19
 		$controls[$identifier]=$content;
20 20
 		$view->set("q", $controls);
21 21
 	}
22 22
 
23
-	public function createScriptVariable(&$view,$view_var, $output){
24
-		$view->set($view_var,$output);
23
+	public function createScriptVariable(&$view, $view_var, $output) {
24
+		$view->set($view_var, $output);
25 25
 	}
26 26
 
27 27
 	/**
@@ -31,17 +31,17 @@  discard block
 block discarded – undo
31 31
 	 * @param array $params
32 32
 	 * @see \Ajax\JsUtils::forward()
33 33
 	 */
34
-	public function forward($initialControllerInstance,$controllerName,$actionName,$params=array()){
34
+	public function forward($initialControllerInstance, $controllerName, $actionName, $params=array()) {
35 35
 		$path=$params;
36
-		$request = $initialControllerInstance->get('request_stack')->getCurrentRequest();
37
-		$path['_forwarded'] = $request->attributes;
38
-		$path['_controller'] = $controllerName.":".$actionName;
39
-		$subRequest = $request->duplicate([], null, $path);
40
-		$response= $initialControllerInstance->get('http_kernel')->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
36
+		$request=$initialControllerInstance->get('request_stack')->getCurrentRequest();
37
+		$path['_forwarded']=$request->attributes;
38
+		$path['_controller']=$controllerName.":".$actionName;
39
+		$subRequest=$request->duplicate([], null, $path);
40
+		$response=$initialControllerInstance->get('http_kernel')->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
41 41
 		return $response->getContent();
42 42
 	}
43 43
 
44
-	public function renderContent($initialControllerInstance,$viewName, $params=NULL) {
44
+	public function renderContent($initialControllerInstance, $viewName, $params=NULL) {
45 45
         if ($initialControllerInstance->has('templating')) {
46 46
             return $initialControllerInstance->get('templating')->render($viewName, $params);
47 47
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         return $initialControllerInstance->get('twig')->render($viewName, $params);
54 54
 	}
55 55
 
56
-	public function fromDispatcher($dispatcher){
56
+	public function fromDispatcher($dispatcher) {
57 57
 		return \explode("/", Router::getRequest(true)->url);
58 58
 	}
59 59
 }
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 		$viewVars=$view->viewVars;
14 14
 		if (isset($viewVars["q"]) === false) {
15 15
 			$controls=array ();
16
-		}else{
16
+		} else{
17 17
 			$controls=$viewVars["q"];
18 18
 		}
19 19
 		$controls[$identifier]=$content;
Please login to merge, or discard this patch.
Ajax/php/cakephp/JsUtilsComponent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 	public $jquery;
13 13
 		\extract($config);
14 14
 		$this->jquery=new _JsUtils();
15
-		if(isset($semantic)){
15
+		if (isset($semantic)) {
16 16
 			$this->jquery->semantic(new Semantic());
17 17
 		}
18 18
 	}
Please login to merge, or discard this patch.