CS: PSR1/2

parent 70b31c8d
...@@ -16,6 +16,7 @@ class AsgardEditorDirective ...@@ -16,6 +16,7 @@ class AsgardEditorDirective
if ($this->lang !== null) { if ($this->lang !== null) {
return asgard_i18n_editor($this->fieldName, $this->labelName, $this->content, $this->lang); return asgard_i18n_editor($this->fieldName, $this->labelName, $this->content, $this->lang);
} }
return asgard_editor($this->fieldName, $this->labelName, $this->content); return asgard_editor($this->fieldName, $this->labelName, $this->content);
} }
......
...@@ -60,6 +60,7 @@ class CollectingAssets ...@@ -60,6 +60,7 @@ class CollectingAssets
return true; return true;
} }
} }
return false; return false;
} }
} }
...@@ -37,14 +37,13 @@ if (! function_exists('is_core_module')) { ...@@ -37,14 +37,13 @@ if (! function_exists('is_core_module')) {
if (! function_exists('asgard_i18n_editor')) { if (! function_exists('asgard_i18n_editor')) {
function asgard_i18n_editor($fieldName, $labelName, $content, $lang) function asgard_i18n_editor($fieldName, $labelName, $content, $lang)
{ {
return view('core::components.i18n.textarea-wrapper', compact('fieldName','labelName', 'content', 'lang')); return view('core::components.i18n.textarea-wrapper', compact('fieldName', 'labelName', 'content', 'lang'));
} }
} }
if (! function_exists('asgard_editor')) { if (! function_exists('asgard_editor')) {
function asgard_editor($fieldName, $labelName, $content) function asgard_editor($fieldName, $labelName, $content)
{ {
return view('core::components.textarea-wrapper', compact('fieldName','labelName', 'content')); return view('core::components.textarea-wrapper', compact('fieldName', 'labelName', 'content'));
} }
} }
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Media\Events; namespace Modules\Media\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
final class FileIsCreating extends AbstractEntityHook implements EntityIsChanging final class FileIsCreating extends AbstractEntityHook implements EntityIsChanging
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Media\Events; namespace Modules\Media\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Media\Entities\File; use Modules\Media\Entities\File;
final class FileIsUpdating extends AbstractEntityHook implements EntityIsChanging final class FileIsUpdating extends AbstractEntityHook implements EntityIsChanging
......
...@@ -178,7 +178,7 @@ class EloquentFileRepositoryTest extends MediaTestCase ...@@ -178,7 +178,7 @@ class EloquentFileRepositoryTest extends MediaTestCase
'description' => 'My cool file!', 'description' => 'My cool file!',
'alt_attribute' => 'My cool file!', 'alt_attribute' => 'My cool file!',
'keywords' => 'My cool file!', 'keywords' => 'My cool file!',
] ],
]); ]);
Event::assertDispatched(FileIsUpdating::class, function ($e) use ($file) { Event::assertDispatched(FileIsUpdating::class, function ($e) use ($file) {
...@@ -195,7 +195,7 @@ class EloquentFileRepositoryTest extends MediaTestCase ...@@ -195,7 +195,7 @@ class EloquentFileRepositoryTest extends MediaTestCase
'filename' => 'bettername.jpg', 'filename' => 'bettername.jpg',
'en' => [ 'en' => [
'description' => 'Hello World', 'description' => 'Hello World',
] ],
]); ]);
}); });
...@@ -205,7 +205,7 @@ class EloquentFileRepositoryTest extends MediaTestCase ...@@ -205,7 +205,7 @@ class EloquentFileRepositoryTest extends MediaTestCase
'description' => 'My cool file!', 'description' => 'My cool file!',
'alt_attribute' => 'My cool file!', 'alt_attribute' => 'My cool file!',
'keywords' => 'My cool file!', 'keywords' => 'My cool file!',
] ],
]); ]);
$this->assertEquals('bettername.jpg', $file->filename); $this->assertEquals('bettername.jpg', $file->filename);
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Menu\Events; namespace Modules\Menu\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
class MenuIsCreating extends AbstractEntityHook implements EntityIsChanging class MenuIsCreating extends AbstractEntityHook implements EntityIsChanging
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Menu\Events; namespace Modules\Menu\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Menu\Entities\Menu; use Modules\Menu\Entities\Menu;
class MenuIsUpdating extends AbstractEntityHook implements EntityIsChanging class MenuIsUpdating extends AbstractEntityHook implements EntityIsChanging
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Menu\Events; namespace Modules\Menu\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
class MenuItemIsCreating extends AbstractEntityHook implements EntityIsChanging class MenuItemIsCreating extends AbstractEntityHook implements EntityIsChanging
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Menu\Events; namespace Modules\Menu\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Menu\Entities\Menuitem; use Modules\Menu\Entities\Menuitem;
class MenuItemIsUpdating extends AbstractEntityHook implements EntityIsChanging class MenuItemIsUpdating extends AbstractEntityHook implements EntityIsChanging
......
...@@ -43,7 +43,7 @@ abstract class BaseMenuTest extends TestCase ...@@ -43,7 +43,7 @@ abstract class BaseMenuTest extends TestCase
$this->menu = app(MenuRepository::class); $this->menu = app(MenuRepository::class);
$this->menuItem = app(MenuItemRepository::class); $this->menuItem = app(MenuItemRepository::class);
app(SettingRepository::class)->createOrUpdate([ app(SettingRepository::class)->createOrUpdate([
'core::locales' => ['en', 'fr',] 'core::locales' => ['en', 'fr',],
]); ]);
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Page\Events; namespace Modules\Page\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
class PageIsCreating extends AbstractEntityHook implements EntityIsChanging class PageIsCreating extends AbstractEntityHook implements EntityIsChanging
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Page\Events; namespace Modules\Page\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Page\Entities\Page; use Modules\Page\Entities\Page;
class PageIsUpdating extends AbstractEntityHook implements EntityIsChanging class PageIsUpdating extends AbstractEntityHook implements EntityIsChanging
......
...@@ -145,7 +145,6 @@ class EloquentPageRepositoryTest extends BasePageTest ...@@ -145,7 +145,6 @@ class EloquentPageRepositoryTest extends BasePageTest
$this->assertEquals('better-tpl', $page->template); $this->assertEquals('better-tpl', $page->template);
} }
/** @test */ /** @test */
public function it_triggers_event_when_page_was_updated() public function it_triggers_event_when_page_was_updated()
{ {
......
...@@ -165,7 +165,7 @@ class EloquentSettingRepositoryTest extends BaseSettingTest ...@@ -165,7 +165,7 @@ class EloquentSettingRepositoryTest extends BaseSettingTest
} }
if ($event->getSettingName() === 'core::site-name') { if ($event->getSettingName() === 'core::site-name') {
$event->setSettingValues([ $event->setSettingValues([
'en' => 'English AsgardCMS' 'en' => 'English AsgardCMS',
]); ]);
} }
}); });
...@@ -234,7 +234,7 @@ class EloquentSettingRepositoryTest extends BaseSettingTest ...@@ -234,7 +234,7 @@ class EloquentSettingRepositoryTest extends BaseSettingTest
} }
if ($event->getSettingName() === 'core::site-name') { if ($event->getSettingName() === 'core::site-name') {
$event->setSettingValues([ $event->setSettingValues([
'en' => 'English AsgardCMS' 'en' => 'English AsgardCMS',
]); ]);
} }
}); });
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Tag\Events; namespace Modules\Tag\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
class TagIsCreating extends AbstractEntityHook implements EntityIsChanging class TagIsCreating extends AbstractEntityHook implements EntityIsChanging
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Tag\Events; namespace Modules\Tag\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Tag\Entities\Tag; use Modules\Tag\Entities\Tag;
class TagIsUpdating extends AbstractEntityHook implements EntityIsChanging class TagIsUpdating extends AbstractEntityHook implements EntityIsChanging
......
...@@ -40,5 +40,4 @@ class EloquentTagRepository extends EloquentBaseRepository implements TagReposit ...@@ -40,5 +40,4 @@ class EloquentTagRepository extends EloquentBaseRepository implements TagReposit
return $tag; return $tag;
} }
} }
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\User\Events; namespace Modules\User\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
class RoleIsCreating extends AbstractEntityHook implements EntityIsChanging class RoleIsCreating extends AbstractEntityHook implements EntityIsChanging
{ {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
namespace Modules\User\Events; namespace Modules\User\Events;
use Cartalyst\Sentinel\Roles\RoleInterface; use Cartalyst\Sentinel\Roles\RoleInterface;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
class RoleIsUpdating extends AbstractEntityHook implements EntityIsChanging class RoleIsUpdating extends AbstractEntityHook implements EntityIsChanging
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\User\Events; namespace Modules\User\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
final class UserIsCreating extends AbstractEntityHook implements EntityIsChanging final class UserIsCreating extends AbstractEntityHook implements EntityIsChanging
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\User\Events; namespace Modules\User\Events;
use Modules\Core\Events\AbstractEntityHook;
use Modules\Core\Contracts\EntityIsChanging; use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;
use Modules\User\Entities\UserInterface; use Modules\User\Entities\UserInterface;
final class UserIsUpdating extends AbstractEntityHook implements EntityIsChanging final class UserIsUpdating extends AbstractEntityHook implements EntityIsChanging
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment