Passed
Push — 1.10.x ( f64eef...04397c )
by Angel Fernando Quiroz
132:38 queued 79:40
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/pens/chamilo_pens.php 1 patch
Indentation   +216 added lines, -216 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
  * along with chamilo-pens.  If not, see <http://www.gnu.org/licenses/>.
17 17
  */
18 18
  
19
- /**
20
- * ChamiloPens
21
- * 
22
- * This file provides the ChamiloPens class
23
- * 
24
- * @author Guillaume Viguier-Just <[email protected]>
25
- * @licence http://www.gnu.org/licenses/gpl.txt
26
- */
19
+    /**
20
+     * ChamiloPens
21
+     * 
22
+     * This file provides the ChamiloPens class
23
+     * 
24
+     * @author Guillaume Viguier-Just <[email protected]>
25
+     * @licence http://www.gnu.org/licenses/gpl.txt
26
+     */
27 27
 
28 28
 require_once __DIR__ . '/../../main/inc/global.inc.php';
29 29
 require_once __DIR__ . '/lib/pens.php';
@@ -37,212 +37,212 @@  discard block
 block discarded – undo
37 37
  * @licence http://www.gnu.org/licenses/gpl.txt
38 38
  */
39 39
 class ChamiloPens extends Plugin {
40
-	/**
41
-	 * Database table to be used
42
-	 */
43
-	const TABLE_NAME = "plugin_pens";
44
-	
45
-	/**
46
-	 * Id of the object
47
-	 * @var int
48
-	 */
49
-	protected $_id = null;
50
-	
51
-	/**
52
-	 * PENS Version to be used. Currently, the only valid value is 1.0.0. Required.
53
-	 * @var string
54
-	 */
55
-	protected $_pens_version = null;
56
-	
57
-	/**
58
-	 * Package type being used. The only valid values are aicc-pkg, scorm-pif, ims-qti. Required
59
-	 * @var string
60
-	 */
61
-	protected $_package_type = null;
62
-	
63
-	/**
64
-	 * Package type version. Required
65
-	 * @var string
66
-	 */
67
-	protected $_package_type_version = null;
68
-	
69
-	/**
70
-	 * Package format. The only valid values are zip, url, jar, war and xml. Required
71
-	 * @var string
72
-	 */
73
-	protected $_package_format = null;
74
-	
75
-	/**
76
-	 * Package id. Requires a valid URI according to RFC 2396. Required
77
-	 * @var string
78
-	 */
79
-	protected $_package_id = null;
80
-	
81
-	/**
82
-	 * Name or ID for client submitting the content package to the target system. Required.
83
-	 * @var string
84
-	 */
85
-	protected $_client = null;
86
-	
87
-	/**
88
-	 * Unstructured character string that may be used to transfer vendor-specific data such as processing hints or deployment information. Optional.
89
-	 * @var string
90
-	 */
91
-	protected $_vendor_data = null;
92
-	
93
-	/**
94
-	 * Package name
95
-	 * @var string
96
-	 */
97
-	protected $_package_name = null;
98
-	
99
-	/**
100
-	 * Date of creation
101
-	 * @var DateTime
102
-	 */
103
-	protected $_created_at = null;
104
-	
105
-	/**
106
-	 * Update date
107
-	 * @var DateTime
108
-	 */
109
-	protected $_updated_at = null;
110
-	
111
-	/**
112
-	 * Constructor. Takes a PENSRequest as an argument
113
-	 * 
114
-	 * @param PENSRequest Request
115
-	 */
116
-	public function __construct($request) {
117
-		if($request instanceof PENSRequest) {
118
-			$this->_id = 0;
119
-			$this->_pens_version = $request->getPensVersion();
120
-			$this->_package_type = $request->getPackageType();
121
-			$this->_package_type_version = $request->getPackageTypeVersion();
122
-			$this->_package_format = $request->getPackageFormat();
123
-			$this->_package_id = $request->getPackageId();
124
-			$this->_client = $request->getClient();
125
-			$this->_vendor_data = $request->getVendorData();
126
-			$this->_package_name = $request->getFilename();
127
-		} else if(is_array($request)) {
128
-			$this->_id = $request['id'];
129
-			$this->_pens_version = $request['pens_version'];
130
-			$this->_package_type = $request['package_type'];
131
-			$this->_package_type_version = $request['package_type_version'];
132
-			$this->_package_format = $request['package_format'];
133
-			$this->_package_id = $request['package_id'];
134
-			$this->_client = $request['client'];
135
-			$this->_vendor_data = $request['vendor_data'];
136
-			$this->_package_name = $request['package_name'];
137
-			$this->_created_at = new DateTime($request['created_at'], new DateTimeZone('UTC'));
138
-			if(!empty($request['updated_at'])) {
139
-				$this->_updated_at = new DateTime($request['updated_at'], new DateTimeZone('UTC'));
140
-			}
141
-		}
142
-	}
143
-	
144
-	/**
145
-	 * Saves the object in the DB
146
-	 */
147
-	public function save() {
148
-		$clean_package_type_version = Database::escape_string($this->_package_type_version);
149
-		$clean_package_id = Database::escape_string($this->_package_id);
150
-		$clean_client = Database::escape_string($this->_client);
151
-		$clean_vendor_data = Database::escape_string($this->_vendor_data);
152
-		$created_at = api_get_utc_datetime();
153
-		$table = Database::get_main_table(ChamiloPens::TABLE_NAME);
154
-		$sql_query = "INSERT INTO $table (pens_version, package_type, package_type_version, package_format, package_id, client, vendor_data, package_name, created_at) VALUES (" .
155
-			"'". $this->_pens_version. "', " .
156
-			"'".$this->_package_type. "', " .
157
-			"'".$clean_package_type_version. "', " .
158
-			"'".$this->_package_format. "', " .
159
-			"'".$clean_package_id. "', " .
160
-			"'".$clean_client."', " .
161
-			"'".$clean_vendor_data."', " .
162
-			"'".$this->_package_name."', " .
163
-			"'".$created_at."') ON DUPLICATE KEY UPDATE " .
164
-			"pens_version = VALUES(pens_version), ".
165
-			"package_type = VALUES(package_type), ".
166
-			"package_type_version = VALUES(package_type_version), ".
167
-			"package_format = VALUES(package_format), ".
168
-			"client = VALUES(client), ".
169
-			"vendor_data = VALUES(vendor_data), ".
170
-			"package_name = VALUES(package_name), ".
171
-			"updated_at = '".$created_at."';";
172
-		Database::query($sql_query);
173
-	}
174
-	
175
-	/**
176
-	 * Returns a ChamiloPens object, based on package id
177
-	 * 
178
-	 * @param string Package id
179
-	 */
180
-	public static function findByPackageId($package_id) {
181
-		$table = Database::get_main_table(ChamiloPens::TABLE_NAME);
182
-		$sql_query = "SELECT * FROM $table WHERE package_id = '".$package_id."';";
183
-		$results = Database::query($sql_query);
184
-		$number = Database::num_rows($results);
185
-		if($number == 1) {
186
-			$obj = Database::fetch_assoc($results);
187
-			return new ChamiloPens($obj);
188
-		} else {
189
-			return null;
190
-		}
191
-	}
192
-	
193
-	/**
194
-	 * Returns an array of all the objects of the DB
195
-	 * 
196
-	 * @return array Array of ChamiloPens objects
197
-	 */
198
-	public static function findAll() {
199
-		$table = Database::get_main_table(ChamiloPens::TABLE_NAME);
200
-		$sql_query = "SELECT * FROM $table ORDER BY created_at;";
201
-		$results = Database::query($sql_query);
202
-		$return = array();
203
-		while($assoc = Database::fetch_assoc($results)) {
204
-			$return[] = new ChamiloPens($assoc);
205
-		}
206
-		return $return;
207
-	}
208
-	
209
-	public function getId() {
210
-		return $this->_id;
211
-	}
212
-	
213
-	public function getPensVersion() {
214
-		return $this->_pens_version;
215
-	}
216
-	
217
-	public function getPackageType() {
218
-		return $this->_package_type;
219
-	}
220
-	
221
-	public function getPackageTypeVersion() {
222
-		return $this->_package_type_version;
223
-	}
224
-	
225
-	public function getPackageFormat() {
226
-		return $this->_package_format;
227
-	}
228
-	
229
-	public function getPackageId() {
230
-		return $this->_package_id;
231
-	}
232
-	
233
-	public function getClient() {
234
-		return $this->_client;
235
-	}
236
-	
237
-	public function getVendorData() {
238
-		return $this->_vendor_data;
239
-	}
240
-	
241
-	public function getPackageName() {
242
-		return $this->_package_name;
243
-	}
244
-	
245
-	public function getCreatedAt() {
246
-		return $this->_created_at;
247
-	}
40
+    /**
41
+     * Database table to be used
42
+     */
43
+    const TABLE_NAME = "plugin_pens";
44
+	
45
+    /**
46
+     * Id of the object
47
+     * @var int
48
+     */
49
+    protected $_id = null;
50
+	
51
+    /**
52
+     * PENS Version to be used. Currently, the only valid value is 1.0.0. Required.
53
+     * @var string
54
+     */
55
+    protected $_pens_version = null;
56
+	
57
+    /**
58
+     * Package type being used. The only valid values are aicc-pkg, scorm-pif, ims-qti. Required
59
+     * @var string
60
+     */
61
+    protected $_package_type = null;
62
+	
63
+    /**
64
+     * Package type version. Required
65
+     * @var string
66
+     */
67
+    protected $_package_type_version = null;
68
+	
69
+    /**
70
+     * Package format. The only valid values are zip, url, jar, war and xml. Required
71
+     * @var string
72
+     */
73
+    protected $_package_format = null;
74
+	
75
+    /**
76
+     * Package id. Requires a valid URI according to RFC 2396. Required
77
+     * @var string
78
+     */
79
+    protected $_package_id = null;
80
+	
81
+    /**
82
+     * Name or ID for client submitting the content package to the target system. Required.
83
+     * @var string
84
+     */
85
+    protected $_client = null;
86
+	
87
+    /**
88
+     * Unstructured character string that may be used to transfer vendor-specific data such as processing hints or deployment information. Optional.
89
+     * @var string
90
+     */
91
+    protected $_vendor_data = null;
92
+	
93
+    /**
94
+     * Package name
95
+     * @var string
96
+     */
97
+    protected $_package_name = null;
98
+	
99
+    /**
100
+     * Date of creation
101
+     * @var DateTime
102
+     */
103
+    protected $_created_at = null;
104
+	
105
+    /**
106
+     * Update date
107
+     * @var DateTime
108
+     */
109
+    protected $_updated_at = null;
110
+	
111
+    /**
112
+     * Constructor. Takes a PENSRequest as an argument
113
+     * 
114
+     * @param PENSRequest Request
115
+     */
116
+    public function __construct($request) {
117
+        if($request instanceof PENSRequest) {
118
+            $this->_id = 0;
119
+            $this->_pens_version = $request->getPensVersion();
120
+            $this->_package_type = $request->getPackageType();
121
+            $this->_package_type_version = $request->getPackageTypeVersion();
122
+            $this->_package_format = $request->getPackageFormat();
123
+            $this->_package_id = $request->getPackageId();
124
+            $this->_client = $request->getClient();
125
+            $this->_vendor_data = $request->getVendorData();
126
+            $this->_package_name = $request->getFilename();
127
+        } else if(is_array($request)) {
128
+            $this->_id = $request['id'];
129
+            $this->_pens_version = $request['pens_version'];
130
+            $this->_package_type = $request['package_type'];
131
+            $this->_package_type_version = $request['package_type_version'];
132
+            $this->_package_format = $request['package_format'];
133
+            $this->_package_id = $request['package_id'];
134
+            $this->_client = $request['client'];
135
+            $this->_vendor_data = $request['vendor_data'];
136
+            $this->_package_name = $request['package_name'];
137
+            $this->_created_at = new DateTime($request['created_at'], new DateTimeZone('UTC'));
138
+            if(!empty($request['updated_at'])) {
139
+                $this->_updated_at = new DateTime($request['updated_at'], new DateTimeZone('UTC'));
140
+            }
141
+        }
142
+    }
143
+	
144
+    /**
145
+     * Saves the object in the DB
146
+     */
147
+    public function save() {
148
+        $clean_package_type_version = Database::escape_string($this->_package_type_version);
149
+        $clean_package_id = Database::escape_string($this->_package_id);
150
+        $clean_client = Database::escape_string($this->_client);
151
+        $clean_vendor_data = Database::escape_string($this->_vendor_data);
152
+        $created_at = api_get_utc_datetime();
153
+        $table = Database::get_main_table(ChamiloPens::TABLE_NAME);
154
+        $sql_query = "INSERT INTO $table (pens_version, package_type, package_type_version, package_format, package_id, client, vendor_data, package_name, created_at) VALUES (" .
155
+            "'". $this->_pens_version. "', " .
156
+            "'".$this->_package_type. "', " .
157
+            "'".$clean_package_type_version. "', " .
158
+            "'".$this->_package_format. "', " .
159
+            "'".$clean_package_id. "', " .
160
+            "'".$clean_client."', " .
161
+            "'".$clean_vendor_data."', " .
162
+            "'".$this->_package_name."', " .
163
+            "'".$created_at."') ON DUPLICATE KEY UPDATE " .
164
+            "pens_version = VALUES(pens_version), ".
165
+            "package_type = VALUES(package_type), ".
166
+            "package_type_version = VALUES(package_type_version), ".
167
+            "package_format = VALUES(package_format), ".
168
+            "client = VALUES(client), ".
169
+            "vendor_data = VALUES(vendor_data), ".
170
+            "package_name = VALUES(package_name), ".
171
+            "updated_at = '".$created_at."';";
172
+        Database::query($sql_query);
173
+    }
174
+	
175
+    /**
176
+     * Returns a ChamiloPens object, based on package id
177
+     * 
178
+     * @param string Package id
179
+     */
180
+    public static function findByPackageId($package_id) {
181
+        $table = Database::get_main_table(ChamiloPens::TABLE_NAME);
182
+        $sql_query = "SELECT * FROM $table WHERE package_id = '".$package_id."';";
183
+        $results = Database::query($sql_query);
184
+        $number = Database::num_rows($results);
185
+        if($number == 1) {
186
+            $obj = Database::fetch_assoc($results);
187
+            return new ChamiloPens($obj);
188
+        } else {
189
+            return null;
190
+        }
191
+    }
192
+	
193
+    /**
194
+     * Returns an array of all the objects of the DB
195
+     * 
196
+     * @return array Array of ChamiloPens objects
197
+     */
198
+    public static function findAll() {
199
+        $table = Database::get_main_table(ChamiloPens::TABLE_NAME);
200
+        $sql_query = "SELECT * FROM $table ORDER BY created_at;";
201
+        $results = Database::query($sql_query);
202
+        $return = array();
203
+        while($assoc = Database::fetch_assoc($results)) {
204
+            $return[] = new ChamiloPens($assoc);
205
+        }
206
+        return $return;
207
+    }
208
+	
209
+    public function getId() {
210
+        return $this->_id;
211
+    }
212
+	
213
+    public function getPensVersion() {
214
+        return $this->_pens_version;
215
+    }
216
+	
217
+    public function getPackageType() {
218
+        return $this->_package_type;
219
+    }
220
+	
221
+    public function getPackageTypeVersion() {
222
+        return $this->_package_type_version;
223
+    }
224
+	
225
+    public function getPackageFormat() {
226
+        return $this->_package_format;
227
+    }
228
+	
229
+    public function getPackageId() {
230
+        return $this->_package_id;
231
+    }
232
+	
233
+    public function getClient() {
234
+        return $this->_client;
235
+    }
236
+	
237
+    public function getVendorData() {
238
+        return $this->_vendor_data;
239
+    }
240
+	
241
+    public function getPackageName() {
242
+        return $this->_package_name;
243
+    }
244
+	
245
+    public function getCreatedAt() {
246
+        return $this->_created_at;
247
+    }
248 248
 }
