Skip to content

Commit 4670aeb

Browse files
authored
Merge pull request #163 from yajra/analysis-YORMpv
Apply fixes from StyleCI
2 parents 42881ec + 975bed2 commit 4670aeb

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Services/DataTable.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public function render(string $view = null, array $data = [], array $mergeData =
227227
*/
228228
public function request(): Request
229229
{
230-
if (!$this->request) {
230+
if (! $this->request) {
231231
$this->request = app(Request::class);
232232
}
233233

@@ -352,7 +352,7 @@ public function builder(): Builder
352352
return $this->htmlBuilder = $this->htmlBuilder();
353353
}
354354

355-
if (!$this->htmlBuilder) {
355+
if (! $this->htmlBuilder) {
356356
$this->htmlBuilder = app(Builder::class);
357357
}
358358

@@ -459,7 +459,7 @@ public function excel()
459459
{
460460
set_time_limit(3600);
461461

462-
$path = $this->getFilename() . '.' . strtolower($this->excelWriter);
462+
$path = $this->getFilename().'.'.strtolower($this->excelWriter);
463463

464464
$excelFile = $this->buildExcelFile();
465465

@@ -486,11 +486,11 @@ protected function buildExcelFile()
486486
return $this->buildFastExcelFile();
487487
}
488488

489-
if (!class_exists(ExcelServiceProvider::class)) {
489+
if (! class_exists(ExcelServiceProvider::class)) {
490490
throw new Exception('Please install maatwebsite/excel to be able to use this function.');
491491
}
492492

493-
if (!new $this->exportClass instanceof DataTablesExportHandler) {
493+
if (! new $this->exportClass instanceof DataTablesExportHandler) {
494494
$collection = $this->getAjaxResponseData();
495495

496496
return new $this->exportClass($this->convertToLazyCollection($collection));
@@ -531,7 +531,7 @@ public function setFilename(string $filename): static
531531
*/
532532
protected function filename(): string
533533
{
534-
return class_basename($this) . '_' . date('YmdHis');
534+
return class_basename($this).'_'.date('YmdHis');
535535
}
536536

537537
/**
@@ -591,7 +591,7 @@ private function toColumnsCollection(array $columns): Collection
591591
public function csv()
592592
{
593593
set_time_limit(3600);
594-
$path = $this->getFilename() . '.' . strtolower($this->csvWriter);
594+
$path = $this->getFilename().'.'.strtolower($this->csvWriter);
595595

596596
$excelFile = $this->buildExcelFile();
597597

@@ -623,7 +623,7 @@ public function pdf()
623623
}
624624

625625
// @phpstan-ignore-next-line
626-
return $this->buildExcelFile()->download($this->getFilename() . '.pdf', $this->pdfWriter);
626+
return $this->buildExcelFile()->download($this->getFilename().'.pdf', $this->pdfWriter);
627627
}
628628

629629
/**
@@ -635,7 +635,7 @@ public function pdf()
635635
*/
636636
public function snappyPdf(): Response
637637
{
638-
if (!class_exists(PdfWrapper::class)) {
638+
if (! class_exists(PdfWrapper::class)) {
639639
throw new Exception('You need to install barryvdh/laravel-snappy to be able to use this feature.');
640640
}
641641

@@ -648,7 +648,7 @@ public function snappyPdf(): Response
648648

649649
$snappy->setOptions($options)->setOrientation($orientation);
650650

651-
return $snappy->loadHTML($this->printPreview())->download($this->getFilename() . '.pdf');
651+
return $snappy->loadHTML($this->printPreview())->download($this->getFilename().'.pdf');
652652
}
653653

654654
/**
@@ -738,7 +738,7 @@ protected function hasScopes(array $scopes, bool $validateAll = false): bool
738738
return in_array(get_class($scope), $scopes);
739739
});
740740

741-
return $validateAll ? count($filteredScopes) === count($scopes) : !empty($filteredScopes);
741+
return $validateAll ? count($filteredScopes) === count($scopes) : ! empty($filteredScopes);
742742
}
743743

744744
/**

0 commit comments

Comments
 (0)