1 | <?php |
||
2 | |||
3 | namespace Mostafaznv\Larupload\Concerns\Standalone; |
||
4 | |||
5 | use Mostafaznv\Larupload\Enums\LaruploadMode; |
||
6 | use Mostafaznv\Larupload\Larupload; |
||
7 | |||
8 | trait BootStandaloneLarupload |
||
9 | { |
||
10 | protected static string $laruploadNull; |
||
11 | |||
12 | protected bool $internalFunctionIsCallable = false; |
||
13 | |||
14 | |||
15 | public function __construct(string $name, LaruploadMode $mode) |
||
0 ignored issues
–
show
|
|||
16 | { |
||
17 | static::$laruploadNull = crc32(time()); |
||
18 | |||
19 | if (!defined('LARUPLOAD_NULL')) { |
||
20 | // @codeCoverageIgnoreStart |
||
21 | define('LARUPLOAD_NULL', static::$laruploadNull); |
||
22 | // @codeCoverageIgnoreEnd |
||
23 | } |
||
24 | |||
25 | parent::__construct($name, LaruploadMode::STANDALONE); |
||
26 | } |
||
27 | |||
28 | |||
29 | public static function init(string $name): Larupload |
||
30 | { |
||
31 | $instance = new self($name, LaruploadMode::STANDALONE); |
||
32 | $instance->id = time(); |
||
0 ignored issues
–
show
|
|||
33 | |||
34 | return $instance; |
||
0 ignored issues
–
show
|
|||
35 | } |
||
36 | } |
||
37 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.