Skip to content

Commit 627ceba

Browse files
committed
🐛 non-composer install find class in commands
Signed-off-by: bnomei <[email protected]>
1 parent d3ad885 commit 627ceba

File tree

15 files changed

+79
-5
lines changed

15 files changed

+79
-5
lines changed

commands/backupzip.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
declare(strict_types=1);
44

5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
59
use Bnomei\Janitor;
610
use Kirby\CLI\CLI;
711
use Kirby\Filesystem\Dir;

commands/cleancontent.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
39
use Bnomei\Janitor;
410
use Kirby\CLI\CLI;
511

commands/clipboard.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
39
use Bnomei\Janitor;
410
use Kirby\CLI\CLI;
511

commands/download.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
39
use Bnomei\Janitor;
410
use Kirby\CLI\CLI;
511

commands/flush.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
39
use Kirby\CLI\CLI;
410

511
return [

commands/job.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
39
use Bnomei\Janitor;
410
use Kirby\CLI\CLI;
511

commands/maintenance.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
39
use Bnomei\Janitor;
410
use Kirby\CLI\CLI;
511

commands/open.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
39
use Bnomei\Janitor;
410
use Kirby\CLI\CLI;
511

commands/pipe.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
39
use Bnomei\Janitor;
410
use Kirby\CLI\CLI;
511

commands/render.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
if (!class_exists('Bnomei\Janitor')) {
6+
require_once __DIR__ . '/../classes/Janitor.php';
7+
}
8+
39
use Bnomei\Janitor;
410
use Kirby\CLI\CLI;
511
use Kirby\Cms\Page;

0 commit comments

Comments
 (0)