Commit 91a99b3f authored by Korko's avatar Korko
Browse files

Apply fixes from StyleCI

parent 6591e6de
Pipeline #93395 passed with stage
in 6 minutes and 2 seconds
......@@ -2,7 +2,6 @@
namespace Korko\SecretSanta\Http\Middleware;
use Closure;
use Hashids;
use Illuminate\Foundation\Http\Middleware\TransformsRequest as Middleware;
......@@ -11,17 +10,19 @@ class Unhash extends Middleware
/**
* Transform the given value.
*
* @param string $key
* @param mixed $value
* @param string $key
* @param mixed $value
*
* @return mixed
*/
protected function transform($key, $value)
{
if (! array_key_exists($key, config('hashids.parameters'))) {
if (!array_key_exists($key, config('hashids.parameters'))) {
return $value;
}
$connection = config('hashids.parameters')[$key];
return array_get(Hashids::connection($connection)->decode($value), 0, $value);
}
}
<?php
return [
'secret' => env('NOCAPTCHA_SECRET'),
'secret' => env('NOCAPTCHA_SECRET'),
'sitekey' => env('NOCAPTCHA_SITEKEY'),
'options' => [
'timeout' => 30,
......
......@@ -40,7 +40,7 @@ return [
'connections' => [
'main' => [
'salt' => 'secretsanta',
'salt' => 'secretsanta',
'length' => '5',
],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment