diff --git a/src/Console/Commands/InstallTallcraftuiCommand.php b/src/Console/Commands/InstallTallcraftuiCommand.php index 3efc72a..27e1516 100644 --- a/src/Console/Commands/InstallTallcraftuiCommand.php +++ b/src/Console/Commands/InstallTallcraftuiCommand.php @@ -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('['); @@ -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); @@ -103,7 +103,7 @@ 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 @@ -111,7 +111,7 @@ protected function publishAndImportTallcraftuiCSS() // Check if the tallcraftui.css is already present if (strpos($appCssContent, 'tallcraftui.css') === false) { - $updatedContent = $importStatement . $appCssContent; + $updatedContent = $importStatement.$appCssContent; File::put($appCssPath, $updatedContent); diff --git a/src/Traits/WithTcTable.php b/src/Traits/WithTcTable.php index 7546ce4..80e4f8b 100644 --- a/src/Traits/WithTcTable.php +++ b/src/Traits/WithTcTable.php @@ -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; diff --git a/src/View/Components/Table/Index.php b/src/View/Components/Table/Index.php index 92e9e36..e4acc40 100644 --- a/src/View/Components/Table/Index.php +++ b/src/View/Components/Table/Index.php @@ -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; } }