@@ -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 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function templates($templates) |
34 | 34 | { |
35 | - return array_merge($templates, ['dummy-template' => 'DummyTemplate']); |
|
35 | + return array_merge($templates, [ 'dummy-template' => 'DummyTemplate' ]); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function __construct() |
33 | 33 | { |
34 | - add_action('wp_ajax_nopriv_' . $this->action, [$this, 'ajax']); |
|
35 | - add_action('wp_ajax_' . $this->action, [$this, 'ajax']); |
|
34 | + add_action('wp_ajax_nopriv_' . $this->action, [ $this, 'ajax' ]); |
|
35 | + add_action('wp_ajax_' . $this->action, [ $this, 'ajax' ]); |
|
36 | 36 | } |
37 | 37 | } |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function __construct() |
27 | 27 | { |
28 | - add_action('wp_enqueue_scripts', [$this, 'assets']); |
|
29 | - add_action('admin_enqueue_scripts', [$this, 'adminAssets']); |
|
28 | + add_action('wp_enqueue_scripts', [ $this, 'assets' ]); |
|
29 | + add_action('admin_enqueue_scripts', [ $this, 'adminAssets' ]); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | protected function addScript( |
52 | 52 | $name, |
53 | 53 | $from = AssetsInterface::ASSETS_JS, |
54 | - array $dependencies = ['jquery'], |
|
54 | + array $dependencies = [ 'jquery' ], |
|
55 | 55 | $version = '1.0.0', |
56 | 56 | $inFooter = true |
57 | 57 | ) |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | protected function addStylesheet( |
77 | 77 | $name, |
78 | 78 | $from = AssetsInterface::CSS, |
79 | - array $dependencies = [], |
|
79 | + array $dependencies = [ ], |
|
80 | 80 | $version = '1.0.0', |
81 | 81 | $media = 'all' |
82 | 82 | ) |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public function __construct() |
36 | 36 | { |
37 | - add_action('phpmailer_init', [$this, 'mailer']); |
|
37 | + add_action('phpmailer_init', [ $this, 'mailer' ]); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -24,6 +24,6 @@ |
||
24 | 24 | */ |
25 | 25 | public function __construct() |
26 | 26 | { |
27 | - add_action('init', [$this, 'menus']); |
|
27 | + add_action('init', [ $this, 'menus' ]); |
|
28 | 28 | } |
29 | 29 | } |
@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function __construct() |
28 | 28 | { |
29 | - add_action('init', [$this, 'postType']); |
|
30 | - add_action('init', [$this, 'taxonomyType']); |
|
31 | - add_action('init', [$this, 'fields'], 20); |
|
29 | + add_action('init', [ $this, 'postType' ]); |
|
30 | + add_action('init', [ $this, 'taxonomyType' ]); |
|
31 | + add_action('init', [ $this, 'fields' ], 20); |
|
32 | 32 | |
33 | - add_filter('post_type_link', [$this, 'permalink'], 1, 2); |
|
34 | - add_filter('term_link', [$this, 'taxonomyPermalink'], 1, 2); |
|
33 | + add_filter('post_type_link', [ $this, 'permalink' ], 1, 2); |
|
34 | + add_filter('term_link', [ $this, 'taxonomyPermalink' ], 1, 2); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | if (is_array($postTypes)) { |
65 | 65 | foreach ($postTypes as $key => $postType) { |
66 | - $postTypes[$key] = static::singleSerialize($postType); |
|
66 | + $postTypes[ $key ] = static::singleSerialize($postType); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | return $postTypes; |
@@ -26,6 +26,6 @@ |
||
26 | 26 | { |
27 | 27 | $this->rewriteRules(); |
28 | 28 | $this->rewriteTags(); |
29 | - add_action('template_include', [$this, 'templateInclude']); |
|
29 | + add_action('template_include', [ $this, 'templateInclude' ]); |
|
30 | 30 | } |
31 | 31 | } |
@@ -28,8 +28,8 @@ |
||
28 | 28 | */ |
29 | 29 | public function __construct() |
30 | 30 | { |
31 | - add_action('twig_apply_filters', function ($twig) { |
|
32 | - $twig->addFunction(new \Twig_SimpleFunction('tagManager', [$this, 'tagManagerFunction'])); |
|
31 | + add_action('twig_apply_filters', function($twig) { |
|
32 | + $twig->addFunction(new \Twig_SimpleFunction('tagManager', [ $this, 'tagManagerFunction' ])); |
|
33 | 33 | |
34 | 34 | return $twig; |
35 | 35 | }); |