@@ -27,7 +27,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
2727 */
2828 private $ translator ;
2929
30- private $ messages = array () ;
30+ private $ messages = [] ;
3131
3232 /**
3333 * @param TranslatorInterface $translator The translator must implement TranslatorBagInterface
@@ -44,7 +44,7 @@ public function __construct(TranslatorInterface $translator)
4444 /**
4545 * {@inheritdoc}
4646 */
47- public function trans ($ id , array $ parameters = array () , $ domain = null , $ locale = null )
47+ public function trans ($ id , array $ parameters = [] , $ domain = null , $ locale = null )
4848 {
4949 $ trans = $ this ->translator ->trans ($ id , $ parameters , $ domain , $ locale );
5050 $ this ->collectMessage ($ locale , $ domain , $ id , $ trans , $ parameters );
@@ -55,7 +55,7 @@ public function trans($id, array $parameters = array(), $domain = null, $locale
5555 /**
5656 * {@inheritdoc}
5757 */
58- public function transChoice ($ id , $ number , array $ parameters = array () , $ domain = null , $ locale = null )
58+ public function transChoice ($ id , $ number , array $ parameters = [] , $ domain = null , $ locale = null )
5959 {
6060 $ trans = $ this ->translator ->transChoice ($ id , $ number , $ parameters , $ domain , $ locale );
6161 $ this ->collectMessage ($ locale , $ domain , $ id , $ trans , $ parameters , $ number );
@@ -98,15 +98,15 @@ public function getFallbackLocales()
9898 return $ this ->translator ->getFallbackLocales ();
9999 }
100100
101- return array () ;
101+ return [] ;
102102 }
103103
104104 /**
105105 * Passes through all unknown calls onto the translator object.
106106 */
107107 public function __call ($ method , $ args )
108108 {
109- return \call_user_func_array (array ( $ this ->translator , $ method) , $ args );
109+ return \call_user_func_array ([ $ this ->translator , $ method] , $ args );
110110 }
111111
112112 /**
@@ -125,7 +125,7 @@ public function getCollectedMessages()
125125 * @param array|null $parameters
126126 * @param int|null $number
127127 */
128- private function collectMessage ($ locale , $ domain , $ id , $ translation , $ parameters = array () , $ number = null )
128+ private function collectMessage ($ locale , $ domain , $ id , $ translation , $ parameters = [] , $ number = null )
129129 {
130130 if (null === $ domain ) {
131131 $ domain = 'messages ' ;
@@ -152,14 +152,14 @@ private function collectMessage($locale, $domain, $id, $translation, $parameters
152152 $ state = self ::MESSAGE_MISSING ;
153153 }
154154
155- $ this ->messages [] = array (
155+ $ this ->messages [] = [
156156 'locale ' => $ locale ,
157157 'domain ' => $ domain ,
158158 'id ' => $ id ,
159159 'translation ' => $ translation ,
160160 'parameters ' => $ parameters ,
161161 'transChoiceNumber ' => $ number ,
162162 'state ' => $ state ,
163- ) ;
163+ ] ;
164164 }
165165}
0 commit comments