Completed
Push — master ( db460e...6ada0e )
by Jean-Christophe
04:52
created
Ajax/semantic/html/collections/menus/HtmlPaginationMenu.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,19 +7,19 @@
 block discarded – undo
7 7
 
8 8
 use Ajax\semantic\html\elements\HtmlIcon;
9 9
 
10
-class HtmlPaginationMenu extends HtmlMenu{
10
+class HtmlPaginationMenu extends HtmlMenu {
11 11
 
12
-	public function __construct( $identifier, $items=array() ){
13
-		parent::__construct( $identifier,$items);
12
+	public function __construct($identifier, $items=array()) {
13
+		parent::__construct($identifier, $items);
14 14
 	}
15 15
 	/**
16 16
 	 * {@inheritDoc}
17 17
 	 * @see \Ajax\common\html\BaseHtml::compile()
18 18
 	 */
19
-	public function compile(JsUtils $js=NULL,$view=NULL){
19
+	public function compile(JsUtils $js=NULL, $view=NULL) {
20 20
 		$this->insertItem(new HtmlIcon("", "left chevron"));
21 21
 		$this->addItem(new HtmlIcon("", "right chevron"));
22 22
 		$this->asPagination();
23
-		return parent::compile($js,$view);
23
+		return parent::compile($js, $view);
24 24
 	}
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/php/phalcon/JsUtils.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,9 @@
 block discarded – undo
56 56
 		if(\sizeof($params)>0 || \strtolower($action)!="index" ){
57 57
 			$items[]=$action;
58 58
 			foreach ($params as $p){
59
-				if(\is_object($p)===false)
60
-					$items[]=$p;
59
+				if(\is_object($p)===false) {
60
+									$items[]=$p;
61
+				}
61 62
 			}
62 63
 		}
63 64
 		return $items;
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 use Phalcon\Mvc\View;
8 8
 use Phalcon\Mvc\Controller;
9 9
 
10
-class JsUtils extends \Ajax\JsUtils implements InjectionAwareInterface{
10
+class JsUtils extends \Ajax\JsUtils implements InjectionAwareInterface {
11 11
 	protected $_di;
12 12
 	public function setDi(DiInterface $di) {
13 13
 		$this->_di=$di;
@@ -18,49 +18,49 @@  discard block
 block discarded – undo
18 18
 		return $this->_di;
19 19
 	}
20 20
 
21
-	public function getUrl($url){
21
+	public function getUrl($url) {
22 22
 		return $this->_di->get("url")->get($url);
23 23
 	}
24 24
 
25
-	public function addViewElement($identifier,$content,$view){
25
+	public function addViewElement($identifier, $content, $view) {
26 26
 		$controls=$view->getVar("q");
27
-		if (isset($controls) === false) {
28
-			$controls=array ();
27
+		if (isset($controls)===false) {
28
+			$controls=array();
29 29
 		}
30 30
 		$controls[$identifier]=$content;
31 31
 		$view->setVar("q", $controls);
32 32
 	}
33 33
 
34
-	public function createScriptVariable($view,$view_var, $output){
35
-		$view->setVar($view_var,$output);
34
+	public function createScriptVariable($view, $view_var, $output) {
35
+		$view->setVar($view_var, $output);
36 36
 	}
37 37
 
38
-	public function forward($initialController,$controller,$action){
39
-		$dispatcher = $initialController->dispatcher;
38
+	public function forward($initialController, $controller, $action) {
39
+		$dispatcher=$initialController->dispatcher;
40 40
 		$dispatcher->setControllerName($controller);
41 41
 		$dispatcher->setActionName($action);
42 42
 		$dispatcher->dispatch();
43
-		$template=$initialController->view->getRender($dispatcher->getControllerName(), $dispatcher->getActionName(),$dispatcher->getParams(), function ($view) {
43
+		$template=$initialController->view->getRender($dispatcher->getControllerName(), $dispatcher->getActionName(), $dispatcher->getParams(), function($view) {
44 44
 			$view->setRenderLevel(View::LEVEL_ACTION_VIEW);
45 45
 		});
46 46
 		return $template;
47 47
 	}
48 48
 
49 49
 	public function renderContent($view, $controller, $action, $params=NULL) {
50
-		$template=$view->getRender($controller, $action, $params, function ($view) {
50
+		$template=$view->getRender($controller, $action, $params, function($view) {
51 51
 			$view->setRenderLevel(View::LEVEL_ACTION_VIEW);
52 52
 		});
53 53
 		return $template;
54 54
 	}
55 55
 
56
-	public function fromDispatcher($dispatcher){
56
+	public function fromDispatcher($dispatcher) {
57 57
 		$params=$dispatcher->getParams();
58 58
 		$action=$dispatcher->getActionName();
59 59
 		$items=array($dispatcher->getControllerName());
60
-		if(\sizeof($params)>0 || \strtolower($action)!="index" ){
60
+		if (\sizeof($params)>0 || \strtolower($action)!="index") {
61 61
 			$items[]=$action;
62
-			foreach ($params as $p){
63
-				if(\is_object($p)===false)
62
+			foreach ($params as $p) {
63
+				if (\is_object($p)===false)
64 64
 					$items[]=$p;
65 65
 			}
66 66
 		}
Please login to merge, or discard this patch.
Ajax/php/laravel/JsUtils.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,27 +5,27 @@  discard block
 block discarded – undo
5 5
 use Illuminate\Support\Facades\Request;
6 6
 use Illuminate\Support\Facades\App;
7 7
 use Illuminate\Support\Facades\Route;
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 \url($url);
11 11
 	}
12
-	public function addViewElement($identifier,$content,$view){
12
+	public function addViewElement($identifier, $content, $view) {
13 13
 		$controls=$view->__get("q");
14
-		if (isset($controls) === false) {
15
-			$controls=array ();
14
+		if (isset($controls)===false) {
15
+			$controls=array();
16 16
 		}
17 17
 		$controls[$identifier]=$content;
18 18
 		$view->__set("q", $controls);
19 19
 	}
20 20
 
21
-	public function createScriptVariable($view,$view_var, $output){
22
-		$view->__set($view_var,$output);
21
+	public function createScriptVariable($view, $view_var, $output) {
22
+		$view->__set($view_var, $output);
23 23
 	}
24 24
 
25
-	public function forward($initialController,$controller,$action){
25
+	public function forward($initialController, $controller, $action) {
26 26
 		//\request()->attributes->all()
27
-		$url=\action($controller.'@'.$action, [],false);
28
-		$request = Request::create($url, 'GET');
27
+		$url=\action($controller.'@'.$action, [], false);
28
+		$request=Request::create($url, 'GET');
29 29
 		// handle the response
30 30
 		return Route::dispatch($request)->getContent();
31 31
 		//return App::make($controller)->{$action}(\request()->attributes->all());
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 	}
35 35
 
36 36
 	public function renderContent($view, $controller, $action, $params=NULL) {
37
-		$template=$view->getRender($controller, $action, $params, function ($view) {
37
+		$template=$view->getRender($controller, $action, $params, function($view) {
38 38
 			$view->setRenderLevel(View::LEVEL_ACTION_VIEW);
39 39
 		});
40 40
 		return $template;
41 41
 	}
42 42
 
43
-	public function fromDispatcher($dispatcher){
43
+	public function fromDispatcher($dispatcher) {
44 44
 		return $dispatcher->segments();
45 45
 	}
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.