Applied latest StyleCI changes
This commit is contained in:
parent
21f2a7087c
commit
fc109f7e1c
|
@ -16,7 +16,6 @@ use Illuminate\Http\UploadedFile;
|
||||||
|
|
||||||
class Cloner
|
class Cloner
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var PageRepo
|
* @var PageRepo
|
||||||
*/
|
*/
|
||||||
|
@ -96,7 +95,6 @@ class Cloner
|
||||||
|
|
||||||
$directChildren = $original->getDirectChildren();
|
$directChildren = $original->getDirectChildren();
|
||||||
foreach ($directChildren as $child) {
|
foreach ($directChildren as $child) {
|
||||||
|
|
||||||
if ($child instanceof Chapter && userCan('chapter-create', $copyBook)) {
|
if ($child instanceof Chapter && userCan('chapter-create', $copyBook)) {
|
||||||
$this->cloneChapter($child, $copyBook, $child->name);
|
$this->cloneChapter($child, $copyBook, $child->name);
|
||||||
}
|
}
|
||||||
|
@ -146,5 +144,4 @@ class Cloner
|
||||||
|
|
||||||
return $tags;
|
return $tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -225,6 +225,7 @@ class ChapterController extends Controller
|
||||||
|
|
||||||
if (is_null($newParentBook)) {
|
if (is_null($newParentBook)) {
|
||||||
$this->showErrorNotification(trans('errors.selected_book_not_found'));
|
$this->showErrorNotification(trans('errors.selected_book_not_found'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -458,6 +458,7 @@ class PageController extends Controller
|
||||||
|
|
||||||
if (is_null($newParent)) {
|
if (is_null($newParent)) {
|
||||||
$this->showErrorNotification(trans('errors.selected_book_chapter_not_found'));
|
$this->showErrorNotification(trans('errors.selected_book_chapter_not_found'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ class ChapterTest extends TestCase
|
||||||
$resp->assertOk();
|
$resp->assertOk();
|
||||||
$resp->assertSee('Copy Chapter');
|
$resp->assertSee('Copy Chapter');
|
||||||
$resp->assertElementExists("input[name=\"name\"][value=\"{$chapter->name}\"]");
|
$resp->assertElementExists("input[name=\"name\"][value=\"{$chapter->name}\"]");
|
||||||
$resp->assertElementExists("input[name=\"entity_selection\"]");
|
$resp->assertElementExists('input[name="entity_selection"]');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_copy()
|
public function test_copy()
|
||||||
|
|
Loading…
Reference in New Issue