]> BookStack Code Mirror - bookstack/commitdiff
Applied stylci advisories
authorDan Brown <redacted>
Tue, 24 Aug 2021 20:23:55 +0000 (21:23 +0100)
committerDan Brown <redacted>
Tue, 24 Aug 2021 20:23:55 +0000 (21:23 +0100)
app/Entities/Models/BookChild.php
app/Entities/Repos/PageRepo.php
app/Entities/Tools/Markdown/CustomListItemRenderer.php
app/Entities/Tools/PageContent.php

index 263eceb58a4b15ee8a0fb767cbb66ac98d31386f..e1ba0b6f708d75a18f5cb38dc38262e7396d61c0 100644 (file)
@@ -8,29 +8,29 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
 /**
  * Class BookChild.
  *
- * @property int  $book_id
- * @property int  $priority
- * @property string  $book_slug
- * @property Book $book
+ * @property int    $book_id
+ * @property int    $priority
+ * @property string $book_slug
+ * @property Book   $book
  *
  * @method Builder whereSlugs(string $bookSlug, string $childSlug)
  */
 abstract class BookChild extends Entity
 {
-
     protected static function boot()
     {
         parent::boot();
 
         // Load book slugs onto these models by default during query-time
-        static::addGlobalScope('book_slug', function(Builder $builder) {
-            $builder->addSelect(['book_slug' => function($builder) {
+        static::addGlobalScope('book_slug', function (Builder $builder) {
+            $builder->addSelect(['book_slug' => function ($builder) {
                 $builder->select('slug')
                     ->from('books')
-                    ->whereColumn('books.id', '=',  'book_id');
+                    ->whereColumn('books.id', '=', 'book_id');
             }]);
         });
     }
+
     /**
      * Scope a query to find items where the child has the given childSlug
      * where its parent has the bookSlug.
index c37c643732338a4ef39dc3ccb1ee751f905fa1a3..ffa06d45954c9a7269998c1a719c23fa81bbba56 100644 (file)
@@ -218,7 +218,7 @@ class PageRepo
         $pageContent = new PageContent($page);
         if (!empty($input['markdown'] ?? '')) {
             $pageContent->setNewMarkdown($input['markdown']);
-        } else if (isset($input['html'])) {
+        } elseif (isset($input['html'])) {
             $pageContent->setNewHTML($input['html']);
         }
     }
index 9d6ec7c8774fbbda633ec378e3fec80930741446..be4cac4a75170df7c2ca1d6f784a7e3e66373632 100644 (file)
@@ -40,4 +40,4 @@ class CustomListItemRenderer implements BlockRendererInterface
 
         return $firstChild instanceof Paragraph && $firstChild->firstChild() instanceof TaskListItemMarker;
     }
-}
\ No newline at end of file
+}
index dfc8e332b6fe14a6de0efa63b0e2d843dd14cac5..b4cc1b81c8c1e01396d515951403253b6f5b4976 100644 (file)
@@ -5,7 +5,6 @@ namespace BookStack\Entities\Tools;
 use BookStack\Entities\Models\Page;
 use BookStack\Entities\Tools\Markdown\CustomListItemRenderer;
 use BookStack\Entities\Tools\Markdown\CustomStrikeThroughExtension;
-use BookStack\Entities\Tools\Markdown\CustomTaskListMarkerRenderer;
 use BookStack\Exceptions\ImageUploadException;
 use BookStack\Facades\Theme;
 use BookStack\Theming\ThemeEvents;
@@ -20,9 +19,6 @@ use League\CommonMark\CommonMarkConverter;
 use League\CommonMark\Environment;
 use League\CommonMark\Extension\Table\TableExtension;
 use League\CommonMark\Extension\TaskList\TaskListExtension;
-use League\CommonMark\Extension\TaskList\TaskListItemMarker;
-use League\CommonMark\Extension\TaskList\TaskListItemMarkerParser;
-use League\CommonMark\Extension\TaskList\TaskListItemMarkerRenderer;
 
 class PageContent
 {