]> BookStack Code Mirror - bookstack/commitdiff
Applied latest StyleCI changes
authorDan Brown <redacted>
Mon, 20 Dec 2021 17:40:27 +0000 (17:40 +0000)
committerDan Brown <redacted>
Mon, 20 Dec 2021 17:40:27 +0000 (17:40 +0000)
app/Entities/Tools/Cloner.php
app/Http/Controllers/ChapterController.php
app/Http/Controllers/PageController.php
tests/Entity/ChapterTest.php
tests/Permissions/RolesTest.php

index 59d8077a4943b3389e5486c274fedc02e7de1209..b4923b90aac1f0048c044b2cc374a8cb25b8f7b9 100644 (file)
@@ -16,7 +16,6 @@ use Illuminate\Http\UploadedFile;
 
 class Cloner
 {
-
     /**
      * @var PageRepo
      */
@@ -96,7 +95,6 @@ class Cloner
 
         $directChildren = $original->getDirectChildren();
         foreach ($directChildren as $child) {
-
             if ($child instanceof Chapter && userCan('chapter-create', $copyBook)) {
                 $this->cloneChapter($child, $copyBook, $child->name);
             }
@@ -146,5 +144,4 @@ class Cloner
 
         return $tags;
     }
-
-}
\ No newline at end of file
+}
index 16f0779cafe7184f4bcd2a58cae72c36fc6cab8f..7541ad0dbd9811d76d17b7036fd631de07c1916f 100644 (file)
@@ -204,7 +204,7 @@ class ChapterController extends Controller
         session()->flashInput(['name' => $chapter->name]);
 
         return view('chapters.copy', [
-            'book' => $chapter->book,
+            'book'    => $chapter->book,
             'chapter' => $chapter,
         ]);
     }
@@ -225,6 +225,7 @@ class ChapterController extends Controller
 
         if (is_null($newParentBook)) {
             $this->showErrorNotification(trans('errors.selected_book_not_found'));
+
             return redirect()->back();
         }
 
index 4a01dcc623692808ac33036b694a2679fbaa4284..84187f7451dadd736515262eb9ab029aebfac2eb 100644 (file)
@@ -458,6 +458,7 @@ class PageController extends Controller
 
         if (is_null($newParent)) {
             $this->showErrorNotification(trans('errors.selected_book_chapter_not_found'));
+
             return redirect()->back();
         }
 
index 1d28ec8393f87701a197f352aede7d5d23dca282..f099ca2bbcbb3197a1bf409caba3b512e60857b9 100644 (file)
@@ -74,7 +74,7 @@ class ChapterTest extends TestCase
         $resp->assertOk();
         $resp->assertSee('Copy Chapter');
         $resp->assertElementExists("input[name=\"name\"][value=\"{$chapter->name}\"]");
-        $resp->assertElementExists("input[name=\"entity_selection\"]");
+        $resp->assertElementExists('input[name="entity_selection"]');
     }
 
     public function test_copy()
@@ -85,7 +85,7 @@ class ChapterTest extends TestCase
         $otherBook = Book::query()->where('id', '!=', $chapter->book_id)->first();
 
         $resp = $this->asEditor()->post($chapter->getUrl('/copy'), [
-            'name' => 'My copied chapter',
+            'name'             => 'My copied chapter',
             'entity_selection' => 'book:' . $otherBook->id,
         ]);
 
index 9368c716331d7c62914c05a0d89344aabd4a78f4..f69b5603c31ce30bf5523c3a705babfb8d2eaa3b 100644 (file)
@@ -177,7 +177,7 @@ class RolesTest extends TestCase
         $role = Role::query()->first();
         $resp = $this->asAdmin()->get("/settings/roles/new?copy_from={$role->id}");
         $resp->assertOk();
-        $resp->assertElementExists('input[name="display_name"][value="' . ($role->display_name . ' (Copy)')  . '"]');
+        $resp->assertElementExists('input[name="display_name"][value="' . ($role->display_name . ' (Copy)') . '"]');
     }
 
     public function test_manage_user_permission()