@@ -11,6 +11,6 @@ |
||
| 11 | 11 | |
| 12 | 12 | use nzedb\libraries\Forking; |
| 13 | 13 | |
| 14 | -declare(ticks = 1) |
|
| 14 | +declare(ticks=1) |
|
| 15 | 15 | |
| 16 | 16 | (new Forking())->processWorkType('safe_' . $argv[1]); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(ticks = 1); |
|
| 2 | +declare(ticks=1); |
|
| 3 | 3 | |
| 4 | 4 | require('.do_not_run/require.php'); |
| 5 | 5 | |
@@ -4,6 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use nzedb\libraries\Forking; |
| 6 | 6 | |
| 7 | -declare(ticks = 1); |
|
| 7 | +declare(ticks=1); |
|
| 8 | 8 | |
| 9 | 9 | (new Forking())->processWorkType('request_id'); |
@@ -7,6 +7,6 @@ |
||
| 7 | 7 | |
| 8 | 8 | use nzedb\libraries\Forking; |
| 9 | 9 | |
| 10 | -declare(ticks = 1); |
|
| 10 | +declare(ticks=1); |
|
| 11 | 11 | |
| 12 | 12 | (new Forking())->processWorkType('binaries', [0 => $argv[1]]); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(ticks = 1) |
|
| 2 | +declare(ticks=1) |
|
| 3 | 3 | |
| 4 | 4 | require('.do_not_run/require.php'); |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(ticks = 1); |
|
| 2 | +declare(ticks=1); |
|
| 3 | 3 | |
| 4 | 4 | require('.do_not_run/require.php'); |
| 5 | 5 | |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | $groupName = -1; |
| 129 | 129 | if (isset($this->getRequest['group'])) { |
| 130 | 130 | $group = Groups::isValidName($this->getRequest['group']); |
| 131 | - if ($group !== false){ |
|
| 131 | + if ($group !== false) { |
|
| 132 | 132 | $groupName = $group; |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -30,7 +30,8 @@ discard block |
||
| 30 | 30 | * |
| 31 | 31 | * @package nzedb |
| 32 | 32 | */ |
| 33 | -class API extends Capabilities { |
|
| 33 | +class API extends Capabilities |
|
| 34 | +{ |
|
| 34 | 35 | |
| 35 | 36 | /** Settings class |
| 36 | 37 | * @var \nzedb\db\Settings |
@@ -128,7 +129,7 @@ discard block |
||
| 128 | 129 | $groupName = -1; |
| 129 | 130 | if (isset($this->getRequest['group'])) { |
| 130 | 131 | $group = Groups::isValidName($this->getRequest['group']); |
| 131 | - if ($group !== false){ |
|
| 132 | + if ($group !== false) { |
|
| 132 | 133 | $groupName = $group; |
| 133 | 134 | } |
| 134 | 135 | } |
@@ -116,8 +116,7 @@ |
||
| 116 | 116 | $this->pdo = ($options['Settings'] instanceof DB ? $options['Settings'] : new DB()); |
| 117 | 117 | $this->category = ($options['Categorize'] instanceof Categorize ? |
| 118 | 118 | $options['Categorize'] : new Categorize(['Settings' => $this->pdo])); |
| 119 | - $this->groups = ($options['Groups'] instanceof \nzedb\Groups ? $options['Groups'] : |
|
| 120 | - new \nzedb\Groups(['Settings' => $this->pdo])); |
|
| 119 | + $this->groups = ($options['Groups'] instanceof \nzedb\Groups ? $options['Groups'] : new \nzedb\Groups(['Settings' => $this->pdo])); |
|
| 121 | 120 | $this->consoleTools = ($options['ConsoleTools'] instanceof ConsoleTools ? |
| 122 | 121 | $options['ConsoleTools'] : new ConsoleTools(['ColorCLI' => $this->pdo->log])); |
| 123 | 122 | $this->sphinx = ($options['SphinxSearch'] instanceof SphinxSearch ? |
@@ -390,7 +390,7 @@ |
||
| 390 | 390 | $group->save(); |
| 391 | 391 | |
| 392 | 392 | $text = $status == 0 ? 'deactivated' : 'activated'; |
| 393 | - return "Group $id: $column has been $text"; |
|
| 393 | + return "group $id: $column has been $text"; |
|
| 394 | 394 | } |
| 395 | 395 | } |
| 396 | 396 | |
@@ -32,20 +32,20 @@ discard block |
||
| 32 | 32 | 'bool' => ['boolean'] |
| 33 | 33 | ], |
| 34 | 34 | 'backfill_target' => [ |
| 35 | - 'number' => [ 'numeric' ], |
|
| 35 | + 'number' => ['numeric'], |
|
| 36 | 36 | ], |
| 37 | 37 | 'description' => [ |
| 38 | 38 | 'require' => |
| 39 | 39 | ['required' => true], |
| 40 | 40 | ], |
| 41 | 41 | 'first_record' => [ |
| 42 | - 'number' => [ 'numeric' ], |
|
| 42 | + 'number' => ['numeric'], |
|
| 43 | 43 | ], |
| 44 | 44 | //'id' => [ |
| 45 | 45 | // 'index' => ['numeric'] |
| 46 | 46 | //] |
| 47 | 47 | 'last_record' => [ |
| 48 | - 'number' => [ 'numeric' ], |
|
| 48 | + 'number' => ['numeric'], |
|
| 49 | 49 | ], |
| 50 | 50 | //'minfilestoformrelease' => [ |
| 51 | 51 | // 'number' => [ 'numeric' ], |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | */ |
| 382 | 382 | public static function updateStatus($id, string $column, int $status = 0) : string |
| 383 | 383 | { |
| 384 | - if (! \in_array($column, ['active', 'backfill'])) { |
|
| 384 | + if (!\in_array($column, ['active', 'backfill'])) { |
|
| 385 | 385 | throw new \InvalidArgumentException("Only 'active' and 'backfill' status can be updated."); |
| 386 | 386 | } |
| 387 | 387 | |