Skip to content

Commit

Permalink
Merge pull request #42 from ManojKiranA/master
Browse files Browse the repository at this point in the history
based on #40
  • Loading branch information
emchooo authored Jun 27, 2020
2 parents 65b6daf + 7c67b17 commit 9a443f1
Show file tree
Hide file tree
Showing 63 changed files with 154 additions and 122 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
laravel-tests:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/phpunit
4 changes: 2 additions & 2 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\User;
use App\Models\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
Expand Down Expand Up @@ -59,7 +59,7 @@ protected function validator(array $data)
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\User
* @return \App\Models\User
*/
protected function create(array $data)
{
Expand Down
16 changes: 8 additions & 8 deletions app/Http/Controllers/CampaignController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

namespace App\Http\Controllers;

use App\Campaign;
use App\Models\Campaign;
use App\Http\Requests\CampaignStoreRequest;
use App\Http\Requests\SendCampaignRequest;
use App\Http\Requests\SendTestMailRequest;
use App\Jobs\SendCampaign;
use App\Jobs\SendEmail;
use App\Lists;
use App\Models\Lists;
use App\Mail\CampaignMail;
use App\Service;
use App\Template;
use App\Models\Service;
use App\Models\Template;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Mail;
Expand Down Expand Up @@ -87,7 +87,7 @@ public function store(CampaignStoreRequest $request)
/**
* Display the specified resource.
*
* @param \App\Campaign $campaign
* @param \App\Models\Campaign $campaign
* @return \Illuminate\Http\Response
*/
public function show(Campaign $campaign)
Expand All @@ -105,7 +105,7 @@ public function show(Campaign $campaign)
/**
* Show the form for editing the specified resource.
*
* @param \App\Campaign $campaign
* @param \App\Models\Campaign $campaign
* @return \Illuminate\Http\Response
*/
public function edit(Campaign $campaign)
Expand All @@ -121,7 +121,7 @@ public function edit(Campaign $campaign)
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Campaign $campaign
* @param \App\Models\Campaign $campaign
* @return \Illuminate\Http\Response
*/
public function update(CampaignStoreRequest $request, Campaign $campaign)
Expand All @@ -146,7 +146,7 @@ public function update(CampaignStoreRequest $request, Campaign $campaign)
/**
* Remove the specified resource from storage.
*
* @param \App\Campaign $campaign
* @param \App\Models\Campaign $campaign
* @return \Illuminate\Http\Response
*/
public function destroy(Campaign $campaign)
Expand Down
14 changes: 7 additions & 7 deletions app/Http/Controllers/ContactController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace App\Http\Controllers;

use App\Contact;
use App\Field;
use App\Models\Contact;
use App\Models\Field;
use App\Http\Requests\ContactStoreRequest;
use App\Http\Requests\ContactUpdateRequest;
use App\Jobs\SendConfirmSubscriptionEmail;
use App\Lists;
use App\Models\Lists;

class ContactController extends Controller
{
Expand Down Expand Up @@ -68,7 +68,7 @@ public function store(ContactStoreRequest $request, Lists $lists)
/**
* Display the specified resource.
*
* @param \App\Contact $contact
* @param \App\Models\Contact $contact
* @return \Illuminate\Http\Response
*/
public function show(Lists $lists, Contact $contact)
Expand All @@ -79,7 +79,7 @@ public function show(Lists $lists, Contact $contact)
/**
* Show the form for editing the specified resource.
*
* @param \App\Contact $contact
* @param \App\Models\Contact $contact
* @return \Illuminate\Http\Response
*/
public function edit(Lists $lists, Contact $contact)
Expand All @@ -91,7 +91,7 @@ public function edit(Lists $lists, Contact $contact)
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Contact $contact
* @param \App\Models\Contact $contact
* @return \Illuminate\Http\Response
*/
public function update(ContactUpdateRequest $request, Lists $lists, Contact $contact)
Expand Down Expand Up @@ -122,7 +122,7 @@ public function unsubscribe(Lists $lists, Contact $contact)
/**
* Remove the specified resource from storage.
*
* @param \App\Contact $contact
* @param \App\Models\Contact $contact
* @return \Illuminate\Http\Response
*/
public function destroy(Contact $contact)
Expand Down
8 changes: 4 additions & 4 deletions app/Http/Controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace App\Http\Controllers;

use App\Campaign;
use App\Contact;
use App\Lists;
use App\SendingLog;
use App\Models\Campaign;
use App\Models\Contact;
use App\Models\Lists;
use App\Models\SendingLog;

class DashboardController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ExportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Http\Controllers;

use App\Lists;
use App\Models\Lists;
use Box\Spout\Writer\Common\Creator\WriterEntityFactory;
use Illuminate\Support\Str;

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/FieldController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Http\Controllers;

use App\Field;
use App\Models\Field;
use App\Http\Requests\FieldStoreRequest;
use App\Lists;
use App\Models\Lists;
use Illuminate\Http\Request;
use Illuminate\Support\Str;

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Http\Controllers;

use App\Lists;
use App\Models\Lists;

class FormController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/ImportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace App\Http\Controllers;

use App\Http\Requests\ImportSaveRequest;
use App\Import;
use App\Models\Import;
use App\Jobs\ImportContacts;
use App\Lists;
use App\Models\Lists;
use Box\Spout\Reader\Common\Creator\ReaderEntityFactory;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
Expand Down
18 changes: 9 additions & 9 deletions app/Http/Controllers/ListsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace App\Http\Controllers;

use App\Contact;
use App\Field;
use App\Models\Contact;
use App\Models\Field;
use App\Http\Requests\ListStoreRequest;
use App\Http\Requests\ListUpdateRequest;
use App\Http\Requests\StoreSubscriptionRequest;
use App\Jobs\SendConfirmSubscriptionEmail;
use App\Lists;
use App\Models\Lists;
use Illuminate\Http\Request;

class ListsController extends Controller
Expand Down Expand Up @@ -72,7 +72,7 @@ public function store(ListStoreRequest $request)
/**
* Display the specified resource.
*
* @param \App\Lists $lists
* @param \App\Models\Lists $lists
* @return \Illuminate\Http\Response
*/
public function show(Request $request, Lists $lists)
Expand All @@ -88,7 +88,7 @@ public function show(Request $request, Lists $lists)
/**
* Show the form for editing the specified resource.
*
* @param \App\Lists $lists
* @param \App\Models\Lists $lists
* @return \Illuminate\Http\Response
*/
public function edit(Lists $lists)
Expand All @@ -100,7 +100,7 @@ public function edit(Lists $lists)
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Lists $lists
* @param \App\Models\Lists $lists
* @return \Illuminate\Http\Response
*/
public function update(ListUpdateRequest $request, Lists $lists)
Expand All @@ -117,7 +117,7 @@ public function update(ListUpdateRequest $request, Lists $lists)
/**
* Remove the specified resource from storage.
*
* @param \App\Lists $lists
* @param \App\Models\Lists $lists
* @return \Illuminate\Http\Response
*/
public function destroy(Lists $lists)
Expand All @@ -132,7 +132,7 @@ public function destroy(Lists $lists)
/**
* Subscribe form.
*
* @param \App\Lists $lists
* @param \App\Models\Lists $lists
*/
public function subscribe(Lists $list)
{
Expand All @@ -143,7 +143,7 @@ public function subscribe(Lists $list)
* Save subscribe.
*
* @param \Illuminate\Http\Request $request
* @param \App\Lists $lists
* @param \App\Models\Lists $lists
*/
public function subscribeStore(StoreSubscriptionRequest $request, Lists $list)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Http\Controllers\Notifications;

use App\CampaignClickLink;
use App\Models\CampaignClickLink;
use App\Http\Controllers\Controller;
use App\SendingLog;
use App\Models\SendingLog;
use Aws\Sns\Message;
use Illuminate\Http\Request;

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/ReportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Http\Controllers;

use App\Campaign;
use App\CampaignClickLink;
use App\Models\Campaign;
use App\Models\CampaignClickLink;

class ReportController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/SettingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use App\Http\Requests\SettingsUpdateRequest;
use App\Http\Requests\SmtpSettings;
use App\Service;
use App\Models\Service;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

Expand Down
10 changes: 5 additions & 5 deletions app/Http/Controllers/TemplateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers;

use App\Http\Requests\TemplateStoreRequest;
use App\Template;
use App\Models\Template;

class TemplateController extends Controller
{
Expand Down Expand Up @@ -48,7 +48,7 @@ public function store(TemplateStoreRequest $request)
/**
* Display the specified resource.
*
* @param \App\Template $template
* @param \App\Models\Template $template
* @return \Illuminate\Http\Response
*/
public function show(Template $template)
Expand All @@ -59,7 +59,7 @@ public function show(Template $template)
/**
* Show the form for editing the specified resource.
*
* @param \App\Template $template
* @param \App\Models\Template $template
* @return \Illuminate\Http\Response
*/
public function edit(Template $template)
Expand All @@ -71,7 +71,7 @@ public function edit(Template $template)
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Template $template
* @param \App\Models\Template $template
* @return \Illuminate\Http\Response
*/
public function update(TemplateStoreRequest $request, Template $template)
Expand All @@ -86,7 +86,7 @@ public function update(TemplateStoreRequest $request, Template $template)
/**
* Remove the specified resource from storage.
*
* @param \App\Template $template
* @param \App\Models\Template $template
* @return \Illuminate\Http\Response
*/
public function destroy(Template $template)
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/TrackClickController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Http\Controllers;

use App\CampaignClickLink;
use App\CampaignLink;
use App\Contact;
use App\Models\CampaignClickLink;
use App\Models\CampaignLink;
use App\Models\Contact;

class TrackClickController extends Controller
{
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/TrackOpenController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Http\Controllers;

use App\Campaign;
use App\CampaignOpen;
use App\Contact;
use App\Models\Campaign;
use App\Models\CampaignOpen;
use App\Models\Contact;

class TrackOpenController extends Controller
{
Expand Down
Loading

0 comments on commit 9a443f1

Please sign in to comment.