Completed
Push — master ( e62da5...a79e13 )
by
unknown
33s queued 13s
created
src/ConstraintCheck/Cache/CachingMetadata.php 1 patch
Spacing   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WikibaseQuality\ConstraintReport\ConstraintCheck\Cache;
6 6
 
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 	 * @param int $maxAge The maximum age of the cached value (in seconds).
32 32
 	 * @return self Indication that a value is possibly outdated by up to this many seconds.
33 33
 	 */
34
-	public static function ofMaximumAgeInSeconds( int $maxAge ): self {
35
-		Assert::parameter( $maxAge > 0, '$maxAge', '$maxage > 0' );
34
+	public static function ofMaximumAgeInSeconds(int $maxAge): self {
35
+		Assert::parameter($maxAge > 0, '$maxAge', '$maxage > 0');
36 36
 		$ret = new self;
37 37
 		$ret->maxAge = $maxAge;
38 38
 		return $ret;
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 	 * @param self[] $metadatas
43 43
 	 * @return self
44 44
 	 */
45
-	public static function merge( array $metadatas ): self {
46
-		Assert::parameterElementType( self::class, $metadatas, '$metadatas' );
45
+	public static function merge(array $metadatas): self {
46
+		Assert::parameterElementType(self::class, $metadatas, '$metadatas');
47 47
 		$ret = new self;
48
-		foreach ( $metadatas as $metadata ) {
49
-			$ret->maxAge = max( $ret->maxAge, $metadata->maxAge );
48
+		foreach ($metadatas as $metadata) {
49
+			$ret->maxAge = max($ret->maxAge, $metadata->maxAge);
50 50
 		}
51 51
 		return $ret;
52 52
 	}
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 * For a fresh value, returns 0.
65 65
 	 */
66 66
 	public function getMaximumAgeInSeconds(): int {
67
-		if ( is_int( $this->maxAge ) ) {
67
+		if (is_int($this->maxAge)) {
68 68
 			return $this->maxAge;
69 69
 		} else {
70 70
 			return 0;
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
 		return $this->isCached() ?
80 80
 			[
81 81
 				'maximumAgeInSeconds' => $this->maxAge,
82
-			] :
83
-			null;
82
+			] : null;
84 83
 	}
85 84
 
86 85
 }
Please login to merge, or discard this patch.