@@ -17,30 +17,31 @@ class MassAction implements MassActionInterface
1717 protected $ title ;
1818 protected $ callback ;
1919 protected $ confirm ;
20- protected $ parameters = array ();
20+ protected $ confirmMessage ;
21+ protected $ parameters = [];
2122 protected $ role ;
2223
2324 /**
24- * Default MassAction constructor
25+ * Default MassAction constructor.
2526 *
26- * @param string $title Title of the mass action
27- * @param string $callback Callback of the mass action
28- * @param boolean $confirm Show confirm message if true
29- * @param array $parameters Additional parameters
30- * @param string $role Security role
27+ * @param string $title Title of the mass action
28+ * @param string $callback Callback of the mass action
29+ * @param bool $confirm Show confirm message if true
30+ * @param array $parameters Additional parameters
31+ * @param string $role Security role
3132 */
32- public function __construct ($ title , $ callback = null , $ confirm = false , $ parameters = array () , $ role = null )
33+ public function __construct ($ title , $ callback = null , $ confirm = false , $ parameters = [] , $ role = null )
3334 {
3435 $ this ->title = $ title ;
3536 $ this ->callback = $ callback ;
3637 $ this ->confirm = $ confirm ;
37- $ this ->confirmMessage = 'Do you want to ' . strtolower ($ title ). ' the selected rows? ' ;
38+ $ this ->confirmMessage = 'Do you want to ' . strtolower ($ title ) . ' the selected rows? ' ;
3839 $ this ->parameters = $ parameters ;
3940 $ this ->role = $ role ;
4041 }
4142
4243 /**
43- * Set action title
44+ * Set action title.
4445 *
4546 * @param $title
4647 *
@@ -54,7 +55,7 @@ public function setTitle($title)
5455 }
5556
5657 /**
57- * get action title
58+ * get action title.
5859 *
5960 * @return string
6061 */
@@ -64,7 +65,7 @@ public function getTitle()
6465 }
6566
6667 /**
67- * Set action callback
68+ * Set action callback.
6869 *
6970 * @param $callback
7071 *
@@ -78,7 +79,7 @@ public function setCallback($callback)
7879 }
7980
8081 /**
81- * get action callback
82+ * get action callback.
8283 *
8384 * @return string
8485 */
@@ -88,7 +89,7 @@ public function getCallback()
8889 }
8990
9091 /**
91- * Set action confirm
92+ * Set action confirm.
9293 *
9394 * @param $confirm
9495 *
@@ -102,17 +103,17 @@ public function setConfirm($confirm)
102103 }
103104
104105 /**
105- * Get action confirm
106+ * Get action confirm.
106107 *
107- * @return boolean
108+ * @return bool
108109 */
109110 public function getConfirm ()
110111 {
111112 return $ this ->confirm ;
112113 }
113114
114115 /**
115- * Set action confirmMessage
116+ * Set action confirmMessage.
116117 *
117118 * @param string $confirmMessage
118119 *
@@ -126,7 +127,7 @@ public function setConfirmMessage($confirmMessage)
126127 }
127128
128129 /**
129- * get action confirmMessage
130+ * get action confirmMessage.
130131 *
131132 * @return string
132133 */
@@ -136,9 +137,10 @@ public function getConfirmMessage()
136137 }
137138
138139 /**
139- * Set action/controller parameters
140+ * Set action/controller parameters.
140141 *
141142 * @param array $parameters
143+ *
142144 * @return $this
143145 */
144146 public function setParameters (array $ parameters )
@@ -149,7 +151,7 @@ public function setParameters(array $parameters)
149151 }
150152
151153 /**
152- * Get action/controller parameters
154+ * Get action/controller parameters.
153155 *
154156 * @return array
155157 */
@@ -159,7 +161,7 @@ public function getParameters()
159161 }
160162
161163 /**
162- * set role
164+ * set role.
163165 *
164166 * @param mixed $role
165167 *
@@ -173,7 +175,7 @@ public function setRole($role)
173175 }
174176
175177 /**
176- * Get role
178+ * Get role.
177179 *
178180 * @return mixed
179181 */
0 commit comments