Skip to content

Commit

Permalink
Continue cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
kaioken committed Jul 4, 2020
1 parent 71cec4c commit 70f9238
Show file tree
Hide file tree
Showing 69 changed files with 114 additions and 2,472 deletions.
1 change: 0 additions & 1 deletion scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ filter:
- 'storage/*'
- 'vendor/*'
- 'phinx.php'
- 'src/Http/SwooleRequest.php' #it need to be this big , since the phalcon interfase requires it

build_failure_conditions:
# No classes/methods with a rating of D or worse
Expand Down
6 changes: 3 additions & 3 deletions src/Api/Controllers/AppsPlansController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
use Phalcon\Http\Response;
use Stripe\Customer as StripeCustomer;
use Phalcon\Validation\Validator\PresenceOf;
use Canvas\Http\Exception\NotFoundException;
use Canvas\Http\Exception\UnauthorizedException;
use Canvas\Http\Exception\UnprocessableEntityException;
use Baka\Http\Exception\NotFoundException;
use Baka\Http\Exception\UnauthorizedException;
use Baka\Http\Exception\UnprocessableEntityException;
use Canvas\Models\Subscription as CanvasSubscription;
use Phalcon\Cashier\Subscription;
use Canvas\Models\UserCompanyApps;
Expand Down
4 changes: 2 additions & 2 deletions src/Api/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
use Canvas\Auth\Auth;
use Canvas\Auth\Factory;
use Canvas\Exception\ModelException;
use Canvas\Http\Exception\InternalServerErrorException;
use Canvas\Http\Exception\NotFoundException;
use Baka\Http\Exception\InternalServerErrorException;
use Baka\Http\Exception\NotFoundException;
use Canvas\Models\Sources;
use Canvas\Models\UserLinkedSources;
use Canvas\Models\Users;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Controllers/CompaniesBranchesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Canvas\Api\Controllers;

use Phalcon\Http\Response;
use Canvas\Http\Exception\UnprocessableEntityException;
use Baka\Http\Exception\UnprocessableEntityException;
use Canvas\Models\CompaniesBranches;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Controllers/CompaniesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Canvas\Api\Controllers;

use Baka\Http\Contracts\Api\CrudCustomFieldsBehaviorTrait;
use Canvas\Http\Exception\UnauthorizedException;
use Baka\Http\Exception\UnauthorizedException;
use Canvas\Models\Companies;
use Phalcon\Http\Response;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/Controllers/CustomFieldsModulesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use Canvas\Models\CustomFieldsModules;
use Canvas\CustomFields\CustomFields;
use Phalcon\Http\Response;
use Canvas\Http\Exception\NotFoundException;
use Canvas\Http\Exception\UnauthorizedException;
use Baka\Http\Exception\NotFoundException;
use Baka\Http\Exception\UnauthorizedException;
use Canvas\Dto\CustomFieldsModules as CustomFieldsModulesDto;
use Canvas\Mapper\CustomFieldsModulesMapper;
use Canvas\Contracts\Controllers\ProcessOutputMapperTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Controllers/EmailTemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Canvas\Api\Controllers;

use Canvas\Http\Exception\NotFoundException;
use Baka\Http\Exception\NotFoundException;
use Canvas\Models\EmailTemplates;
use Canvas\Models\Users;
use Phalcon\Http\Response;
Expand Down
6 changes: 2 additions & 4 deletions src/Api/Controllers/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Canvas\Api\Controllers;

use Canvas\Http\Exception\InternalServerErrorException;
use Baka\Http\Exception\InternalServerErrorException;
use Exception;
use PDOException;
use Phalcon\Http\Response;
Expand Down Expand Up @@ -74,8 +74,6 @@ public function status() : Response
} catch (Exception $e) {
$this->log->error("RabbitMQ isn't working. {$e->getMessage()}", $e->getTrace());
$response['errors']['RabbitMQ'] = "RabbitMQ isn't working.";
} finally {
$this->queue->close();
}

//Try to connect to db
Expand All @@ -93,6 +91,6 @@ public function status() : Response
return $this->response(['OK']);
}

throw new InternalServerErrorException(json_encode($response));
throw InternalServerErrorException::create('Internal Server Error', $response);
}
}
2 changes: 1 addition & 1 deletion src/Api/Controllers/PaymentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Canvas\Api\Controllers;

use Canvas\Http\Exception\NotFoundException;
use Baka\Http\Exception\NotFoundException;
use Baka\Contracts\Cashier\StripeWebhookHandlersTrait;
use Phalcon\Http\Response;
use Canvas\Models\Users;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Controllers/RolesAccessListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Baka\Database\Exception\ModelNotFoundException;
use function Baka\getShortClassName;
use Baka\Validation as CanvasValidation;
use Canvas\Http\Exception\NotFoundException;
use Baka\Http\Exception\NotFoundException;
use Canvas\Models\AccessList;
use Canvas\Models\Roles;
use Phalcon\Acl\Role;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Controllers/UserLinkedSourcesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Baka\Validation as CanvasValidation;
use Baka\ASDecoder;

