path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php }}
- - name: Install composer dependencies & Test
+ - name: Install composer dependencies
run: composer install --prefer-dist --no-interaction --ansi
- name: Run PHPStan
mysql -uroot -proot -e "GRANT ALL ON \`bookstack-test\`.* TO 'bookstack-test'@'localhost';"
mysql -uroot -proot -e 'FLUSH PRIVILEGES;'
- - name: Install composer dependencies & Test
+ - name: Install composer dependencies
run: composer install --prefer-dist --no-interaction --ansi
- name: Migrate and seed the database
if (Cache::has($cacheKey) && config('app.env') === 'production') {
$docs = Cache::get($cacheKey);
} else {
- $docs = (new ApiDocsGenerator)->generate();
+ $docs = (new ApiDocsGenerator())->generate();
Cache::put($cacheKey, $docs, 60 * 24);
}
],
-];
\ No newline at end of file
+];
'memcached' => [
'driver' => 'memcached',
- 'options' => [
+ 'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
- 'servers' => $memcachedServers ?? [],
+ 'servers' => $memcachedServers ?? [],
],
'redis' => [
}
if (mb_strlen($email) < 5 || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
$this->error('Invalid email address provided');
+
return SymfonyCommand::FAILURE;
}
if ($this->userRepo->getByEmail($email) !== null) {
$this->error('A user with the provided email already exists!');
+
return SymfonyCommand::FAILURE;
}
}
if (mb_strlen($name) < 2) {
$this->error('Invalid name provided');
+
return SymfonyCommand::FAILURE;
}
}
if (mb_strlen($password) < 5) {
$this->error('Invalid password provided, Must be at least 5 characters');
+
return SymfonyCommand::FAILURE;
}
$user->save();
$this->info("Admin account with email \"{$user->email}\" successfully created!");
+
return SymfonyCommand::SUCCESS;
}
}
public static function fromString(string $search): self
{
$decoded = static::decode($search);
- $instance = new SearchOptions;
+ $instance = new SearchOptions();
foreach ($decoded as $type => $value) {
$instance->$type = $value;
}
return static::fromString($request->get('term'));
}
- $instance = new SearchOptions;
+ $instance = new SearchOptions();
$inputs = $request->only(['search', 'types', 'filters', 'exact', 'tags']);
$instance->searches = explode(' ', $inputs['search'] ?? []);
$instance->exacts = array_filter($inputs['exact'] ?? []);
* [pragmarx/google2fa](https://github.com/antonioribeiro/google2fa)
* [Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode)
* [phpseclib](https://github.com/phpseclib/phpseclib)
-* [Clockwork](https://github.com/itsgoingd/clockwork)
\ No newline at end of file
+* [Clockwork](https://github.com/itsgoingd/clockwork)
+* [PHPStan](https://phpstan.org/) & [Larastan](https://github.com/nunomaduro/larastan)
\ No newline at end of file