@@ -30,8 +30,8 @@ class LaravelServiceProvider extends ServiceProvider {
3030 */
3131 public function boot () {
3232 $ this ->publishes ([
33- __DIR__ . '/../config/imap.php ' => config_path ('imap.php ' ),
34- ]);
33+ __DIR__ . '/../config/imap.php ' => config_path ('imap.php ' ),
34+ ]);
3535 }
3636
3737 /**
@@ -58,10 +58,10 @@ public function register() {
5858 * If however the default account is missing a parameter the package default account parameter will be used.
5959 * This can be disabled by setting imap.default in your config file to 'false'
6060 */
61- private function setVendorConfig (){
61+ private function setVendorConfig () {
6262
6363 $ config_key = 'imap ' ;
64- $ path = __DIR__ . '/../config/ ' . $ config_key. '.php ' ;
64+ $ path = __DIR__ . '/../config/ ' . $ config_key . '.php ' ;
6565
6666 $ vendor_config = require $ path ;
6767 $ config = $ this ->app ['config ' ]->get ($ config_key , []);
@@ -70,17 +70,17 @@ private function setVendorConfig(){
7070
7171 $ config = $ this ->app ['config ' ]->get ($ config_key );
7272
73- if (is_array ($ config )){
74- if (isset ($ config ['default ' ])){
75- if (isset ($ config ['accounts ' ]) && $ config ['default ' ] != false ){
73+ if (is_array ($ config )) {
74+ if (isset ($ config ['default ' ])) {
75+ if (isset ($ config ['accounts ' ]) && $ config ['default ' ] != false ) {
7676
7777 $ default_config = $ vendor_config ['accounts ' ]['default ' ];
78- if (isset ($ config ['accounts ' ][$ config ['default ' ]])){
78+ if (isset ($ config ['accounts ' ][$ config ['default ' ]])) {
7979 $ default_config = array_merge ($ default_config , $ config ['accounts ' ][$ config ['default ' ]]);
8080 }
8181
82- if (is_array ($ config ['accounts ' ])){
83- foreach ($ config ['accounts ' ] as $ account_key => $ account ){
82+ if (is_array ($ config ['accounts ' ])) {
83+ foreach ($ config ['accounts ' ] as $ account_key => $ account ) {
8484 $ config ['accounts ' ][$ account_key ] = array_merge ($ default_config , $ account );
8585 }
8686 }
@@ -101,8 +101,8 @@ private function setVendorConfig(){
101101 * Numeric entries are appended, not replaced, but only if they are
102102 * unique
103103 *
104- * @param array $array1 Initial array to merge.
105- * @param array ... Variable list of arrays to recursively merge.
104+ * @param array $array1 Initial array to merge.
105+ * @param array ... Variable list of arrays to recursively merge.
106106 *
107107 * @return array|mixed
108108 *
@@ -114,23 +114,23 @@ private function array_merge_recursive_distinct() {
114114 $ arrays = func_get_args ();
115115 $ base = array_shift ($ arrays );
116116
117- if (!is_array ($ base )) $ base = empty ($ base ) ? array () : array ($ base );
117+ if (!is_array ($ base )) $ base = empty ($ base ) ? array () : array ($ base );
118118
119- foreach ($ arrays as $ append ) {
119+ foreach ($ arrays as $ append ) {
120120
121- if (!is_array ($ append )) $ append = array ($ append );
121+ if (!is_array ($ append )) $ append = array ($ append );
122122
123- foreach ($ append as $ key => $ value ) {
123+ foreach ($ append as $ key => $ value ) {
124124
125- if (!array_key_exists ($ key , $ base ) and !is_numeric ($ key )) {
125+ if (!array_key_exists ($ key , $ base ) and !is_numeric ($ key )) {
126126 $ base [$ key ] = $ append [$ key ];
127127 continue ;
128128 }
129129
130- if (is_array ($ value ) or is_array ($ base [$ key ])) {
130+ if (is_array ($ value ) or is_array ($ base [$ key ])) {
131131 $ base [$ key ] = $ this ->array_merge_recursive_distinct ($ base [$ key ], $ append [$ key ]);
132- } else if (is_numeric ($ key )) {
133- if (!in_array ($ value , $ base )) $ base [] = $ value ;
132+ } else if (is_numeric ($ key )) {
133+ if (!in_array ($ value , $ base )) $ base [] = $ value ;
134134 } else {
135135 $ base [$ key ] = $ value ;
136136 }
@@ -141,5 +141,5 @@ private function array_merge_recursive_distinct() {
141141
142142 return $ base ;
143143 }
144-
144+
145145}
0 commit comments