Passed
Push — master ( 402fa5...0f678f )
by Daimona
01:34
created
includes/Wiki/User.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare( strict_types=1 );
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace BotRiconferme\Wiki;
4 4
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	 * @param string $name
18 18
 	 * @param Wiki $wiki
19 19
 	 */
20
-	public function __construct( string $name, Wiki $wiki ) {
20
+	public function __construct ( string $name, Wiki $wiki ) {
21 21
 		parent::__construct( $wiki );
22 22
 		$this->name = $name;
23 23
 	}
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	/**
26 26
 	 * @return string
27 27
 	 */
28
-	public function getName() : string {
28
+	public function getName () : string {
29 29
 		return $this->name;
30 30
 	}
31 31
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 *
35 35
 	 * @return string[]
36 36
 	 */
37
-	public function getGroups() : array {
37
+	public function getGroups () : array {
38 38
 		return array_diff( array_keys( $this->getUserInfo() ), PageBotList::NON_GROUP_KEYS );
39 39
 	}
40 40
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 *
44 44
 	 * @return string[]
45 45
 	 */
46
-	public function getUserInfo() : array {
46
+	public function getUserInfo () : array {
47 47
 		if ( $this->groups === null ) {
48 48
 			$usersList = PageBotList::get( $this->wiki )->getAdminsList();
49 49
 			$this->groups = $usersList[ $this->name ];
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 * @param string $groupName
58 58
 	 * @return bool
59 59
 	 */
60
-	public function inGroup( string $groupName ) : bool {
60
+	public function inGroup ( string $groupName ) : bool {
61 61
 		return in_array( $groupName, $this->getGroups() );
62 62
 	}
63 63
 
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 	 *
67 67
 	 * @inheritDoc
68 68
 	 */
69
-	public function getRegex() : string {
69
+	public function getRegex () : string {
70 70
 		$bits = $this->getAliases();
71
-		$bits[] = $this->name;
71
+		$bits[ ] = $this->name;
72 72
 		$regexify = function ( $el ) {
73 73
 			return str_replace( ' ', '[ _]', preg_quote( $el ) );
74 74
 		};
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 * @return string[]
82 82
 	 */
83
-	public function getAliases() : array {
84
-		return $this->getUserInfo()['aliases'] ?? [];
83
+	public function getAliases () : array {
84
+		return $this->getUserInfo()[ 'aliases' ] ?? [ ];
85 85
 	}
86 86
 
87 87
 	/**
88 88
 	 * @return string
89 89
 	 */
90
-	public function __toString() {
90
+	public function __toString () {
91 91
 		return $this->name;
92 92
 	}
93 93
 }
Please login to merge, or discard this patch.