@@ -33,19 +33,19 @@ discard block |
||
33 | 33 | * {@inheritDoc} |
34 | 34 | */ |
35 | 35 | public function run() { |
36 | - foreach ( $this->actions as $action ) { |
|
36 | + foreach ($this->actions as $action) { |
|
37 | 37 | add_action( |
38 | 38 | $action['hook'], |
39 | - array( $action['service'], $action['method'] ), |
|
39 | + array($action['service'], $action['method']), |
|
40 | 40 | $action['priority'], |
41 | 41 | $action['args'] |
42 | 42 | ); |
43 | 43 | } |
44 | 44 | |
45 | - foreach ( $this->filters as $filter ) { |
|
45 | + foreach ($this->filters as $filter) { |
|
46 | 46 | add_filter( |
47 | 47 | $filter['hook'], |
48 | - array( $filter['service'], $filter['method'] ), |
|
48 | + array($filter['service'], $filter['method']), |
|
49 | 49 | $filter['priority'], |
50 | 50 | $filter['args'] |
51 | 51 | ); |
@@ -57,17 +57,17 @@ discard block |
||
57 | 57 | * |
58 | 58 | * @param mixed $service |
59 | 59 | */ |
60 | - public function register( $service ) { |
|
61 | - if ( $service instanceof HasActions ) { |
|
62 | - $this->register_actions( $service ); |
|
60 | + public function register($service) { |
|
61 | + if ($service instanceof HasActions) { |
|
62 | + $this->register_actions($service); |
|
63 | 63 | } |
64 | 64 | |
65 | - if ( $service instanceof HasFilters ) { |
|
66 | - $this->register_filters( $service ); |
|
65 | + if ($service instanceof HasFilters) { |
|
66 | + $this->register_filters($service); |
|
67 | 67 | } |
68 | 68 | |
69 | - if ( $service instanceof HasShortcode ) { |
|
70 | - $this->register_shortcode( $service ); |
|
69 | + if ($service instanceof HasShortcode) { |
|
70 | + $this->register_shortcode($service); |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
@@ -76,15 +76,15 @@ discard block |
||
76 | 76 | * |
77 | 77 | * @param HasActions $service |
78 | 78 | */ |
79 | - public function register_actions( HasActions $service ) { |
|
80 | - foreach ( $service->action_hooks() as $action ) { |
|
79 | + public function register_actions(HasActions $service) { |
|
80 | + foreach ($service->action_hooks() as $action) { |
|
81 | 81 | $this->actions = $this->add( |
82 | 82 | $this->actions, |
83 | 83 | $action['hook'], |
84 | 84 | $service, |
85 | 85 | $action['method'], |
86 | - isset( $action['priority'] ) ? $action['priority'] : 10, |
|
87 | - isset( $action['args'] ) ? $action['args'] : 1 |
|
86 | + isset($action['priority']) ? $action['priority'] : 10, |
|
87 | + isset($action['args']) ? $action['args'] : 1 |
|
88 | 88 | ); |
89 | 89 | } |
90 | 90 | } |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | * |
95 | 95 | * @param HasFilters $service |
96 | 96 | */ |
97 | - public function register_filters( HasFilters $service ) { |
|
98 | - foreach ( $service->filter_hooks() as $filter ) { |
|
97 | + public function register_filters(HasFilters $service) { |
|
98 | + foreach ($service->filter_hooks() as $filter) { |
|
99 | 99 | $this->filters = $this->add( |
100 | 100 | $this->filters, |
101 | 101 | $filter['hook'], |
102 | 102 | $service, |
103 | 103 | $filter['method'], |
104 | - isset( $filter['priority'] ) ? $filter['priority'] : 10, |
|
105 | - isset( $filter['args'] ) ? $filter['args'] : 1 |
|
104 | + isset($filter['priority']) ? $filter['priority'] : 10, |
|
105 | + isset($filter['args']) ? $filter['args'] : 1 |
|
106 | 106 | ); |
107 | 107 | } |
108 | 108 | } |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | * |
113 | 113 | * @param HasShortcode $service |
114 | 114 | */ |
115 | - public function register_shortcode( HasShortcode $service ) { |
|
116 | - add_shortcode( $service->shortcode_name(), array( $service, 'do_shortcode' ) ); |
|
115 | + public function register_shortcode(HasShortcode $service) { |
|
116 | + add_shortcode($service->shortcode_name(), array($service, 'do_shortcode')); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * |
129 | 129 | * @return array |
130 | 130 | */ |
131 | - protected function add( $hooks, $hook, $service, $method, $priority, $accepted_args ) { |
|
131 | + protected function add($hooks, $hook, $service, $method, $priority, $accepted_args) { |
|
132 | 132 | $hooks[] = array( |
133 | 133 | 'hook' => $hook, |
134 | 134 | 'service' => $service, |