Skip to content

Commit e2b0597

Browse files
committed
renamed import
1 parent 9474d0e commit e2b0597

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/app/Services/Validators/Template.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use LaravelEnso\DataImport\app\Attributes\Sheet;
77
use LaravelEnso\DataImport\app\Attributes\Template as TemplateAttributes;
88
use LaravelEnso\DataImport\app\Contracts\Importable;
9-
use LaravelEnso\DataImport\app\Exceptions\Template as TemplateException;
9+
use LaravelEnso\DataImport\app\Exceptions\Template as Exception;
1010
use LaravelEnso\Helpers\app\Classes\Obj;
1111

1212
class Template
@@ -31,7 +31,7 @@ private function rootAttributes()
3131
->diff($this->template->keys());
3232

3333
if ($diff->isNotEmpty()) {
34-
throw TemplateException::missingRootAttributes($diff->implode('", "'));
34+
throw Exception::missingRootAttributes($diff->implode('", "'));
3535
}
3636

3737
return $this;
@@ -56,7 +56,7 @@ private function sheetMandatory($sheet)
5656
->diff($sheet->keys());
5757

5858
if ($diff->isNotEmpty()) {
59-
throw TemplateException::missingSheetAttributes($diff->implode('", "'));
59+
throw Exception::missingSheetAttributes($diff->implode('", "'));
6060
}
6161

6262
return $this;
@@ -65,12 +65,12 @@ private function sheetMandatory($sheet)
6565
private function importer($sheet)
6666
{
6767
if (! class_exists($sheet->get('importerClass'))) {
68-
throw TemplateException::missingImporterClass($sheet);
68+
throw Exception::missingImporterClass($sheet);
6969
}
7070

7171
if (! collect(class_implements($sheet->get('importerClass')))
7272
->contains(Importable::class)) {
73-
throw TemplateException::importerMissingContract($sheet);
73+
throw Exception::importerMissingContract($sheet);
7474
}
7575

7676
return $this;
@@ -83,11 +83,11 @@ private function validator($sheet)
8383
}
8484

8585
if (! class_exists($sheet->get('validatorClass'))) {
86-
throw TemplateException::missingValidatorClass($sheet);
86+
throw Exception::missingValidatorClass($sheet);
8787
}
8888

8989
if (! is_subclass_of($sheet->get('validatorClass'), Validator::class)) {
90-
throw TemplateException::incorectValidator($sheet);
90+
throw Exception::incorectValidator($sheet);
9191
}
9292
}
9393

@@ -98,7 +98,7 @@ private function sheetOptional($sheet)
9898
->diff(Sheet::Optional);
9999

100100
if ($diff->isNotEmpty()) {
101-
throw TemplateException::unknownSheetAttributes($diff->implode('", "'));
101+
throw Exception::unknownSheetAttributes($diff->implode('", "'));
102102
}
103103

104104
return $this;
@@ -121,7 +121,7 @@ private function columnMandatory($column)
121121
->diff($column->keys());
122122

123123
if ($diff->isNotEmpty()) {
124-
throw TemplateException::missingColumnAttributes($diff->implode('", "'));
124+
throw Exception::missingColumnAttributes($diff->implode('", "'));
125125
}
126126

127127
return $this;
@@ -134,7 +134,7 @@ private function columnOptional($column)
134134
->diff(ColumnAttributes::Optional);
135135

136136
if ($diff->isNotEmpty()) {
137-
throw TemplateException::unknownColumnAttributes($diff->implode('", "'));
137+
throw Exception::unknownColumnAttributes($diff->implode('", "'));
138138
}
139139
}
140140
}

0 commit comments

Comments
 (0)