Completed
Push — master ( 151189...cefe09 )
by Vitor
27s queued 22s
created
lib/Provider/Gateway/AGateway.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 abstract class AGateway implements IGateway {
19 19
 	use TConfigurable;
20
-	public const SCHEMA = [];
20
+	public const SCHEMA = [ ];
21 21
 
22 22
 	public function __construct(
23 23
 		public IAppConfig $appConfig,
@@ -27,41 +27,41 @@  discard block
 block discarded – undo
27 27
 	/**
28 28
 	 * @throws MessageTransmissionException
29 29
 	 */
30
-	#[\Override]
31
-	abstract public function send(string $identifier, string $message, array $extra = []): void;
30
+	#[\Override ]
31
+	abstract public function send(string $identifier, string $message, array $extra = [ ]): void;
32 32
 
33
-	#[\Override]
34
-	public function isComplete(array $schema = []): bool {
33
+	#[\Override ]
34
+	public function isComplete(array $schema = [ ]): bool {
35 35
 		if (empty($schema)) {
36 36
 			$schema = static::SCHEMA;
37 37
 		}
38 38
 		$set = $this->appConfig->getKeys(Application::APP_ID);
39
-		$fields = array_column($schema['fields'], 'field');
40
-		$fields = array_map(fn ($f) => $this->getProviderId() . '_' . $f, $fields);
39
+		$fields = array_column($schema[ 'fields' ], 'field');
40
+		$fields = array_map(fn ($f) => $this->getProviderId().'_'.$f, $fields);
41 41
 		$intersect = array_intersect($fields, $set);
42 42
 		return count($intersect) === count($fields);
43 43
 	}
44 44
 
45
-	#[\Override]
45
+	#[\Override ]
46 46
 	public function getSettings(): array {
47
-		$settings = [];
48
-		if (isset(static::SCHEMA['instructions'])) {
49
-			$settings['instructions'] = static::SCHEMA['instructions'];
47
+		$settings = [ ];
48
+		if (isset(static::SCHEMA[ 'instructions' ])) {
49
+			$settings[ 'instructions' ] = static::SCHEMA[ 'instructions' ];
50 50
 		}
51
-		$settings['name'] = static::SCHEMA['name'];
51
+		$settings[ 'name' ] = static::SCHEMA[ 'name' ];
52 52
 		return $settings;
53 53
 	}
54 54
 
55
-	#[\Override]
55
+	#[\Override ]
56 56
 	abstract public function cliConfigure(InputInterface $input, OutputInterface $output): int;
57 57
 
58
-	#[\Override]
59
-	public function remove(array $schema = []): void {
58
+	#[\Override ]
59
+	public function remove(array $schema = [ ]): void {
60 60
 		if (empty($schema)) {
61 61
 			$schema = static::SCHEMA;
62 62
 		}
63
-		foreach ($schema['fields'] as $field) {
64
-			$method = 'delete' . $this->toCamel($field['field']);
63
+		foreach ($schema[ 'fields' ] as $field) {
64
+			$method = 'delete'.$this->toCamel($field[ 'field' ]);
65 65
 			$this->{$method}();
66 66
 		}
67 67
 	}
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 		return str_replace(' ', '', ucwords(str_replace('_', ' ', $field)));
71 71
 	}
72 72
 
73
-	#[\Override]
73
+	#[\Override ]
74 74
 	public static function getProviderId(): string {
75 75
 		$id = self::deriveIdFromFqcn(static::class);
76 76
 		if ($id === null) {
77
-			throw new \LogicException('Cannot derive gateway id from FQCN: ' . static::class);
77
+			throw new \LogicException('Cannot derive gateway id from FQCN: '.static::class);
78 78
 		}
79 79
 		return $id;
80 80
 	}
Please login to merge, or discard this patch.