Skip to content

Commit 8118a70

Browse files
Merge pull request #492 from antonioribeiro/analysis-AD3QRy
Apply fixes from StyleCI [ci skip] [skip ci]
2 parents f185382 + 2131b40 commit 8118a70

File tree

7 files changed

+77
-100
lines changed

7 files changed

+77
-100
lines changed

src/Data/Repositories/Event.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ private function getEventId($event)
165165
{
166166
return $event['event']
167167
? $this->findOrCreate(
168-
['name' => $event['event']],
169-
['name']
170-
)
168+
['name' => $event['event']],
169+
['name']
170+
)
171171
: null;
172172
}
173173

src/Data/Repositories/SqlQuery.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ class SqlQuery extends Repository
3838
*/
3939
private $config;
4040

41-
public function __construct($model,
42-
SqlQueryLog $sqlQueryLogRepository,
43-
SqlQueryBinding $sqlQueryBindingRepository,
44-
SqlQueryBindingParameter $sqlQueryBindingParameterRepository,
45-
Connection $connectionRepository,
46-
Log $logRepository,
47-
Config $config
41+
public function __construct(
42+
$model,
43+
SqlQueryLog $sqlQueryLogRepository,
44+
SqlQueryBinding $sqlQueryBindingRepository,
45+
SqlQueryBindingParameter $sqlQueryBindingParameterRepository,
46+
Connection $connectionRepository,
47+
Log $logRepository,
48+
Config $config
4849
) {
4950
parent::__construct($model);
5051

src/Services/Authentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private function executeAuthMethod($method)
3838
// Call guard() if not null
3939
if ($guard && $guard != 'null') {
4040
$auth = $auth->guard($guard);
41-
}
41+
}
4242
}
4343
if (is_callable([$auth, $method], true, $callable_name)) {
4444
if ($data = $auth->$method()) {

src/Support/MobileDetect.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class MobileDetect extends Agent
1414
public function detectDevice()
1515
{
1616
return [
17-
'kind' => $this->getDeviceKind(),
18-
'model' => $this->device(),
19-
'is_mobile' => $this->isMobile(),
20-
'is_robot' => $this->isRobot(),
21-
];
17+
'kind' => $this->getDeviceKind(),
18+
'model' => $this->device(),
19+
'is_mobile' => $this->isMobile(),
20+
'is_robot' => $this->isRobot(),
21+
];
2222
}
2323

2424
/**

src/Vendor/Laravel/Controllers/Stats.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,19 @@ public function apiLog($uuid)
106106
$query = Tracker::sessionLog($uuid, false);
107107

108108
$query->select([
109-
'id',
110-
'session_id',
111-
'method',
112-
'path_id',
113-
'query_id',
114-
'route_path_id',
115-
'is_ajax',
116-
'is_secure',
117-
'is_json',
118-
'wants_json',
119-
'error_id',
120-
'created_at',
121-
]);
109+
'id',
110+
'session_id',
111+
'method',
112+
'path_id',
113+
'query_id',
114+
'route_path_id',
115+
'is_ajax',
116+
'is_secure',
117+
'is_json',
118+
'wants_json',
119+
'error_id',
120+
'created_at',
121+
]);
122122

123123
return Datatables::of($query)
124124
->edit_column('route_name', function ($row) {
@@ -203,12 +203,12 @@ public function apiErrors(Session $session)
203203
$query = Tracker::errors($session->getMinutes(), false);
204204

205205
$query->select([
206-
'id',
207-
'error_id',
208-
'session_id',
209-
'path_id',
210-
'updated_at',
211-
]);
206+
'id',
207+
'error_id',
208+
'session_id',
209+
'path_id',
210+
'updated_at',
211+
]);
212212

213213
return Datatables::of($query)
214214
->edit_column('updated_at', function ($row) {
@@ -245,18 +245,18 @@ public function apiVisits(Session $session)
245245
$query = Tracker::sessions($session->getMinutes(), false);
246246

247247
$query->select([
248-
'id',
249-
'uuid',
250-
'user_id',
251-
'device_id',
252-
'agent_id',
253-
'client_ip',
254-
'referer_id',
255-
'cookie_id',
256-
'geoip_id',
257-
'language_id',
258-
'is_robot',
259-
'updated_at',
248+
'id',
249+
'uuid',
250+
'user_id',
251+
'device_id',
252+
'agent_id',
253+
'client_ip',
254+
'referer_id',
255+
'cookie_id',
256+
'geoip_id',
257+
'language_id',
258+
'is_robot',
259+
'updated_at',
260260
]);
261261

262262
return Datatables::of($query)

src/Vendor/Laravel/Models/Log.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function routePath()
4848
public function pageViews($minutes, $results)
4949
{
5050
$query = $this->select(
51-
$this->getConnection()->raw('DATE(created_at) as date, count(*) as total')
52-
)->groupBy(
51+
$this->getConnection()->raw('DATE(created_at) as date, count(*) as total')
52+
)->groupBy(
5353
$this->getConnection()->raw('DATE(created_at)')
5454
)
5555
->period($minutes)
@@ -67,7 +67,8 @@ public function pageViewsByCountry($minutes, $results)
6767
$query =
6868
$this
6969
->select(
70-
'tracker_geoip.country_name as label', $this->getConnection()->raw('count(tracker_log.id) as value')
70+
'tracker_geoip.country_name as label',
71+
$this->getConnection()->raw('count(tracker_log.id) as value')
7172
)
7273
->join('tracker_sessions', 'tracker_log.session_id', '=', 'tracker_sessions.id')
7374
->join('tracker_geoip', 'tracker_sessions.geoip_id', '=', 'tracker_geoip.id')

src/Vendor/Laravel/ServiceProvider.php

Lines changed: 25 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,14 @@ protected function registerTracker()
156156
$app['tracker.loaded'] = true;
157157

158158
return new Tracker(
159-
$app['tracker.config'],
160-
$app['tracker.repositories'],
161-
$app['request'],
162-
$app['router'],
163-
$app['log'],
164-
$app,
165-
$app['tracker.messages']
166-
);
159+
$app['tracker.config'],
160+
$app['tracker.repositories'],
161+
$app['request'],
162+
$app['router'],
163+
$app['log'],
164+
$app,
165+
$app['tracker.messages']
166+
);
167167
});
168168
}
169169

@@ -271,77 +271,50 @@ public function registerRepositories()
271271

272272
$manager = new RepositoryManager(
273273
new GeoIp($this->getConfig('geoip_database_path')),
274-
275274
new MobileDetect(),
276-
277275
$uaParser,
278-
279276
$app['tracker.authentication'],
280-
281277
$app['session.store'],
282-
283278
$app['tracker.config'],
284-
285-
new Session($sessionModel,
286-
$app['tracker.config'],
287-
new PhpSession()),
288-
279+
new Session(
280+
$sessionModel,
281+
$app['tracker.config'],
282+
new PhpSession()
283+
),
289284
$logRepository,
290-
291285
new Path($pathModel),
292-
293286
new Query($queryModel),
294-
295287
new QueryArgument($queryArgumentModel),
296-
297288
new Agent($agentModel),
298-
299289
new Device($deviceModel),
300-
301-
new Cookie($cookieModel,
302-
$app['tracker.config'],
303-
$app['request'],
304-
$app['cookie']),
305-
290+
new Cookie(
291+
$cookieModel,
292+
$app['tracker.config'],
293+
$app['request'],
294+
$app['cookie']
295+
),
306296
new Domain($domainModel),
307-
308297
new Referer(
309298
$refererModel,
310299
$refererSearchTermModel,
311300
$this->getAppUrl(),
312301
$app->make('PragmaRX\Tracker\Support\RefererParser')
313302
),
314-
315303
$routeRepository,
316-
317304
new RoutePath($routePathModel),
318-
319305
new RoutePathParameter($routePathParameterModel),
320-
321306
new Error($errorModel),
322-
323307
new GeoIpRepository($geoipModel),
324-
325308
$sqlQueryRepository,
326-
327309
$sqlQueryBindingRepository,
328-
329310
$sqlQueryBindingParameterRepository,
330-
331311
$sqlQueryLogRepository,
332-
333312
$connectionRepository,
334-
335313
$eventRepository,
336-
337314
$eventLogRepository,
338-
339315
$systemClassRepository,
340-
341316
$crawlerDetect,
342-
343317
new Language($languageModel),
344-
345318
new LanguageDetect()
346319
);
347320

@@ -434,10 +407,12 @@ protected function registerSqlQueryLogWatcher()
434407
$me = $this;
435408

436409
if (!class_exists('Illuminate\Database\Events\QueryExecuted')) {
437-
$this->app['events']->listen('illuminate.query', function ($query,
438-
$bindings,
439-
$time,
440-
$name) use ($me) {
410+
$this->app['events']->listen('illuminate.query', function (
411+
$query,
412+
$bindings,
413+
$time,
414+
$name
415+
) use ($me) {
441416
$me->logSqlQuery($query, $bindings, $time, $name);
442417
});
443418
} else {

0 commit comments

Comments
 (0)