Skip to content

Commit

Permalink
Minor code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
gergo85 committed May 2, 2022
1 parent bc527c0 commit 9aadb98
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion classes/ConfirmationHandler.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php namespace Indikator\News\Classes;

use Hash;
use Backend;
use Mail;

Expand Down
3 changes: 1 addition & 2 deletions classes/NewsSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Log;
use BackendAuth;
use Db;
use Illuminate\Support\Collection;
use System\Classes\PluginManager;
use Indikator\News\Models\Logs;
use Indikator\News\Models\Posts;
Expand Down Expand Up @@ -120,7 +119,7 @@ protected function sendToActiveSubscribers()
{
$activeSubscribers = Subscribers::where('status', 1);

if(Settings::get('newsletter_subscriber_categories')) {
if (Settings::get('newsletter_subscriber_categories')) {
$categoryIds = $this->news->categories()->lists('id');
$activeSubscribers->filterCategories($categoryIds);
}
Expand Down
2 changes: 0 additions & 2 deletions classes/SubscriberService.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php namespace Indikator\News\Classes;

use Indikator\News\Models\Categories;
use Indikator\News\Models\Settings;
use Db;

trait SubscriberService
{
Expand Down
2 changes: 1 addition & 1 deletion updates/add_nested_categories_support.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function up()
->orderBy('sort_order')
->get();

for($i = 0; $i < count($categories); $i++) {
for ($i = 0; $i < count($categories); $i++) {
$category = $categories[$i];

$category->parent_id = null;
Expand Down
2 changes: 0 additions & 2 deletions updates/create_categories_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public function up()
{
Schema::create('indikator_news_categories', function($table)
{

$table->increments('id');
$table->string('name', 100);
$table->string('slug', 100);
Expand All @@ -23,7 +22,6 @@ public function up()

Schema::create('indikator_news_relations', function($table)
{

$table->integer('subscriber_id')->unsigned();
$table->integer('categories_id')->unsigned();
$table->primary(['subscriber_id', 'categories_id']);
Expand Down
1 change: 0 additions & 1 deletion updates/create_logs_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public function up()
{
Schema::create('indikator_news_newsletter_logs', function($table)
{

$table->increments('id');
$table->integer('news_id')->nullable()->unsigned();
$table->integer('subscriber_id')->nullable()->unsigned();
Expand Down
1 change: 0 additions & 1 deletion updates/create_posts_categories_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public function up()
{
Schema::create('indikator_news_posts_categories', function($table)
{

$table->integer('post_id')->unsigned();
$table->integer('category_id')->unsigned();
$table->primary(['post_id', 'category_id']);
Expand Down
1 change: 0 additions & 1 deletion updates/create_posts_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public function up()
{
Schema::create('news_posts', function($table)
{

$table->increments('id');
$table->string('title', 100);
$table->string('slug', 100);
Expand Down
1 change: 0 additions & 1 deletion updates/create_subscribers_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public function up()
{
Schema::create('news_subscribers', function($table)
{

$table->increments('id');
$table->string('name', 100);
$table->string('email', 100);
Expand Down

0 comments on commit 9aadb98

Please sign in to comment.