use Canvas\Http\Exception\InternalServerErrorException;
use Baka\Http\Exception\InternalServerErrorException;

/**
* Class LanguagesController.
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Controllers/UserWebhooksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use function Baka\isJson;
use Baka\Validation;
use Canvas\Http\Exception\UnprocessableEntityException;
use Baka\Http\Exception\UnprocessableEntityException;
use Canvas\Models\UserWebhooks;
use Canvas\Webhooks;
use Phalcon\Http\Response;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Controllers/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Baka\Validation as CanvasValidation;
use Canvas\Contracts\Controllers\ProcessOutputMapperTrait;
use Canvas\Dto\User as UserDto;
use Canvas\Http\Exception\InternalServerErrorException;
use Baka\Http\Exception\InternalServerErrorException;
use Canvas\Mapper\UserMapper;
use Canvas\Models\Users;
use Canvas\Models\UsersAssociatedApps;
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Controllers/UsersInviteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Baka\Http\Exception\NotFoundException;
use Baka\Validation as CanvasValidation;
use Canvas\Auth\Auth;
use Canvas\Http\Exception\UnprocessableEntityException;
use Baka\Http\Exception\UnprocessableEntityException;
use Canvas\Models\Roles;
use Canvas\Models\Users;
use Canvas\Models\UsersInvite;
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Canvas\Auth;

use Baka\Auth\Auth;
use Canvas\Hashing\Password;
use Baka\Hashing\Password;
use Canvas\Models\Users;
use Exception;
use Phalcon\Di;
Expand Down
4 changes: 2 additions & 2 deletions src/Cli/jobs/Apps.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Canvas\Cli\Jobs;

use Canvas\Contracts\Queue\QueueableJobInterface;
use Canvas\Jobs\Job;
use Baka\Contracts\Queue\QueueableJobInterface;
use Baka\Jobs\Job;
use Phalcon\Di;
use Canvas\Models\Apps as CanvasApps;
use Phalcon\Security\Random;
Expand Down
4 changes: 2 additions & 2 deletions src/Cli/jobs/PushNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Canvas\Cli\Jobs;

use Canvas\Contracts\Queue\QueueableJobInterface;
use Canvas\Jobs\Job;
use Baka\Contracts\Queue\QueueableJobInterface;
use Baka\Jobs\Job;
use Phalcon\Di;
use GuzzleHttp\Client as GuzzleClient;
use Http\Adapter\Guzzle6\Client as GuzzleAdapter;
Expand Down
4 changes: 2 additions & 2 deletions src/Cli/jobs/Pusher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Canvas\Cli\Jobs;

use Canvas\Contracts\Queue\QueueableJobInterface;
use Canvas\Jobs\Job;
use Baka\Contracts\Queue\QueueableJobInterface;
use Baka\Jobs\Job;
use Canvas\Notifications\PusherNotification;
use Phalcon\Di;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/tasks/QueueTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Canvas\Cli\Tasks;

use Canvas\Contracts\Queue\QueueableJobInterface;
use Baka\Contracts\Queue\QueueableJobInterface;
use Canvas\Models\Users;
use Canvas\Queue\Queue;
use Baka\Queue\Queue;
use Phalcon\Cli\Task as PhTask;
use Phalcon\Mvc\Model;
use Throwable;
Expand Down
22 changes: 0 additions & 22 deletions src/Contracts/Notifications/NotifiableTrait.php

This file was deleted.

24 changes: 0 additions & 24 deletions src/Contracts/Notifications/NotificationInterface.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Core/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
],
'app' => [
//GEWAER is a multi entity app encosystem so we need what is the current api ID for this api
//GEWAER is a multi entity app ecosystem so we need what is the current api ID for this api
'id' => envValue('GEWAER_APP_ID', 1),
'frontEndUrl' => envValue('FRONTEND_URL'),
'version' => envValue('VERSION', time()),
Expand Down
118 changes: 0 additions & 118 deletions src/Core/functions.php

This file was deleted.

12 changes: 0 additions & 12 deletions src/CustomFields/AbstractCustomFieldsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,4 @@ public function getAllCustomFields(array $fields = [])

return $listOfCustomFields;
}

/**
* Before create.
*
* @return void
*/
public function beforeCreate()
{
$this->created_at = date('Y-m-d H:i:s');
$this->updated_at = null;
$this->is_deleted = 0;
}
}
Loading

0 comments on commit 70f9238

Please sign in to comment.