Please login to merge, or discard this patch.
plugin/pens/pens.php 1 patch
Indentation   +28 added lines, -28 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 chamilo-pens.
4
- * 
5
- * chamilo-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
- * chamilo-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 chamilo-pens.  If not, see <http://www.gnu.org/licenses/>.
17
- */
3
+     * This file is part of chamilo-pens.
4
+     * 
5
+     * chamilo-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
+     * chamilo-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 chamilo-pens.  If not, see <http://www.gnu.org/licenses/>.
17
+     */
18 18
  
19 19
 /**
20 20
  * Provides an implementation of the PENS server, using the php-pens library.
@@ -29,19 +29,19 @@  discard block
 block discarded – undo
29 29
 require_once __DIR__ . '/chamilo_pens.php';
30 30
 
31 31
 class ChamiloPackageHandler extends PENSPackageHandler {
32
-	public function processPackage($request, $path_to_package) {
33
-		$server = PENSServer::singleton();
34
-		// Moves the package to archive/pens
35
-		$path_to_archives = api_get_path(SYS_ARCHIVE_PATH) . 'pens';
36
-		if(!is_dir($path_to_archives)) {
37
-			mkdir($path_to_archives, 0777, true);
38
-		}
39
-		rename($path_to_package, $path_to_archives . '/' . $request->getFilename());
40
-		// Insert the request in the database
41
-		$chamilo_pens = new ChamiloPens($request);
42
-		$chamilo_pens->save();
43
-		$server->sendAlert($request, new PENSResponse(0, 'Package successfully processed'));
44
-	}
32
+    public function processPackage($request, $path_to_package) {
33
+        $server = PENSServer::singleton();
34
+        // Moves the package to archive/pens
35
+        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH) . 'pens';
36
+        if(!is_dir($path_to_archives)) {
37
+            mkdir($path_to_archives, 0777, true);
38
+        }
39
+        rename($path_to_package, $path_to_archives . '/' . $request->getFilename());
40
+        // Insert the request in the database
41
+        $chamilo_pens = new ChamiloPens($request);
42
+        $chamilo_pens->save();
43
+        $server->sendAlert($request, new PENSResponse(0, 'Package successfully processed'));
44
+    }
45 45
 }
46 46
 
47 47
 $handler = new ChamiloPackageHandler();
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_request_collect.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 PENSRequestCollect extends PENSRequest {
42 42
 	
43
-	public function __construct($arguments) {
44
-		parent::__construct($arguments);
45
-		$this->setCommand("collect");
46
-	}
43
+    public function __construct($arguments) {
44
+        parent::__construct($arguments);
45
+        $this->setCommand("collect");
46
+    }
47 47
 
48 48
 }
Please login to merge, or discard this patch.
plugin/pens/lib/pens/pens_package_handler.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
- * PENSPackageHandler
21
- * 
22
- * Provides the PENSPackageHandler 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
+     * PENSPackageHandler
21
+     * 
22
+     * Provides the PENSPackageHandler 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
 require_once(dirname(__FILE__)."/pens_config.php");
30 30
 
@@ -39,76 +39,76 @@  discard block
 block discarded – undo
39 39
  * @licence http://www.gnu.org/licenses/gpl.txt
40 40
  */
