]> BookStack Code Mirror - bookstack/commitdiff
Applied StyleCI changes, added php/larastan to attribution 3039/head
authorDan Brown <redacted>
Fri, 5 Nov 2021 16:27:59 +0000 (16:27 +0000)
committerDan Brown <redacted>
Fri, 5 Nov 2021 16:27:59 +0000 (16:27 +0000)
.github/workflows/phpstan.yml
.github/workflows/phpunit.yml
app/Api/ApiDocsGenerator.php
app/Config/broadcasting.php
app/Config/cache.php
app/Console/Commands/CreateAdmin.php
app/Entities/Tools/SearchOptions.php
readme.md

index da9901bdcbaa44f63e9246e4457fce0a672b1fd1..c7f3179d00df53305a957f4dea83bbac5dbf2200 100644 (file)
@@ -34,7 +34,7 @@ jobs:
         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
index 7cb1307a18b57c4b4514546af05a4cbf7917eb45..6c33335025b7ce68ed7f609fa0aa5dad7b12e623 100644 (file)
@@ -45,7 +45,7 @@ jobs:
         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
index 0447cd731620663832e32481a3b7dcae1edeb3f7..d130304de0327ede3cdbdcd1f8ebf81350af64d1 100644 (file)
@@ -28,7 +28,7 @@ class ApiDocsGenerator
         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);
         }
 
index 09189bb094f74f299b3b4371511ad432dd848caf..5e929d3730faa5fd4e53f95a056782937531c981 100644 (file)
@@ -48,4 +48,4 @@ return [
 
     ],
 
-];
\ No newline at end of file
+];
index ded1dcae6cde447c5a181cfb87f86d03226c63fc..86297b2362579d4d4f35ab5b1a9a6bdd8b70e638 100644 (file)
@@ -58,10 +58,10 @@ return [
 
         'memcached' => [
             'driver'        => 'memcached',
-            'options' => [
+            'options'       => [
                 // Memcached::OPT_CONNECT_TIMEOUT => 2000,
             ],
-            'servers' =>  $memcachedServers ?? [],
+            'servers' => $memcachedServers ?? [],
         ],
 
         'redis' => [
index b421c3addf5fd3adaed691933d216e0025d01813..1494444205c734c31d8f493484f690ec4e472180 100644 (file)
@@ -51,11 +51,13 @@ class CreateAdmin extends Command
         }
         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;
         }
 
@@ -65,6 +67,7 @@ class CreateAdmin extends Command
         }
         if (mb_strlen($name) < 2) {
             $this->error('Invalid name provided');
+
             return SymfonyCommand::FAILURE;
         }
 
@@ -74,6 +77,7 @@ class CreateAdmin extends Command
         }
         if (mb_strlen($password) < 5) {
             $this->error('Invalid password provided, Must be at least 5 characters');
+
             return SymfonyCommand::FAILURE;
         }
 
@@ -84,6 +88,7 @@ class CreateAdmin extends Command
         $user->save();
 
         $this->info("Admin account with email \"{$user->email}\" successfully created!");
+
         return SymfonyCommand::SUCCESS;
     }
 }
index 216f79b9c5435ae3554e2d90a6b16efe52eb4c11..39074fb3862e57ed43d5731c8224dab45954ed12 100644 (file)
@@ -32,7 +32,7 @@ class SearchOptions
     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;
         }
@@ -55,7 +55,7 @@ class SearchOptions
             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'] ?? []);
index 92bbe2c5cd1273cb74b1ba9e9e72d3b85bbb5496..2f88be96aa77c56230f739556778a4e0f3da78a5 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -217,4 +217,5 @@ These are the great open-source projects used to help build BookStack:
 * [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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.