@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $matchArray = []; |
| 39 | 39 | $filters = json_decode($filters); |
| 40 | 40 | |
| 41 | - $model = $this->namespace.studly_case(str_singular($collection)) . 'Analytic'; |
|
| 41 | + $model = $this->namespace.studly_case(str_singular($collection)).'Analytic'; |
|
| 42 | 42 | |
| 43 | 43 | if (!class_exists($model)) { |
| 44 | 44 | throw new InvalidArgumentException("Model {$model} does not exist."); |
@@ -68,10 +68,10 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | $data = DB::connection($this->connection) |
| 70 | 70 | ->collection($collection) |
| 71 | - ->raw(function ($query) use ($matchArray) { |
|
| 71 | + ->raw(function($query) use ($matchArray) { |
|
| 72 | 72 | return $query->aggregate([ |
| 73 | - [ '$match' => $matchArray ], |
|
| 74 | - [ '$sort' => ['created_at' => 1] ] |
|
| 73 | + ['$match' => $matchArray], |
|
| 74 | + ['$sort' => ['created_at' => 1]] |
|
| 75 | 75 | ]); |
| 76 | 76 | }); |
| 77 | 77 | |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | class APAnalyticsServiceProvider extends ServiceProvider |
| 8 | 8 | { |
| 9 | - const CONFIG_PATH = __DIR__ . '/../config/apanalytics.php'; |
|
| 9 | + const CONFIG_PATH = __DIR__.'/../config/apanalytics.php'; |
|
| 10 | 10 | |
| 11 | 11 | public function boot() |
| 12 | 12 | { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | $this->mergeConfigFrom(self::CONFIG_PATH, 'apanalytics'); |
| 23 | 23 | |
| 24 | - $this->app->singleton('apanalytics', function () { |
|
| 24 | + $this->app->singleton('apanalytics', function() { |
|
| 25 | 25 | return new APAnalytics(); |
| 26 | 26 | }); |
| 27 | 27 | } |
@@ -4,14 +4,14 @@ discard block |
||
| 4 | 4 | use AshPowell\APAnalytics\APAnalytics; |
| 5 | 5 | use Illuminate\Support\Carbon; |
| 6 | 6 | |
| 7 | -if (! function_exists('analytics')) { |
|
| 7 | +if (!function_exists('analytics')) { |
|
| 8 | 8 | function analytics(): APAnalytics |
| 9 | 9 | { |
| 10 | 10 | return app(APAnalytics::class); |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -if (! function_exists('trackEvent')) { |
|
| 14 | +if (!function_exists('trackEvent')) { |
|
| 15 | 15 | /** |
| 16 | 16 | * Access event dispatch of event tracker direct |
| 17 | 17 | * @param mixed $event |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | -if (! function_exists('showEvents')) { |
|
| 29 | +if (!function_exists('showEvents')) { |
|
| 30 | 30 | /** |
| 31 | 31 | * Access event dispatch of event tracker direct |
| 32 | 32 | * @param mixed $event |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | -if (! function_exists('mongoTime')) { |
|
| 53 | +if (!function_exists('mongoTime')) { |
|
| 54 | 54 | /** |
| 55 | 55 | * Returns time in MongoDb Time |
| 56 | 56 | * @param \DateTime|string|null $time |