Completed
Push — master ( a52438...bf8826 )
by Henry
06:30
created

modules/TextareaResizer/TextareaResizer.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
namespace Redaxscript\Modules\TextareaResizer;
3
4
use Redaxscript\Head;
5
use Redaxscript\Module;
6
7
/**
8
 * resize textarea height to content
9
 *
10
 * @since 4.0.0
11
 *
12
 * @package Redaxscript
13
 * @category Modules
14
 * @author Henry Ruhs
15
 */
16
17
class TextareaResizer extends Module\Module
18
{
19
	/**
20
	 * array of the module
21
	 *
22
	 * @var array
23
	 */
24
25
	protected static array $_moduleArray =
0 ignored issues
show
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_ARRAY, expecting T_FUNCTION or T_CONST
Loading history...
26
	[
27
		'name' => 'Textarea Resizer',
28
		'alias' => 'TextareaResizer',
29
		'author' => 'Redaxmedia',
30
		'description' => 'Resize textarea height to content',
31
		'version' => '5.0.0',
32
		'license' => 'MIT'
33
	];
34
35
	/**
36
	 * renderStart
37
	 *
38
	 * @since 4.0.0
39
	 */
40
41
	public function renderStart() : void
42
	{
43
		$script = Head\Script::getInstance();
44
		$script
45
			->init('foot')
46
			->appendFile(
47
			[
48
				'https://cdnjs.cloudflare.com/ajax/libs/autosize.js/4.0.2/autosize.min.js',
49
				'modules/TextareaResizer/assets/scripts/init.js',
50
				'modules/TextareaResizer/dist/scripts/textarea-resizer.min.js'
51
			]);
52
	}
53
}
54