Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jan 9, 2025
1 parent fdec167 commit caa89ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Hans\Valravn\Exceptions\Package;

use Hans\Valravn\Exceptions\VException;
use Illuminate\Database\Eloquent\Model;

class PublishedVersionOutDatedException extends VException
{
Expand Down
5 changes: 3 additions & 2 deletions src/ValravnServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ public function register()
/**
* Bootstrap any application services.
*
* @return void
* @throws Throwable
*
* @return void
*/
public function boot()
{
Expand All @@ -54,7 +55,7 @@ public function boot()
if ($publishedConfigVersion = config('valravn.config_version', false)) {
throw_if(
version_compare($config['config_version'], $publishedConfigVersion, '>'),
new PublishedVersionOutDatedException
new PublishedVersionOutDatedException()
);
}

Expand Down
5 changes: 2 additions & 3 deletions tests/Feature/ValravnServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected function tearDown(): void
{
$configFile = __DIR__.'/../../config/config.php';
$publishedVersion = config('valravn.config_version');
$newVersion = str_split($publishedVersion,strrpos($publishedVersion,'.'))[0].".999";
$newVersion = str_split($publishedVersion, strrpos($publishedVersion, '.'))[0].'.999';

// revert 'config_version' key
$configContent = file_get_contents($configFile);
Expand Down Expand Up @@ -46,7 +46,7 @@ public function publishedConfigFileVersionIsOutdated()
$configFile = __DIR__.'/../../config/config.php';
$publishedVersion = config('valravn.config_version');

$newVersion = str_split($publishedVersion,strrpos($publishedVersion,'.'))[0].".999";
$newVersion = str_split($publishedVersion, strrpos($publishedVersion, '.'))[0].'.999';
// change 'config_version' key
$newConfigContent = file_get_contents($configFile);
$newConfigContent = str_replace($publishedVersion, $newVersion, $newConfigContent);
Expand All @@ -57,5 +57,4 @@ public function publishedConfigFileVersionIsOutdated()
$provider = new ValravnServiceProvider($this->app);
$provider->boot();
}

}

0 comments on commit caa89ea

Please sign in to comment.