@@ -4,17 +4,15 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Canvas\Api\Controllers; |
| 6 | 6 | |
| 7 | +use Baka\Http\QueryParser; |
|
| 8 | +use Canvas\Exception\NotFoundHttpException; |
|
| 7 | 9 | use Canvas\Models\AccessList; |
| 8 | -use Phalcon\Http\Response; |
|
| 9 | -use Phalcon\Acl\Role; |
|
| 10 | -use Phalcon\Validation; |
|
| 11 | -use Phalcon\Validation\Validator\PresenceOf; |
|
| 12 | 10 | use Canvas\Models\Apps; |
| 13 | -use Canvas\Exception\NotFoundHttpException; |
|
| 14 | -use Canvas\Exception\ServerErrorHttpException; |
|
| 15 | 11 | use Canvas\Models\Roles; |
| 16 | -use Baka\Http\QueryParser; |
|
| 17 | 12 | use Canvas\Validation as CanvasValidation; |
| 13 | +use Phalcon\Acl\Role; |
|
| 14 | +use Phalcon\Http\Response; |
|
| 15 | +use Phalcon\Validation\Validator\PresenceOf; |
|
| 18 | 16 | |
| 19 | 17 | /** |
| 20 | 18 | * Class RolesController. |
@@ -4,15 +4,12 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Canvas\Api\Controllers; |
| 6 | 6 | |
| 7 | -use Canvas\Models\UserLinkedSources; |
|
| 8 | 7 | use Baka\Auth\Models\Sources; |
| 9 | -use Phalcon\Http\Response; |
|
| 10 | -use Phalcon\Validation; |
|
| 11 | -use Phalcon\Validation\Validator\PresenceOf; |
|
| 12 | -use Canvas\Exception\BadRequestHttpException; |
|
| 13 | -use Canvas\Exception\NotFoundHttpException; |
|
| 14 | 8 | use Canvas\Exception\UnprocessableEntityHttpException; |
| 9 | +use Canvas\Models\UserLinkedSources; |
|
| 15 | 10 | use Canvas\Validation as CanvasValidation; |
| 11 | +use Phalcon\Http\Response; |
|
| 12 | +use Phalcon\Validation\Validator\PresenceOf; |
|
| 16 | 13 | |
| 17 | 14 | /** |
| 18 | 15 | * Class LanguagesController. |
@@ -4,22 +4,19 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Canvas\Api\Controllers; |
| 6 | 6 | |
| 7 | -use Canvas\Models\UsersInvite; |
|
| 8 | -use Canvas\Models\Users; |
|
| 7 | +use Canvas\Exception\NotFoundHttpException; |
|
| 8 | +use Canvas\Exception\UnprocessableEntityHttpException; |
|
| 9 | 9 | use Canvas\Models\Roles; |
| 10 | +use Canvas\Models\Users; |
|
| 11 | +use Canvas\Models\UsersInvite; |
|
| 12 | +use Canvas\Notifications\Invitation; |
|
| 13 | +use Canvas\Traits\AuthTrait; |
|
| 14 | +use Canvas\Validation as CanvasValidation; |
|
| 15 | +use Exception; |
|
| 16 | +use Phalcon\Http\Response; |
|
| 10 | 17 | use Phalcon\Security\Random; |
| 11 | -use Phalcon\Validation; |
|
| 12 | 18 | use Phalcon\Validation\Validator\PresenceOf; |
| 13 | 19 | use Phalcon\Validation\Validator\StringLength; |
| 14 | -use Canvas\Exception\UnprocessableEntityHttpException; |
|
| 15 | -use Canvas\Exception\NotFoundHttpException; |
|
| 16 | -use Canvas\Exception\ServerErrorHttpException; |
|
| 17 | -use Phalcon\Http\Response; |
|
| 18 | -use Exception; |
|
| 19 | -use Canvas\Exception\ModelException; |
|
| 20 | -use Canvas\Traits\AuthTrait; |
|
| 21 | -use Canvas\Notifications\Invitation; |
|
| 22 | -use Canvas\Validation as CanvasValidation; |
|
| 23 | 20 | |
| 24 | 21 | /** |
| 25 | 22 | * Class LanguagesController. |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | * Returns the http code description or if not found the code itself. |
| 53 | 53 | * @param int $code |
| 54 | 54 | * |
| 55 | - * @return int|string |
|
| 55 | + * @return string |
|
| 56 | 56 | */ |
| 57 | 57 | public function getHttpCodeDescription(int $code) |
| 58 | 58 | { |
@@ -4,13 +4,13 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Canvas\Http; |
| 6 | 6 | |
| 7 | -use Phalcon\Http\Response as PhResponse; |
|
| 8 | -use Phalcon\Mvc\Model\MessageInterface as ModelMessage; |
|
| 9 | -use Phalcon\Validation\Message\Group as ValidationMessage; |
|
| 10 | -use Canvas\Exception\ServerErrorHttpException; |
|
| 11 | 7 | use Canvas\Constants\Flags; |
| 8 | +use Canvas\Exception\ServerErrorHttpException; |
|
| 12 | 9 | use Canvas\Http\Exception\InternalServerErrorException; |
| 13 | 10 | use Phalcon\Di; |
| 11 | +use Phalcon\Http\Response as PhResponse; |
|
| 12 | +use Phalcon\Mvc\Model\MessageInterface as ModelMessage; |
|
| 13 | +use Phalcon\Validation\Message\Group as ValidationMessage; |
|
| 14 | 14 | use Throwable; |
| 15 | 15 | |
| 16 | 16 | class Response extends PhResponse |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | * From a given push notification send it to the user. |
| 30 | 30 | * |
| 31 | 31 | * @param Event $event |
| 32 | - * @param PusherNotification $pusherNotification |
|
| 33 | - * @return void |
|
| 32 | + * @param PusherNotification $pushNotification |
|
| 33 | + * @return \Canvas\Jobs\PendingDispatch |
|
| 34 | 34 | */ |
| 35 | 35 | public function sendPushNotification(Event $event, PushNotification $pushNotification) |
| 36 | 36 | { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @param Event $event |
| 44 | 44 | * @param PusherNotification $pusherNotification |
| 45 | - * @return void |
|
| 45 | + * @return \Canvas\Jobs\PendingDispatch |
|
| 46 | 46 | */ |
| 47 | 47 | public function sendRealtime(Event $event, PusherNotification $pusherNotification) |
| 48 | 48 | { |
@@ -4,12 +4,12 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Canvas\Listener; |
| 6 | 6 | |
| 7 | -use Phalcon\Events\Event; |
|
| 8 | 7 | use Baka\Mail\Message; |
| 9 | -use Canvas\Cli\Jobs\Pusher; |
|
| 10 | 8 | use Canvas\Cli\Jobs\PushNotifications; |
| 11 | -use Canvas\Notifications\PusherNotification; |
|
| 9 | +use Canvas\Cli\Jobs\Pusher; |
|
| 12 | 10 | use Canvas\Notifications\PushNotification; |
| 11 | +use Canvas\Notifications\PusherNotification; |
|
| 12 | +use Phalcon\Events\Event; |
|
| 13 | 13 | |
| 14 | 14 | class Notification |
| 15 | 15 | { |
@@ -4,10 +4,9 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Canvas\Middleware; |
| 6 | 6 | |
| 7 | -use Phalcon\Mvc\Micro; |
|
| 8 | 7 | use Canvas\Http\Exception\InternalServerErrorException; |
| 9 | 8 | use Canvas\Http\Exception\UnauthorizedException; |
| 10 | -use Canvas\Models\Subscription; |
|
| 9 | +use Phalcon\Mvc\Micro; |
|
| 11 | 10 | |
| 12 | 11 | /** |
| 13 | 12 | * Class AclMiddleware. |
@@ -4,14 +4,13 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Canvas\Middleware; |
| 6 | 6 | |
| 7 | +use Canvas\Exception\ServerErrorHttpException; |
|
| 7 | 8 | use Canvas\Http\Response; |
| 8 | 9 | use Canvas\Traits\ResponseTrait; |
| 10 | +use OakLabs\PhalconThrottler\ThrottlerInterface; |
|
| 9 | 11 | use Phalcon\Mvc\Micro; |
| 10 | 12 | use Phalcon\Mvc\Micro\MiddlewareInterface; |
| 11 | 13 | use Phalcon\Mvc\User\Plugin; |
| 12 | -use OakLabs\PhalconThrottler\ThrottlerInterface; |
|
| 13 | -use Phalcon\Events\Event; |
|
| 14 | -use Canvas\Exception\ServerErrorHttpException; |
|
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * Class ThrottleMiddleware |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Canvas\Providers; |
| 4 | 4 | |
| 5 | -use Phalcon\Di\ServiceProviderInterface; |
|
| 6 | -use Phalcon\DiInterface; |
|
| 7 | -use Canvas\Models\Apps; |
|
| 8 | 5 | use Canvas\Exception\ServerErrorHttpException; |
| 6 | +use Canvas\Models\Apps; |
|
| 7 | +use Phalcon\DiInterface; |
|
| 8 | +use Phalcon\Di\ServiceProviderInterface; |
|
| 9 | 9 | |
| 10 | 10 | class AppProvider implements ServiceProviderInterface |
| 11 | 11 | { |
@@ -5,12 +5,12 @@ |
||
| 5 | 5 | namespace Canvas\Providers; |
| 6 | 6 | |
| 7 | 7 | use function Canvas\Core\envValue; |
| 8 | -use Phalcon\Db\Adapter\Pdo\Mysql; |
|
| 9 | -use Phalcon\Di\ServiceProviderInterface; |
|
| 10 | -use Phalcon\DiInterface; |
|
| 11 | -use PDOException; |
|
| 12 | 8 | use Canvas\Exception\ServerErrorHttpException; |
| 13 | 9 | use PDO; |
| 10 | +use PDOException; |
|
| 11 | +use Phalcon\Db\Adapter\Pdo\Mysql; |
|
| 12 | +use Phalcon\DiInterface; |
|
| 13 | +use Phalcon\Di\ServiceProviderInterface; |
|
| 14 | 14 | |
| 15 | 15 | class DatabaseProvider implements ServiceProviderInterface |
| 16 | 16 | { |