Skip to content

Commit

Permalink
pint : fix style issue
Browse files Browse the repository at this point in the history
  • Loading branch information
developermithu committed Sep 10, 2024
1 parent 998594b commit 64315e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Console/Commands/InstallTallcraftuiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private function setupTailwindConfig()
return $this->warn('TallCraftUI is already installed.');
}

$this->info("\n" . 'Installing TallCraftUI...');
$this->info("\n".'Installing TallCraftUI...');

// Locate the content array
$contentArrayStart = $configContent->after('content:')->after('[');
Expand All @@ -57,12 +57,12 @@ private function setupTailwindConfig()
->trim()
->explode(',')
->filter()
->map(fn($item) => trim($item))
->map(fn ($item) => trim($item))
->push('"./vendor/developermithu/tallcraftui/src/View/Components/**/*.php",') // Add the new path as the last item
->implode(",\n\t\t");

// Format the content array with correct syntax and indentation
$formattedContentArray = str("\n\t\t" . $newContentArray . "\n\t");
$formattedContentArray = str("\n\t\t".$newContentArray."\n\t");

// Replace the original content array with the updated one
$updatedConfigContent = $configContent->replace($contentArrayEnd, $formattedContentArray);
Expand Down Expand Up @@ -103,15 +103,15 @@ protected function publishAndImportTallcraftuiCSS()
Artisan::call('vendor:publish --tag=tallcraftui-css --force');

$appCssPath = resource_path('css/app.css');
$importStatement = '@import "./tallcraftui.css";' . PHP_EOL . PHP_EOL;
$importStatement = '@import "./tallcraftui.css";'.PHP_EOL.PHP_EOL;

if (File::exists($appCssPath)) {
// Read the current content of the app.css file
$appCssContent = File::get($appCssPath);

// Check if the tallcraftui.css is already present
if (strpos($appCssContent, 'tallcraftui.css') === false) {
$updatedContent = $importStatement . $appCssContent;
$updatedContent = $importStatement.$appCssContent;

File::put($appCssPath, $updatedContent);

Expand Down
2 changes: 1 addition & 1 deletion src/Traits/WithTcTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function updated(string $propertyName)
public function sortBy(string $column)
{
if ($this->sortCol === $column) {
$this->sortAsc = !$this->sortAsc;
$this->sortAsc = ! $this->sortAsc;
} else {
$this->sortCol = $column;
$this->sortAsc = false;
Expand Down
2 changes: 1 addition & 1 deletion src/View/Components/Table/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function perPageValues()
if ($this->perPage) {
if (is_bool($this->perPage)) {
return [10, 20, 30, 50, 100];
} else if (is_array($this->perPage)) {
} elseif (is_array($this->perPage)) {
return $this->perPage;
}
}
Expand Down

0 comments on commit 64315e6

Please sign in to comment.