41 41
 abstract class PENSPackageHandler {
42
-	/**
43
-	 * Array of supported package types for this handler. Set by default to PENSConfig::$allowed_package_types
44
-	 * @var array
45
-	 */
46
-	protected $_supported_package_types = null;
42
+    /**
43
+     * Array of supported package types for this handler. Set by default to PENSConfig::$allowed_package_types
44
+     * @var array
45
+     */
46
+    protected $_supported_package_types = null;
47 47
 	
48
-	/**
49
-	 * Array of supported package formats for this handler. Set by default to PENSConfig::$allowed_package_formats
50
-	 * @var array
51
-	 */
52
-	protected $_supported_package_formats = null;
48
+    /**
49
+     * Array of supported package formats for this handler. Set by default to PENSConfig::$allowed_package_formats
50
+     * @var array
51
+     */
52
+    protected $_supported_package_formats = null;
53 53
 	
54
-	/**
55
-	 * Constructor. Sets the default values of supported_package_types and supported_package_formats
56
-	 */
57
-	public function __construct() {
58
-		$this->_supported_package_types = PENSConfig::$allowed_package_types;
59
-		$this->_supported_package_formats = PENSConfig::$allowed_package_formats;
60
-	}
54
+    /**
55
+     * Constructor. Sets the default values of supported_package_types and supported_package_formats
56
+     */
57
+    public function __construct() {
58
+        $this->_supported_package_types = PENSConfig::$allowed_package_types;
59
+        $this->_supported_package_formats = PENSConfig::$allowed_package_formats;
60
+    }
61 61
 	
62
-	public function getSupportedPackageTypes() {
63
-		return $this->_supported_package_types;
64
-	}
62
+    public function getSupportedPackageTypes() {
63
+        return $this->_supported_package_types;
64
+    }
65 65
 	
66
-	/**
67
-	 * Sets the supported package types. All package types in the array provided as an argument
68
-	 * not present in PENSConfig::$allowed_package_types will be ignored. The supported_package_types
69
-	 * will be set to null if the argument given is not an array
70
-	 * 
71
-	 * @param array Supported package types
72
-	 */
73
-	public function setSupportedPackageTypes($supported_package_types) {
74
-		$this->_supported_package_types = null;
75
-		if(is_array($supported_package_types)) {
76
-			foreach($supported_package_types as $package_type) {
77
-				if(in_array($package_type, PENSConfig::$allowed_package_types)) {
78
-					$this->_supported_package_types[] = $package_type;
79
-				}
80
-			}
81
-		}
82
-	}
66
+    /**
67
+     * Sets the supported package types. All package types in the array provided as an argument
68
+     * not present in PENSConfig::$allowed_package_types will be ignored. The supported_package_types
69
+     * will be set to null if the argument given is not an array
70
+     * 
71
+     * @param array Supported package types
72
+     */
73
+    public function setSupportedPackageTypes($supported_package_types) {
74
+        $this->_supported_package_types = null;
75
+        if(is_array($supported_package_types)) {
76
+            foreach($supported_package_types as $package_type) {
77
+                if(in_array($package_type, PENSConfig::$allowed_package_types)) {
78
+                    $this->_supported_package_types[] = $package_type;
79
+                }
80
+            }
81
+        }
82
+    }
83 83
 	
84
-	public function getSupportedPackageFormats() {
85
-		return $this->_supported_package_formats;
86
-	}
84
+    public function getSupportedPackageFormats() {
85
+        return $this->_supported_package_formats;
86
+    }
87 87
 	
88
-	/**
89
-	 * Sets the supported package formats. All package types in the array provided as an argument
90
-	 * not present in PENSConfig::$allowed_package_formats will be ignored. The supported_package_formats
91
-	 * will be set to null if the argument given is not an array.
92
-	 * 
93
-	 * @param array Supported package formats
94
-	 */
95
-	public function setSupportedPackageFormats($supported_package_formats) {
96
-		$this->_supported_package_formats = null;
97
-		if(is_array($supported_package_formats)) {
98
-			foreach($supported_package_formats as $package_format) {
99
-				if(in_array($package_format, PENSConfig::$allowed_package_formats)) {
100
-					$this->_supported_package_formats[] = $package_format;
101
-				}
102
-			}
103
-		}
104
-	}
88
+    /**
89
+     * Sets the supported package formats. All package types in the array provided as an argument
90
+     * not present in PENSConfig::$allowed_package_formats will be ignored. The supported_package_formats
91
+     * will be set to null if the argument given is not an array.
92
+     * 
93
+     * @param array Supported package formats
94
+     */
95
+    public function setSupportedPackageFormats($supported_package_formats) {
96
+        $this->_supported_package_formats = null;
97
+        if(is_array($supported_package_formats)) {
98
+            foreach($supported_package_formats as $package_format) {
99
+                if(in_array($package_format, PENSConfig::$allowed_package_formats)) {
100
+                    $this->_supported_package_formats[] = $package_format;
101
+                }
102
+            }
103
+        }
104
+    }
105 105
 	
106
-	/**
107
-	 * Processes the package. Must be implemented by subclasses
108
-	 * 
109
-	 * @param PENSRequestCollect Collect request sent by the client
110
-	 * @param string Path to the collected package on the hard drive
111
-	 */
112
-	abstract public function processPackage($request, $path_to_package);
106
+    /**
107
+     * Processes the package. Must be implemented by subclasses
108
+     * 
109
+     * @param PENSRequestCollect Collect request sent by the client
110
+     * @param string Path to the collected package on the hard drive
111
+     */
112
+    abstract public function processPackage($request, $path_to_package);
113 113
 	
114 114
 }
Please login to merge, or discard this patch.