@@ -30,6 +30,6 @@ |
||
30 | 30 | */ |
31 | 31 | public function components() |
32 | 32 | { |
33 | - return []; |
|
33 | + return [ ]; |
|
34 | 34 | } |
35 | 35 | } |
@@ -30,6 +30,6 @@ |
||
30 | 30 | */ |
31 | 31 | public function components() |
32 | 32 | { |
33 | - return []; |
|
33 | + return [ ]; |
|
34 | 34 | } |
35 | 35 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function components() |
27 | 27 | { |
28 | - return []; |
|
28 | + return [ ]; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | if (method_exists(static::class, 'definition')) { |
30 | 30 | $definition = static::definition($aName); |
31 | - $definition['location'] = $aConnector; |
|
31 | + $definition[ 'location' ] = $aConnector; |
|
32 | 32 | acf_add_local_field_group($definition); |
33 | 33 | } else { |
34 | 34 | //@deprecated Will be removed in 2.0, and this class will implement FieldComponentInterface |
@@ -42,13 +42,13 @@ |
||
42 | 42 | |
43 | 43 | function it_should_return_templates() |
44 | 44 | { |
45 | - $this->templates(['my-template' => 'MyTemplate'])->shouldReturn([ |
|
45 | + $this->templates([ 'my-template' => 'MyTemplate' ])->shouldReturn([ |
|
46 | 46 | 'my-template' => 'MyTemplate', 'dummy-template' => 'DummyTemplate', |
47 | 47 | ]); |
48 | 48 | } |
49 | 49 | |
50 | 50 | function it_should_return_context() |
51 | 51 | { |
52 | - $this->context(['heder-menu' => 'Header Menu'])->shouldReturn(['heder-menu' => 'Header Menu']); |
|
52 | + $this->context([ 'heder-menu' => 'Header Menu' ])->shouldReturn([ 'heder-menu' => 'Header Menu' ]); |
|
53 | 53 | } |
54 | 54 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | public function components() : array |
47 | 47 | { |
48 | - return []; |
|
48 | + return [ ]; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function addScreenAttributes() : void |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace LIN3S\WPFoundation; |
15 | 15 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace LIN3S\WPFoundation; |
15 | 15 | |
@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | public function __construct() |
29 | 29 | { |
30 | 30 | defined('WP_DEBUG') && true === WP_DEBUG |
31 | - ? add_action('wp_enqueue_scripts', [$this, 'developmentAssets']) |
|
32 | - : add_action('wp_enqueue_scripts', [$this, 'productionAssets']); |
|
31 | + ? add_action('wp_enqueue_scripts', [ $this, 'developmentAssets' ]) |
|
32 | + : add_action('wp_enqueue_scripts', [ $this, 'productionAssets' ]); |
|
33 | 33 | |
34 | - add_action('admin_enqueue_scripts', [$this, 'adminAssets']); |
|
34 | + add_action('admin_enqueue_scripts', [ $this, 'adminAssets' ]); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | protected function addScript( |
38 | 38 | string $name, |
39 | 39 | string $from, |
40 | - array $dependencies = ['jquery'], |
|
40 | + array $dependencies = [ 'jquery' ], |
|
41 | 41 | string $version = '1.0.0', |
42 | 42 | bool $inFooter = true, |
43 | 43 | ?string $ajaxUrl = null |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | protected function addStylesheet( |
55 | 55 | string $name, |
56 | 56 | string $from, |
57 | - array $dependencies = [], |
|
57 | + array $dependencies = [ ], |
|
58 | 58 | string $version = '1.0.0', |
59 | 59 | string $media = 'all' |
60 | 60 | ) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | protected function registerAjaxUrls(string $name, string $ajaxUrl) : void |
82 | 82 | { |
83 | 83 | if (false === is_array($ajaxUrl)) { |
84 | - $ajaxUrl = [$ajaxUrl]; |
|
84 | + $ajaxUrl = [ $ajaxUrl ]; |
|
85 | 85 | } |
86 | 86 | foreach ($ajaxUrl as $url) { |
87 | 87 | wp_localize_script($name, $url, [ |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace LIN3S\WPFoundation; |
15 | 15 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | public function __construct() |
26 | 26 | { |
27 | - add_action('wp_ajax_nopriv_' . $this->action(), [$this, 'ajax']); |
|
28 | - add_action('wp_ajax_' . $this->action(), [$this, 'ajax']); |
|
27 | + add_action('wp_ajax_nopriv_' . $this->action(), [ $this, 'ajax' ]); |
|
28 | + add_action('wp_ajax_' . $this->action(), [ $this, 'ajax' ]); |
|
29 | 29 | } |
30 | 30 | } |