Passed
Push — 1.10.x ( 08890a...2189d7 )
by Yannick
116:38 queued 75:46
created
src/Chamilo/CoreBundle/Entity/BranchSync.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
      */
137 137
     private $lastSyncType;
138 138
 
139
-     /**
140
-     * @var string
141
-     *
142
-     * @ORM\Column(name="ssl_pub_key", type="string", length=250, nullable=true, unique=false)
143
-     */
139
+        /**
140
+         * @var string
141
+         *
142
+         * @ORM\Column(name="ssl_pub_key", type="string", length=250, nullable=true, unique=false)
143
+         */
144 144
     private $sslPubKey;
145 145
 
146 146
     /**
@@ -529,12 +529,12 @@  discard block
 block discarded – undo
529 529
         return $this->sslPubKey;
530 530
     }
531 531
 
532
-     /**
533
-     * Set sslPubKey
534
-     *
535
-     * @param string $sslPubKey
536
-     * @return BranchSync
537
-     */
532
+        /**
533
+         * Set sslPubKey
534
+         *
535
+         * @param string $sslPubKey
536
+         * @return BranchSync
537
+         */
538 538
     public function setBranchType($branchType)
539 539
     {
540 540
         $this->branchType = $branchType;
Please login to merge, or discard this patch.
src/Chamilo/UserBundle/Entity/Repository/UserRepository.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
 {
26 26
 
27 27
     /**
28
-    * @param string $keyword
28
+     * @param string $keyword
29 29
      *
30
-    * @return mixed
31
-    */
30
+     * @return mixed
31
+     */
32 32
     public function searchUserByKeyword($keyword)
33 33
     {
34 34
         $qb = $this->createQueryBuilder('a');
Please login to merge, or discard this patch.
webchatdeny.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
 // table definitions
16 16
 $track_user_table = Database::get_main_table(TABLE_MAIN_USER);
17 17
 if (isset($_user['user_id']) && $_user['user_id'] != '') {
18
-	$_user['user_id'] = intval($_user['user_id']);
19
-	$sql = "update $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text='DENIED' where (user_id = ".$_user['user_id'].")";
20
-	$result = Database::query($sql);
18
+    $_user['user_id'] = intval($_user['user_id']);
19
+    $sql = "update $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text='DENIED' where (user_id = ".$_user['user_id'].")";
20
+    $result = Database::query($sql);
21 21
 }
22 22
 
23 23
 Display::display_header();
Please login to merge, or discard this patch.
plugin/before_login/plugin.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This script is a configuration file for the add_this plugin.
4
- * These settings will be used in the administration interface for plugins
5
- * (Chamilo configuration settings->Plugins)
6
- * @package chamilo.plugin
7
- * @author Julio Montoya <[email protected]>
8
- */
3
+     * This script is a configuration file for the add_this plugin.
4
+     * These settings will be used in the administration interface for plugins
5
+     * (Chamilo configuration settings->Plugins)
6
+     * @package chamilo.plugin
7
+     * @author Julio Montoya <[email protected]>
8
+     */
9 9
 
10 10
 /* Plugin config */
11 11
 
Please login to merge, or discard this patch.
plugin/pens/lib/pens/pens_request_alert.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@
 block discarded – undo
40 40
 
41 41
 class PENSRequestAlert extends PENSRequest {
42 42
 	
43
-	public function __construct($arguments) {
44
-		parent::__construct($arguments);
45
-		$this->setCommand("alert");
46
-	}
43
+    public function __construct($arguments) {
44
+        parent::__construct($arguments);
45
+        $this->setCommand("alert");
46
+    }
47 47
 
48 48
 }
Please login to merge, or discard this patch.
plugin/pens/lib/pens/pens_controller.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
  * along with php-pens.  If not, see <http://www.gnu.org/licenses/>.
17 17
  */
18 18
  
19
- /**
20
- * PENSController
21
- * 
22
- * Provides the PENSController class
23
- * 
24
- * @package PENS
25
- * @author Guillaume Viguier-Just <[email protected]>
26
- * @licence http://www.gnu.org/licenses/gpl.txt
27
- */
19
+    /**
20
+     * PENSController
21
+     * 
22
+     * Provides the PENSController class
23
+     * 
24
+     * @package PENS
25
+     * @author Guillaume Viguier-Just <[email protected]>
26
+     * @licence http://www.gnu.org/licenses/gpl.txt
27
+     */
28 28
 
29 29
 require_once(dirname(__FILE__)."/pens_request_factory.php");
30 30
 
@@ -39,24 +39,24 @@  discard block
 block discarded – undo
39 39
  */
40 40
 abstract class PENSController {
41 41
 	
42
-	/**
43
-	 * Parses a request based on the values present in $_REQUEST
44
-	 * 
45
-	 * @return PENSRequest Request generated
46
-	 * @throws PENSException if the request could not be parsed
47
-	 */
48
-	protected function parseRequest() {
49
-		$request = PENSRequestFactory::createPENSRequest($_REQUEST);
50
-		return $request;
51
-	}
42
+    /**
43
+     * Parses a request based on the values present in $_REQUEST
44
+     * 
45
+     * @return PENSRequest Request generated
46
+     * @throws PENSException if the request could not be parsed
47
+     */
48
+    protected function parseRequest() {
49
+        $request = PENSRequestFactory::createPENSRequest($_REQUEST);
50
+        return $request;
51
+    }
52 52
 	
53
-	/**
54
-	 * Sends the HTTP Response to the client
55
-	 * 
56
-	 * @param PENSResponse Response to be sent
57
-	 */
58
-	protected function sendResponse($response) {
59
-		$response->send();
60
-	}
53
+    /**
54
+     * Sends the HTTP Response to the client
55
+     * 
56
+     * @param PENSResponse Response to be sent
57
+     */
58
+    protected function sendResponse($response) {
59
+        $response->send();
60
+    }
61 61
 	
62 62
 }
Please login to merge, or discard this patch.
plugin/pens/lib/pens/pens_client.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
  * along with php-pens.  If not, see <http://www.gnu.org/licenses/>.
17 17
  */
18 18
  
19
- /**
20
- * PENSClient
21
- * 
22
- * Provides the PENSClient class
23
- * 
24
- * @package PENS
25
- * @author Guillaume Viguier-Just <[email protected]>
26
- * @licence http://www.gnu.org/licenses/gpl.txt
27
- */
19
+    /**
20
+     * PENSClient
21
+     * 
22
+     * Provides the PENSClient class
23
+     * 
24
+     * @package PENS
25
+     * @author Guillaume Viguier-Just <[email protected]>
26
+     * @licence http://www.gnu.org/licenses/gpl.txt
27
+     */
28 28
  
29 29
 require_once(dirname(__FILE__)."/pens_controller.php");
30 30
 require_once(dirname(__FILE__)."/pens_request_handler.php");
@@ -39,75 +39,75 @@  discard block
 block discarded – undo
39 39
  * @licence http://www.gnu.org/licenses/gpl.txt
40 40
  */
41 41
 class PENSClient extends PENSController {
42
-	/**
43
-	 * Instance of the PENSClient
44
-	 * @var PENSServer
45
-	 */
46
-	private static $_instance;
42
+    /**
43
+     * Instance of the PENSClient
44
+     * @var PENSServer
45
+     */
46
+    private static $_instance;
47 47
 	
48
-	/**
49
-	 * Request handler
50
-	 * @var PENSRequestHandler
51
-	 */
52
-	protected $_request_handler = null;
48
+    /**
49
+     * Request handler
50
+     * @var PENSRequestHandler
51
+     */
52
+    protected $_request_handler = null;
53 53
 	
54
-	/**
55
-	 * Private constructor
56
-	 */
57
-	private function __construct() {
58
-	}
54
+    /**
55
+     * Private constructor
56
+     */
57
+    private function __construct() {
58
+    }
59 59
 	
60
-	/**
61
-	 * Singleton method
62
-	 */
63
-	public static function singleton() {
64
-		if(!isset(self::$_instance)) {
65
-			$c = __CLASS__;
66
-			self::$_instance = new $c;
67
-		}
68
-		return self::$_instance;
69
-	}
60
+    /**
61
+     * Singleton method
62
+     */
63
+    public static function singleton() {
64
+        if(!isset(self::$_instance)) {
65
+            $c = __CLASS__;
66
+            self::$_instance = new $c;
67
+        }
68
+        return self::$_instance;
69
+    }
70 70
 	
71
-	/**
72
-	 * Prevent users to clone the instance
73
-	 */
74
-	public function __clone() {
75
-		trigger_error('Clone is not allowed', E_USER_ERROR);
76
-	}
71
+    /**
72
+     * Prevent users to clone the instance
73
+     */
74
+    public function __clone() {
75
+        trigger_error('Clone is not allowed', E_USER_ERROR);
76
+    }
77 77
 	
78
-	public function getRequestHandler() {
79
-		return $this->_request_handler;
80
-	}
78
+    public function getRequestHandler() {
79
+        return $this->_request_handler;
80
+    }
81 81
 	
82
-	/**
83
-	 * Sets the request handler. Does nothing if the argument is not an instance of PENSRequestHandler
84
-	 * 
85
-	 * @param PENSRequestHandler Request handler
86
-	 */
87
-	public function setRequestHandler($request_handler) {
88
-		if($request_handler instanceof PENSRequestHandler) {
89
-			$this->_request_handler = $request_handler;
90
-		}
91
-	}
82
+    /**
83
+     * Sets the request handler. Does nothing if the argument is not an instance of PENSRequestHandler
84
+     * 
85
+     * @param PENSRequestHandler Request handler
86
+     */
87
+    public function setRequestHandler($request_handler) {
88
+        if($request_handler instanceof PENSRequestHandler) {
89
+            $this->_request_handler = $request_handler;
90
+        }
91
+    }
92 92
 	
93
-	/**
94
-	 * Receives a request, calls the handler and displays the response
95
-	 */
96
-	public function receiveRequest() {
97
-		$request = null;
98
-		try {
99
-			$request = $this->parseRequest();
100
-			$command = $request->getCommand();
101
-			if($command == "alert" || $command == "receipt") {
102
-				if(!is_null($this->_request_handler)) {
103
-					// Call the handler
104
-					$this->_request_handler->processRequest($request, new PENSResponse($_REQUEST));
105
-				}
106
-				$this->sendResponse(new PENSResponse(0, $command." received and understood"));
107
-			}
108
-		} catch(PENSException $e) {
109
-			// If we could not parse the request, send the error
110
-			$this->sendResponse(new PENSResponse($e));
111
-		}
112
-	}
93
+    /**
94
+     * Receives a request, calls the handler and displays the response
95
+     */
96
+    public function receiveRequest() {
97
+        $request = null;
98
+        try {
99
+            $request = $this->parseRequest();
100
+            $command = $request->getCommand();
101
+            if($command == "alert" || $command == "receipt") {
102
+                if(!is_null($this->_request_handler)) {
103
+                    // Call the handler
104
+                    $this->_request_handler->processRequest($request, new PENSResponse($_REQUEST));
105
+                }
106
+                $this->sendResponse(new PENSResponse(0, $command." received and understood"));
107
+            }
108
+        } catch(PENSException $e) {
109
+            // If we could not parse the request, send the error
110
+            $this->sendResponse(new PENSResponse($e));
111
+        }
112
+    }
113 113
 }
Please login to merge, or discard this patch.
plugin/pens/lib/pens/pens_exception.php 1 patch
Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of php-pens.
4
- * 
5
- * php-pens is free software: you can redistribute it and/or modify 
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- * 
10
- * php-pens is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
- * GNU General Public License for more details.
14
- * 
15
- * You should have received a copy of the GNU General Public License
16
- * along with php-pens.  If not, see <http://www.gnu.org/licenses/>.
17
- */
3
+     * This file is part of php-pens.
4
+     * 
5
+     * php-pens is free software: you can redistribute it and/or modify 
6
+     * it under the terms of the GNU General Public License as published by
7
+     * the Free Software Foundation, either version 3 of the License, or
8
+     * (at your option) any later version.
9
+     * 
10
+     * php-pens is distributed in the hope that it will be useful,
11
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
+     * GNU General Public License for more details.
14
+     * 
15
+     * You should have received a copy of the GNU General Public License
16
+     * along with php-pens.  If not, see <http://www.gnu.org/licenses/>.
17
+     */
18 18
 
19 19
 /**
20 20
  * PENSException
@@ -37,62 +37,62 @@  discard block
 block discarded – undo
37 37
  */
38 38
 class PENSException extends Exception {
39 39
 
40
-	/**
41
-	 * Array that provides an association between exception codes and messages
42
-	 * @var array
43
-	 */
44
-	protected static $_code_to_messages = array(
45
-		1101 => "Unable to parse PENS command",
46
-		1201 => "Attempt to pass an invalid argument",
47
-		1301 => "Unable to retrieve package",
48
-		1302 => "Unable to retrieve package via HTTPS",
49
-		1304 => "Unable to retrieve package via FTP",
50
-		1306 => "Unable to retrieve package via FTPS",
51
-		1310 => "Unable to retrieve package at specified URL due to error in URL or lack of response from URL",
52
-		1312 => "Unable to retrieve package at specified URL due to error with access credential for package URL",
53
-		1320 => "Expiration date is non-null and in an improper format",
54
-		1322 => "Current time indicates expiry date has passed",
55
-		1420 => "PENS version not supported",
56
-		1421 => "Command not supported",
57
-		1430 => "Package type not supported",
58
-		// The following error code is not specified in the PENS specification and was added in this implementation
59
-		1431 => "Package format not supported",
60
-		1432 => "Internal package error",
61
-		1440 => "Insufficient host space/storage available",
62
-		1500 => "Unable to communicate with provided acknowledgement URL",
63
-		1510 => "Unsupported acknowledgement protocol",
64
-		1520 => "Unsupported alert protocol",
65
-		2001 => "PENS version invalid or not specified",
66
-		2002 => "PENS command invalid or not specified",
67
-		2003 => "package-type invalid or not specified",
68
-		2004 => "package-type-version invalid or not specified",
69
-		2005 => "package-format invalid or not specified",
70
-		2007 => "package-id invalid or not specified",
71
-		2008 => "package-url invalid or not specified",
72
-		2009 => "package-url-expiry date invalid or not specified",
73
-		2010 => "client submitting package invalid or not specified",
74
-		2011 => "receipt url invalid or not specified"
75
-	);
40
+    /**
41
+     * Array that provides an association between exception codes and messages
42
+     * @var array
43
+     */
44
+    protected static $_code_to_messages = array(
45
+        1101 => "Unable to parse PENS command",
46
+        1201 => "Attempt to pass an invalid argument",
47
+        1301 => "Unable to retrieve package",
48
+        1302 => "Unable to retrieve package via HTTPS",
49
+        1304 => "Unable to retrieve package via FTP",
50
+        1306 => "Unable to retrieve package via FTPS",
51
+        1310 => "Unable to retrieve package at specified URL due to error in URL or lack of response from URL",
52
+        1312 => "Unable to retrieve package at specified URL due to error with access credential for package URL",
53
+        1320 => "Expiration date is non-null and in an improper format",
54
+        1322 => "Current time indicates expiry date has passed",
55
+        1420 => "PENS version not supported",
56
+        1421 => "Command not supported",
57
+        1430 => "Package type not supported",
58
+        // The following error code is not specified in the PENS specification and was added in this implementation
59
+        1431 => "Package format not supported",
60
+        1432 => "Internal package error",
61
+        1440 => "Insufficient host space/storage available",
62
+        1500 => "Unable to communicate with provided acknowledgement URL",
63
+        1510 => "Unsupported acknowledgement protocol",
64
+        1520 => "Unsupported alert protocol",
65
+        2001 => "PENS version invalid or not specified",
66
+        2002 => "PENS command invalid or not specified",
67
+        2003 => "package-type invalid or not specified",
68
+        2004 => "package-type-version invalid or not specified",
69
+        2005 => "package-format invalid or not specified",
70
+        2007 => "package-id invalid or not specified",
71
+        2008 => "package-url invalid or not specified",
72
+        2009 => "package-url-expiry date invalid or not specified",
73
+        2010 => "client submitting package invalid or not specified",
74
+        2011 => "receipt url invalid or not specified"
75
+    );
76 76
 	
77
-	/**
78
-	 * Redefines the constructor so that code is the first argument
79
-	 * 
80
-	 * @param int Exception code
81
-	 * @param string Message to display
82
-	 * @return PENSException Exception created
83
-	 */
84
-	public function __construct($code, $message = null) {
85
-		parent::__construct($message, $code);
86
-		$this->setMessageBasedOnCode();
87
-	}
77
+    /**
78
+     * Redefines the constructor so that code is the first argument
79
+     * 
80
+     * @param int Exception code
81
+     * @param string Message to display
82
+     * @return PENSException Exception created
83
+     */
84
+    public function __construct($code, $message = null) {
85
+        parent::__construct($message, $code);
86
+        $this->setMessageBasedOnCode();
87
+    }
88 88
 	
89
-	/**
90
-	 * Sets the message based on the code
91
-	 */
92
-	protected function setMessageBasedOnCode() {
93
-		if(empty($this->message) && !empty(self::$_code_to_messages[$this->code])) {
94
-			$this->message = self::$_code_to_messages[$this->code];
95
-		}
96
-	}
89
+    /**
90
+     * Sets the message based on the code
91
+     */
92
+    protected function setMessageBasedOnCode() {
93
+        if(empty($this->message) && !empty(self::$_code_to_messages[$this->code])) {
94
+            $this->message = self::$_code_to_messages[$this->code];
95
+        }
96
+    }
97 97
 	
98 98
 }
Please login to merge, or discard this patch.
plugin/pens/lib/pens/pens_request_handler.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
  * along with php-pens.  If not, see <http://www.gnu.org/licenses/>.
17 17
  */
18 18
  
19
- /**
20
- * PENSRequestHandler
21
- * 
22
- * Provides the PENSRequestHandler abstract class
23
- * 
24
- * @package PENS
25
- * @author Guillaume Viguier-Just <[email protected]>
26
- * @licence http://www.gnu.org/licenses/gpl.txt
27
- */
19
+    /**
20
+     * PENSRequestHandler
21
+     * 
22
+     * Provides the PENSRequestHandler abstract class
23
+     * 
24
+     * @package PENS
25
+     * @author Guillaume Viguier-Just <[email protected]>
26
+     * @licence http://www.gnu.org/licenses/gpl.txt
27
+     */
28 28
 
29 29
 /**
30 30
  * PENSRequestHandler
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
  * @licence http://www.gnu.org/licenses/gpl.txt
38 38
  */
39 39
 abstract class PENSRequestHandler {
40
-	/**
41
-	 * Processes the request. Must be implemented by subclasses
42
-	 * 
43
-	 * @param PENSRequest Alert or Receipt request sent by the server
44
-	 * @param PENSResponse Response sent by the server (error, error-text etc...)
45
-	 */
46
-	abstract public function processRequest($request, $response);
40
+    /**
41
+     * Processes the request. Must be implemented by subclasses
42
+     * 
43
+     * @param PENSRequest Alert or Receipt request sent by the server
44
+     * @param PENSResponse Response sent by the server (error, error-text etc...)
45
+     */
46
+    abstract public function processRequest($request, $response);
47 47
 }
48 48
 
Please login to merge, or discard this patch.