Skip to content

Commit 341d303

Browse files
chore(test): improve arch standard
chore(test): improve arch standard
2 parents eb9cdaf + d56ebd6 commit 341d303

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2277
-2644
lines changed

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default { extends: ["@commitlint/config-conventional"] };

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
},
1616
"require-dev": {
1717
"laravel/pint": "^1.13",
18-
"orchestra/testbench": "^8.11",
19-
"pestphp/pest": "^2.19",
20-
"pestphp/pest-plugin-laravel": "^2.2"
18+
"orchestra/testbench": "^9.0",
19+
"pestphp/pest": "^3.0",
20+
"pestphp/pest-plugin-laravel": "^3.0"
2121
},
2222
"autoload": {
2323
"psr-4": {

composer.lock

Lines changed: 1477 additions & 1824 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "statamic-backup",
33
"version": "1.0.0",
4+
"type": "module",
45
"description": "Backup is an extensible and powerful backup tool for statamic sites, it enables you to create, manage and schedule backups of your site with ease in the control panel.",
56
"workspaces": [
67
"client",

src/Backuper.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Itiden\Backup\DataTransferObjects\BackupDto;
1212
use Itiden\Backup\Events\BackupCreated;
1313
use Itiden\Backup\Events\BackupFailed;
14-
use Itiden\Backup\Exceptions\BackupFailedException;
1514

1615
final class Backuper
1716
{
@@ -23,7 +22,7 @@ public function __construct(
2322
/**
2423
* Create a new backup.
2524
*
26-
* @throws BackupFailedException
25+
* @throws Exceptions\BackupFailed
2726
*/
2827
public function backup(): BackupDto
2928
{
@@ -61,15 +60,15 @@ public function backup(): BackupDto
6160

6261
event(new BackupCreated($backup));
6362

64-
unlink($temp_zip_path);
63+
@unlink($temp_zip_path);
6564

6665
$this->enforceMaxBackups();
6766

6867
return $backup;
6968
} catch (Exception $e) {
7069
report($e);
7170

72-
$exception = new BackupFailedException();
71+
$exception = new Exceptions\BackupFailed();
7372

7473
event(new BackupFailed($exception));
7574

src/Console/Commands/BackupCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* Backup site
1414
*/
15-
class BackupCommand extends Command
15+
final class BackupCommand extends Command
1616
{
1717
protected $signature = 'statamic:backup';
1818

src/Console/Commands/ClearFilesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* Clear the backup temp directory
1414
*/
15-
class ClearFilesCommand extends Command
15+
final class ClearFilesCommand extends Command
1616
{
1717
protected $signature = 'statamic:backup:temp-clear';
1818

src/DataTransferObjects/ChunkyTestDto.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Illuminate\Http\Request;
88

9-
readonly class ChunkyTestDto
9+
final readonly class ChunkyTestDto
1010
{
1111
public function __construct(
1212
public string $path,

src/DataTransferObjects/ChunkyUploadDto.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Illuminate\Http\Request;
88
use Illuminate\Http\UploadedFile;
99

10-
readonly class ChunkyUploadDto
10+
final readonly class ChunkyUploadDto
1111
{
1212
public function __construct(
1313
public string $path,

src/Events/BackupCreated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Itiden\Backup\DataTransferObjects\BackupDto;
88

9-
class BackupCreated
9+
final readonly class BackupCreated
1010
{
1111
public function __construct(public BackupDto $backup)
1212
{

0 commit comments

Comments
 (0)