@@ -34,12 +34,12 @@ |
||
34 | 34 | $columns[] = [$column, $value ?: '(empty)']; |
35 | 35 | } |
36 | 36 | |
37 | - if($tenants->last()->id !== $tenant->id) { |
|
37 | + if ($tenants->last()->id !== $tenant->id) { |
|
38 | 38 | $columns[] = new \Symfony\Component\Console\Helper\TableSeparator(); |
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
42 | - if($title) { |
|
42 | + if ($title) { |
|
43 | 43 | $this->getOutput()->title($title); |
44 | 44 | } |
45 | 45 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | */ |
53 | 53 | public function handle() |
54 | 54 | { |
55 | - if(!$tenant = $this->tenants->findById($this->argument('id'))) { |
|
55 | + if (!$tenant = $this->tenants->findById($this->argument('id'))) { |
|
56 | 56 | $this->error('Cannot find a tenant #' . $this->argument('id')); |
57 | 57 | return; |
58 | 58 | } |
@@ -51,14 +51,14 @@ |
||
51 | 51 | */ |
52 | 52 | public function handle() |
53 | 53 | { |
54 | - if(!$tenant = $this->tenants->findById($this->argument('id'))) { |
|
54 | + if (!$tenant = $this->tenants->findById($this->argument('id'))) { |
|
55 | 55 | $this->error('Cannot find a tenant #' . $this->argument('id')); |
56 | 56 | return; |
57 | 57 | } |
58 | 58 | |
59 | 59 | $this->renderTenants($tenant, 'Found a deleted tenant'); |
60 | 60 | |
61 | - if(!$this->confirm('Would you like to restore it?')) { |
|
61 | + if (!$this->confirm('Would you like to restore it?')) { |
|
62 | 62 | return; |
63 | 63 | } |
64 | 64 |
@@ -54,14 +54,14 @@ discard block |
||
54 | 54 | { |
55 | 55 | $tenants = $this->tenants->findByAnyIdentifier($this->argument('tenant'), false); |
56 | 56 | |
57 | - if($tenants->isEmpty()) { |
|
57 | + if ($tenants->isEmpty()) { |
|
58 | 58 | $this->error('Cannot find a matching tenant by "' . $this->argument('tenant') . '" identifier'); |
59 | 59 | return; |
60 | 60 | } |
61 | 61 | |
62 | 62 | $this->renderTenants($tenants, 'Found tenant(s)'); |
63 | 63 | |
64 | - if($tenants->count() > 1) { |
|
64 | + if ($tenants->count() > 1) { |
|
65 | 65 | $deletingId = $this->ask('We have found several tenants, which one would you like to delete? (enter its ID)'); |
66 | 66 | } |
67 | 67 | else { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | $tenant = $tenants->firstWhere('id', $deletingId); |
72 | 72 | |
73 | - if($this->option('safe')) { |
|
73 | + if ($this->option('safe')) { |
|
74 | 74 | $tenant->delete(); |
75 | 75 | |
76 | 76 | $this->info('The tenant #' . $deletingId . ' safely deleted. To restore it, run:'); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | return; |
80 | 80 | } |
81 | 81 | |
82 | - if(!$this->confirm('Would you like to forcely delete the tenant #' . $deletingId . '? It cannot be reverted.')) { |
|
82 | + if (!$this->confirm('Would you like to forcely delete the tenant #' . $deletingId . '? It cannot be reverted.')) { |
|
83 | 83 | return; |
84 | 84 | } |
85 | 85 |
@@ -63,8 +63,7 @@ |
||
63 | 63 | |
64 | 64 | if($tenants->count() > 1) { |
65 | 65 | $deletingId = $this->ask('We have found several tenants, which one would you like to delete? (enter its ID)'); |
66 | - } |
|
67 | - else { |
|
66 | + } else { |
|
68 | 67 | $deletingId = $tenants->first()->id; |
69 | 68 | } |
70 | 69 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('saml2_tenants', function (Blueprint $table) { |
|
16 | + Schema::create('saml2_tenants', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->uuid('uuid'); |
19 | 19 | $table->string('key')->nullable(); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('saml2_tenants', function (Blueprint $table) { |
|
16 | + Schema::table('saml2_tenants', function(Blueprint $table) { |
|
17 | 17 | $table->string('relay_state_url')->nullable(); |
18 | 18 | }); |
19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down() |
27 | 27 | { |
28 | - Schema::table('saml2_tenants', function (Blueprint $table) { |
|
28 | + Schema::table('saml2_tenants', function(Blueprint $table) { |
|
29 | 29 | $table->dropColumn('relay_state_url'); |
30 | 30 | }); |
31 | 31 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('saml2_tenants', function (Blueprint $table) { |
|
16 | + Schema::table('saml2_tenants', function(Blueprint $table) { |
|
17 | 17 | $table->string('name_id_format')->default('persistent'); |
18 | 18 | }); |
19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down() |
27 | 27 | { |
28 | - Schema::table('saml2_tenants', function (Blueprint $table) { |
|
28 | + Schema::table('saml2_tenants', function(Blueprint $table) { |
|
29 | 29 | $table->dropColumn('name_id_format'); |
30 | 30 | }); |
31 | 31 | } |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | | |
160 | 160 | */ |
161 | 161 | |
162 | - 'x509cert' => env('SAML2_SP_CERT_X509',''), |
|
163 | - 'privateKey' => env('SAML2_SP_CERT_PRIVATEKEY',''), |
|
162 | + 'x509cert' => env('SAML2_SP_CERT_X509', ''), |
|
163 | + 'privateKey' => env('SAML2_SP_CERT_PRIVATEKEY', ''), |
|
164 | 164 | |
165 | 165 | /* |
166 | 166 | |-------------------------------------------------------------------------- |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | | |
172 | 172 | */ |
173 | 173 | |
174 | - 'entityId' => env('SAML2_SP_ENTITYID',''), |
|
174 | + 'entityId' => env('SAML2_SP_ENTITYID', ''), |
|
175 | 175 | |
176 | 176 | /* |
177 | 177 | |-------------------------------------------------------------------------- |
@@ -94,31 +94,31 @@ |
||
94 | 94 | */ |
95 | 95 | protected function interact(InputInterface $input, OutputInterface $output) |
96 | 96 | { |
97 | - if (! $input->getOption('entityId')) { |
|
97 | + if (!$input->getOption('entityId')) { |
|
98 | 98 | $input->setOption('entityId', $this->ask('Entity ID (fx. https://sts.windows.net/65b9e948-757b-4431-b140-62a2f8a3fdeb/) (optional)')); |
99 | 99 | } |
100 | 100 | |
101 | - if (! $input->getOption('loginUrl')) { |
|
101 | + if (!$input->getOption('loginUrl')) { |
|
102 | 102 | $input->setOption('loginUrl', $this->ask('Login URL (fx. https://login.microsoftonline.com/65b9e948-757b-4431-b140-62a2f8a3fdeb/saml2)')); |
103 | 103 | } |
104 | 104 | |
105 | - if (! $input->getOption('logoutUrl')) { |
|
105 | + if (!$input->getOption('logoutUrl')) { |
|
106 | 106 | $input->setOption('logoutUrl', $this->ask('Logout URL')); |
107 | 107 | } |
108 | 108 | |
109 | - if (! $input->getOption('nameIdFormat')) { |
|
109 | + if (!$input->getOption('nameIdFormat')) { |
|
110 | 110 | $input->setOption('nameIdFormat', $this->choice('Name ID Format', $this->nameIdFormatValues(), 'persistent')); |
111 | 111 | } |
112 | 112 | |
113 | - if (! $input->getOption('relayStateUrl')) { |
|
113 | + if (!$input->getOption('relayStateUrl')) { |
|
114 | 114 | $input->setOption('relayStateUrl', $this->ask('Post-login redirect URL (optional)')); |
115 | 115 | } |
116 | 116 | |
117 | - if (! $input->getOption('key')) { |
|
117 | + if (!$input->getOption('key')) { |
|
118 | 118 | $input->setOption('key', $this->ask('Key/name of the identity provider (optional)')); |
119 | 119 | } |
120 | 120 | |
121 | - if (! $input->getOption('metadata')) { |
|
121 | + if (!$input->getOption('metadata')) { |
|
122 | 122 | $input->setOption('metadata', $this->ask('Custom metadata (in format "field:value,anotherfield:value") (optional)')); |
123 | 123 | } |
124 | 124 | } |