Completed
Push — master ( 517e4f...0d0d38 )
by
unknown
02:47
created
includes/DumpMetaInformation/DumpMetaInformation.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -83,27 +83,27 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @throws InvalidArgumentException
85 85
 	 */
86
-	public function __construct( $dumpId,
86
+	public function __construct($dumpId,
87 87
 								 ItemId $sourceItemId,
88 88
 								 array $identifierPropertyIds,
89 89
 								 $importDate,
90 90
 								 $languageCode,
91 91
 								 $sourceUrl,
92 92
 								 $size,
93
-								 ItemId $licenseItemId ) {
93
+								 ItemId $licenseItemId) {
94 94
 		Assert::parameterElementType(
95 95
 			PropertyId::class,
96 96
 			$identifierPropertyIds,
97 97
 			'$identifierPropertyIds'
98 98
 		);
99 99
 
100
-		$this->setDumpId( $dumpId );
100
+		$this->setDumpId($dumpId);
101 101
 		$this->sourceItemId = $sourceItemId;
102 102
 		$this->identifierPropertyIds = $identifierPropertyIds;
103
-		$this->setImportDate( $importDate );
104
-		$this->setLanguageCode( $languageCode );
105
-		$this->setSourceUrl( $sourceUrl );
106
-		$this->setSize( $size );
103
+		$this->setImportDate($importDate);
104
+		$this->setLanguageCode($languageCode);
105
+		$this->setSourceUrl($sourceUrl);
106
+		$this->setSize($size);
107 107
 		$this->licenseItemId = $licenseItemId;
108 108
 	}
109 109
 
@@ -168,10 +168,10 @@  discard block
 block discarded – undo
168 168
 	 *
169 169
 	 * @throws InvalidArgumentException
170 170
 	 */
171
-	private function setDumpId( $dumpId ) {
172
-		Assert::parameterType( 'string', $dumpId, '$dumpId' );
173
-		$length = strlen( $dumpId );
174
-		if ( $length < 1 || $length > 25 ) {
171
+	private function setDumpId($dumpId) {
172
+		Assert::parameterType('string', $dumpId, '$dumpId');
173
+		$length = strlen($dumpId);
174
+		if ($length < 1 || $length > 25) {
175 175
 			throw new InvalidArgumentException('$dumpId must be between 1 and 25 characters.');
176 176
 		}
177 177
 
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
 	 *
184 184
 	 * @throws InvalidArgumentException
185 185
 	 */
186
-	private function setLanguageCode( $languageCode ) {
187
-		Assert::parameterType( 'string', $languageCode, '$languageCode' );
188
-		if( !Language::isValidCode( $languageCode ) ) {
189
-			throw new InvalidArgumentException( '$languageCode is not valid.' );
186
+	private function setLanguageCode($languageCode) {
187
+		Assert::parameterType('string', $languageCode, '$languageCode');
188
+		if (!Language::isValidCode($languageCode)) {
189
+			throw new InvalidArgumentException('$languageCode is not valid.');
190 190
 		}
191 191
 
192 192
 		$this->languageCode = $languageCode;
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
 	 *
198 198
 	 * @throws InvalidArgumentException
199 199
 	 */
200
-	private function setImportDate( $importDate ) {
201
-		Assert::parameterType( 'string', $importDate, '$importDate' );
200
+	private function setImportDate($importDate) {
201
+		Assert::parameterType('string', $importDate, '$importDate');
202 202
 
203
-		$timestamp = wfTimestamp( TS_MW, $importDate );
204
-		if( !$timestamp ) {
205
-			throw new InvalidArgumentException( '$updatedAt has invalid timestamp format.' );
203
+		$timestamp = wfTimestamp(TS_MW, $importDate);
204
+		if (!$timestamp) {
205
+			throw new InvalidArgumentException('$updatedAt has invalid timestamp format.');
206 206
 		}
207 207
 
208 208
 		$this->importDate = $importDate;
@@ -213,13 +213,13 @@  discard block
 block discarded – undo
213 213
 	 *
214 214
 	 * @throws InvalidArgumentException
215 215
 	 */
216
-	private function setSourceUrl( $sourceUrl ) {
217
-		Assert::parameterType( 'string', $sourceUrl, '$sourceUrl' );
218
-		if( strlen( $sourceUrl ) > 300 ) {
219
-			throw new InvalidArgumentException( '$sourceUrl must not be longer than 300 characters.' );
216
+	private function setSourceUrl($sourceUrl) {
217
+		Assert::parameterType('string', $sourceUrl, '$sourceUrl');
218
+		if (strlen($sourceUrl) > 300) {
219
+			throw new InvalidArgumentException('$sourceUrl must not be longer than 300 characters.');
220 220
 		}
221
-		if( !filter_var($sourceUrl, FILTER_VALIDATE_URL) ) {
222
-			throw new InvalidArgumentException( '$sourceUrl is not a valid url.' );
221
+		if (!filter_var($sourceUrl, FILTER_VALIDATE_URL)) {
222
+			throw new InvalidArgumentException('$sourceUrl is not a valid url.');
223 223
 		}
224 224
 
225 225
 		$this->sourceUrl = $sourceUrl;
@@ -230,10 +230,10 @@  discard block
 block discarded – undo
230 230
 	 *
231 231
 	 * @throws InvalidArgumentException
232 232
 	 */
233
-	private function setSize( $size ){
234
-		Assert::parameterType( 'integer', $size, '$size' );
235
-		if( $size <= 0 ) {
236
-			throw new InvalidArgumentException( '$size must be positive integer.' );
233
+	private function setSize($size) {
234
+		Assert::parameterType('integer', $size, '$size');
235
+		if ($size <= 0) {
236
+			throw new InvalidArgumentException('$size must be positive integer.');
237 237
 		}
238 238
 
239 239
 		$this->size = $size;
Please login to merge, or discard this patch.