Completed
Push — master ( 884d53...078d33 )
by mehdi
02:37
created
src/CalendarSettings/Shamsi.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use Datium\Datium as Datium;
4 4
 
5
-return array (
5
+return array(
6 6
 
7 7
 /************************************************************
8 8
  *                        Convert to
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
  *
13 13
  *\_________________________________________________________/
14 14
  */
15
-  'convert_to' => function( $date_time ) {
15
+  'convert_to' => function($date_time) {
16 16
 
17
-    return Datium::create( $date_time )->sub( '226898 day' )->object();
17
+    return Datium::create($date_time)->sub('226898 day')->object();
18 18
 
19 19
   },
20 20
 
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
    *
27 27
    *\_________________________________________________________/
28 28
    */
29
-  'convert_from' => function( $date_time ) {
29
+  'convert_from' => function($date_time) {
30 30
 
31
-    return Datium::create( $date_time )->add( '226898 day' )->object();
31
+    return Datium::create($date_time)->add('226898 day')->object();
32 32
 
33 33
   },
34 34
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
    *
51 51
    *\_________________________________________________________/
52 52
    */
53
-  'month' => array (
53
+  'month' => array(
54 54
 
55 55
     'Farvardin',
56 56
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
    *
88 88
    *\_________________________________________________________/
89 89
    */
90
-  'days_of_week' => array (
90
+  'days_of_week' => array(
91 91
 
92 92
     'Shanbe',
93 93
 
@@ -123,6 +123,6 @@  discard block
 block discarded – undo
123 123
    *
124 124
    *\_________________________________________________________/
125 125
    */
126
-  'weekend' => array( 'friday' )
126
+  'weekend' => array('friday')
127 127
 
128 128
  );
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
        'Ordibehesht',
54 54
        'Khordad',
55 55
        'Tir',
56
-       'Mordad' ,
56
+       'Mordad',
57 57
        'Shahrivar',
58 58
        'Mehr',
59 59
        'Aban',
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      ),
79 79
 
80 80
   'islamic' =>
81
-    array(  1 => 'Muharram',
81
+    array(1 => 'Muharram',
82 82
             2 => 'Safar',
83 83
             3 => 'Rabi I',
84 84
             4 => 'Rabi II',
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             12 => 'Dhu al_Hijjah'
93 93
             ) ),
94 94
 
95
-  'week_days_name' => array( 'persian' => array(
95
+  'week_days_name' => array('persian' => array(
96 96
                                           'Yekshanbe',
97 97
                                           'Doshanbe',
98 98
                                           'Seshanbe',
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                                           )
124 124
 
125 125
                       ),
126
-  'shamsi_month_days' => array(      1 => 31,
126
+  'shamsi_month_days' => array(1 => 31,
127 127
                                      2 => 31,
128 128
                                      3 => 31,
129 129
                                      4 => 31,
@@ -134,10 +134,10 @@  discard block
 block discarded – undo
134 134
                                      9 => 30,
135 135
                                      10 => 30,
136 136
                                      11 => 30,
137
-                                     12 => 29 ),
137
+                                     12 => 29),
138 138
 
139 139
 
140
-  'gregorian_month_days' => array(   1 => 31,
140
+  'gregorian_month_days' => array(1 => 31,
141 141
                                      2 => 28,
142 142
                                      3 => 31,
143 143
                                      4 => 30,
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
                                      9 => 30,
149 149
                                      10 => 31,
150 150
                                      11 => 30,
151
-                                     12 => 30 ),
151
+                                     12 => 30),
152 152
 
153
-  'islamic_month_days' => array(     1 => 30,
153
+  'islamic_month_days' => array(1 => 30,
154 154
                                      2 => 29,
155 155
                                      3 => 30,
156 156
                                      4 => 30,
@@ -161,13 +161,13 @@  discard block
 block discarded – undo
161 161
                                      9 => 30,
162 162
                                      10 => 29,
163 163
                                      11 => 30,
164
-                                     12 => 30 ),
164
+                                     12 => 30),
165 165
 
166 166
 
167
-    'date_interval' => array( 'D', 'M', 'Y', 'H', 'm', 'S' ),
167
+    'date_interval' => array('D', 'M', 'Y', 'H', 'm', 'S'),
168 168
 
169 169
 
170
-    'date_simple' => array( 'day', ' month', ' year', ' hour', ' minute', ' second' ),
170
+    'date_simple' => array('day', ' month', ' year', ' hour', ' minute', ' second'),
171 171
 
172 172
  );
173 173
 
Please login to merge, or discard this patch.
src/Convert.php 1 patch
Spacing   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -63,15 +63,15 @@  discard block
 block discarded – undo
63 63
    *
64 64
    *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
65 65
    */
66
-  public function __construct( $date_time = NULL ) {
66
+  public function __construct($date_time = NULL) {
67 67
 
68
-    if ( $date_time !== NULL ) {
68
+    if ($date_time !== NULL) {
69 69
 
70 70
         $this->date_time = $date_time;
71 71
 
72 72
     }
73 73
 
74
-    $this->config = include( 'Config.php' );
74
+    $this->config = include('Config.php');
75 75
 
76 76
     $this->persian_month = $this->config['month']['persian'];
77 77
 
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
    *
86 86
    *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
87 87
    */
88
-  public function to( $calendar ) {
88
+  public function to($calendar) {
89 89
 
90
-    $this->calendar_file = include( 'CalendarSettings/' . ucfirst( $calendar ) . '.php' );
90
+    $this->calendar_file = include('CalendarSettings/'.ucfirst($calendar).'.php');
91 91
 
92
-    return $this->calendar_file[ 'convert_to' ]( $this->date_time );
92
+    return $this->calendar_file['convert_to']($this->date_time);
93 93
 
94 94
   }
95 95
 
@@ -103,19 +103,19 @@  discard block
 block discarded – undo
103 103
    *
104 104
    *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
105 105
    */
106
-  public function gregorianToShamsi( $date_time ) {
106
+  public function gregorianToShamsi($date_time) {
107 107
 
108 108
     $this->date_time = $date_time;
109 109
 
110
-    $this->year = $this->date_time->format( 'Y' );
110
+    $this->year = $this->date_time->format('Y');
111 111
 
112
-    $this->month = $this->date_time->format( 'm' );
112
+    $this->month = $this->date_time->format('m');
113 113
 
114
-    $this->day = $this->date_time->format( 'd' );
114
+    $this->day = $this->date_time->format('d');
115 115
 
116 116
     $this->temp_day = 0;
117 117
 
118
-     for ( $i = 1 ; $i < $this->month ; $i++ ) {
118
+     for ($i = 1; $i < $this->month; $i++) {
119 119
 
120 120
        $this->temp_day += $this->config['gregorian_month_days'][$i];
121 121
 
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
 
124 124
      $this->temp_day += $this->day;
125 125
 
126
-     $this->leap = new leap( $this->year );
126
+     $this->leap = new leap($this->year);
127 127
 
128
-     if( $this->leap->get() && $this->month > 2 ) $this->temp_day++;
128
+     if ($this->leap->get() && $this->month > 2) $this->temp_day++;
129 129
 
130
-     if ( $this->temp_day <= 79 ) {
130
+     if ($this->temp_day <= 79) {
131 131
 
132
-      if( ( $this->year - 1 ) % 4 == 0 )
132
+      if (($this->year - 1) % 4 == 0)
133 133
 
134 134
         $this->temp_day = $this->temp_day + 11;
135 135
 
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 
140 140
       $this->year = $this->year - 622;
141 141
 
142
-      if($this->temp_day % 30 == 0) {
142
+      if ($this->temp_day % 30 == 0) {
143 143
 
144
-        $this->month = ( $this->temp_day / 30 ) + 9;
144
+        $this->month = ($this->temp_day / 30) + 9;
145 145
 
146 146
         $this->day = 30;
147 147
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
       else {
151 151
 
152
-        $this->month = ( $this->temp_day / 30 ) + 10;
152
+        $this->month = ($this->temp_day / 30) + 10;
153 153
 
154 154
         $this->day = $this->temp_day % 30;
155 155
 
@@ -163,20 +163,20 @@  discard block
 block discarded – undo
163 163
 
164 164
       $this->temp_day = $this->temp_day - 79;
165 165
 
166
-      if( $this->temp_day <= 186 ) {
166
+      if ($this->temp_day <= 186) {
167 167
 
168
-        if( $this->temp_day % 31 == 0 ) {
168
+        if ($this->temp_day % 31 == 0) {
169 169
 
170
-          $this->month = ( $this->temp_day / 31 );
170
+          $this->month = ($this->temp_day / 31);
171 171
 
172 172
           $this->day = 31;
173 173
         }
174 174
 
175 175
       else {
176 176
 
177
-        $this->month = ( $this->temp_day / 31 ) + 1;
177
+        $this->month = ($this->temp_day / 31) + 1;
178 178
 
179
-        $this->day = ( $this->temp_day % 31 );
179
+        $this->day = ($this->temp_day % 31);
180 180
       }
181 181
 
182 182
       }
@@ -185,9 +185,9 @@  discard block
 block discarded – undo
185 185
 
186 186
         $this->temp_day = $this->temp_day - 186;
187 187
 
188
-        if( $this->temp_day % 30 == 0 ) {
188
+        if ($this->temp_day % 30 == 0) {
189 189
 
190
-        $this->month = ( $this->temp_day / 30 ) + 6;
190
+        $this->month = ($this->temp_day / 30) + 6;
191 191
 
192 192
         $this->day = 30;
193 193
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
         else {
197 197
 
198
-        $this->month = ( $this->temp_day / 30 ) + 7;
198
+        $this->month = ($this->temp_day / 30) + 7;
199 199
 
200 200
         $this->day = $this->temp_day % 30;
201 201
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
      }
207 207
 
208
-     $this->date_time->setDate( $this->year, $this->month, $this->day );
208
+     $this->date_time->setDate($this->year, $this->month, $this->day);
209 209
 
210 210
      return $this->date_time;
211 211
 
@@ -216,11 +216,11 @@  discard block
 block discarded – undo
216 216
    * @since Aug, 29 2015
217 217
    * @return object
218 218
    */
219
-  public function gregorianToGhamari( $date_time ) {
219
+  public function gregorianToGhamari($date_time) {
220 220
 
221 221
     $this->date_time = $date_time;
222 222
 
223
-    $this->date_time = $this->gregorianToShamsi( $this->date_time );
223
+    $this->date_time = $this->gregorianToShamsi($this->date_time);
224 224
 
225 225
     $this->year = $this->date_time->format('Y');
226 226
 
@@ -228,9 +228,9 @@  discard block
 block discarded – undo
228 228
 
229 229
     $this->day = $this->date_time->format('d');
230 230
 
231
-    $this->temp_day = 0 ;
231
+    $this->temp_day = 0;
232 232
 
233
-    for ( $i = 1 ; $i < $this->month ; $i++ ) {
233
+    for ($i = 1; $i < $this->month; $i++) {
234 234
 
235 235
         $this->temp_day += $this->config['shamsi_month_days'][$i];
236 236
 
@@ -238,13 +238,13 @@  discard block
 block discarded – undo
238 238
 
239 239
      $this->temp_day += $this->day;
240 240
 
241
-     $this->leap = new leap( $this->year );
241
+     $this->leap = new leap($this->year);
242 242
 
243
-    if( $this->leap->get() && $this->month > 11 ) $this->temp_day++;
243
+    if ($this->leap->get() && $this->month > 11) $this->temp_day++;
244 244
 
245
-    $_year = ( ( ( ( ( $this->year - 1 ) * 365.2422 ) + $this->temp_day ) - 119) / 354.3670 ) + 1;
245
+    $_year = ((((($this->year - 1) * 365.2422) + $this->temp_day) - 119) / 354.3670) + 1;
246 246
 
247
-    $_year = explode( '.', $_year );
247
+    $_year = explode('.', $_year);
248 248
 
249 249
     $this->year = $_year[0];
250 250
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
      $var_temp = '0.0';
254 254
 
255
-      for ( $i = strlen( $_month ); $i > 2; $i-- ) {
255
+      for ($i = strlen($_month); $i > 2; $i--) {
256 256
 
257 257
         $var_temp .= '0';
258 258
 
@@ -260,11 +260,11 @@  discard block
 block discarded – undo
260 260
 
261 261
      $var_temp .= '1';
262 262
 
263
-    $_month = $_month * $var_temp ;
263
+    $_month = $_month * $var_temp;
264 264
 
265
-    $_month = ( $_month * 12 ) + 1;
265
+    $_month = ($_month * 12) + 1;
266 266
 
267
-    $_month = explode( '.', $_month );
267
+    $_month = explode('.', $_month);
268 268
 
269 269
     $this->month = $_month[0];
270 270
 
@@ -272,9 +272,9 @@  discard block
 block discarded – undo
272 272
 
273 273
     $var_temp = '0.0';
274 274
 
275
-    for ( $i = strlen( $_day );  $i > 2;  $i-- ) {
275
+    for ($i = strlen($_day); $i > 2; $i--) {
276 276
 
277
-       $var_temp .= '0' ;
277
+       $var_temp .= '0';
278 278
 
279 279
     }
280 280
 
@@ -282,13 +282,13 @@  discard block
 block discarded – undo
282 282
 
283 283
     $_day = $_day * $var_temp;
284 284
 
285
-    $_day = ( $_day * 29.530 );
285
+    $_day = ($_day * 29.530);
286 286
 
287
-    $_day = explode( '.', $_day );
287
+    $_day = explode('.', $_day);
288 288
 
289 289
     $this->day = $_day[0];
290 290
 
291
-   $this->date_time->setDate( $this->year, $this->month, $this->day );
291
+   $this->date_time->setDate($this->year, $this->month, $this->day);
292 292
 
293 293
 
294 294
    return $this->date_time;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
    * @since Oct, 16 2015
301 301
    * @return object
302 302
    */
303
-public function shamsiToGregorian( $date_time ) {
303
+public function shamsiToGregorian($date_time) {
304 304
 
305 305
 $this->date_time = $date_time;
306 306
 
@@ -312,39 +312,39 @@  discard block
 block discarded – undo
312 312
 
313 313
 $days_of_year = 0;
314 314
 
315
-foreach ( $this->config['shamsi_month_days'] as $month => $value ) {
315
+foreach ($this->config['shamsi_month_days'] as $month => $value) {
316 316
 
317
-  if( $this->month > $month ) $days_of_year += $value;
317
+  if ($this->month > $month) $days_of_year += $value;
318 318
 
319 319
 }
320 320
 
321 321
 $days_of_year += $this->day;
322 322
 
323
-$days_of_leap_years =  intval( ( ( $this->year - 1 ) / 4 )  );
323
+$days_of_leap_years = intval((($this->year - 1) / 4));
324 324
 
325
-$days_of_shamsi_years = ( ( ( $this->year - 1 ) * 365 ) + $days_of_year + $days_of_leap_years );
325
+$days_of_shamsi_years = ((($this->year - 1) * 365) + $days_of_year + $days_of_leap_years);
326 326
 
327 327
 $days_of_gregorain_years = $days_of_shamsi_years + 226899;
328 328
 
329
-if ( $this->month < 10 )  {
329
+if ($this->month < 10) {
330 330
 
331
-$days_of_gregorain_years = $days_of_gregorain_years - intval( ( ( $this->year + 621 ) / 4 ) );
331
+$days_of_gregorain_years = $days_of_gregorain_years - intval((($this->year + 621) / 4));
332 332
 
333 333
 }
334 334
 
335
-elseif ( ( ( 10 == $this->month ) && ( $this->day > 10 ) ) || ( $this->month > 10 ) ) {
335
+elseif (((10 == $this->month) && ($this->day > 10)) || ($this->month > 10)) {
336 336
 
337
-$days_of_gregorain_years = $days_of_gregorain_years - intval( ( ( $this->year + 622 ) / 4 ) );
337
+$days_of_gregorain_years = $days_of_gregorain_years - intval((($this->year + 622) / 4));
338 338
 
339 339
 }
340 340
 
341
-$gregorian_month = ( $days_of_gregorain_years % 365 );
341
+$gregorian_month = ($days_of_gregorain_years % 365);
342 342
 
343
-$gregorian_year = intval( $days_of_gregorain_years / 365 ) + 1;
343
+$gregorian_year = intval($days_of_gregorain_years / 365) + 1;
344 344
 
345 345
 foreach ($this->config['gregorian_month_days'] as $month => $value) {
346 346
 
347
-  if ( $gregorian_month < $value ) break;
347
+  if ($gregorian_month < $value) break;
348 348
 
349 349
     $gregorian_month -= $value;
350 350
 }
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
   $gregorian_month = $month;
355 355
 
356
-  $this->date_time->setDate( $gregorian_year, $gregorian_month, $gregorian_day );
356
+  $this->date_time->setDate($gregorian_year, $gregorian_month, $gregorian_day);
357 357
 
358 358
 
359 359
  return $this->date_time;
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
    * @since Oct, 17 2015
366 366
    * @return object
367 367
    */
368
-public function shamsiToGhamari( $date_time ) {
368
+public function shamsiToGhamari($date_time) {
369 369
 
370 370
     $this->date_time = $date_time;
371 371
 
@@ -375,9 +375,9 @@  discard block
 block discarded – undo
375 375
 
376 376
     $this->day = $this->date_time->format('d');
377 377
 
378
-    $this->temp_day = 0 ;
378
+    $this->temp_day = 0;
379 379
 
380
-    for ( $i = 1 ; $i < $this->month ; $i++ ) {
380
+    for ($i = 1; $i < $this->month; $i++) {
381 381
 
382 382
         $this->temp_day += $this->config['shamsi_month_days'][$i];
383 383
 
@@ -385,13 +385,13 @@  discard block
 block discarded – undo
385 385
 
386 386
      $this->temp_day += $this->day;
387 387
 
388
-     $this->leap = new leap( $this->year );
388
+     $this->leap = new leap($this->year);
389 389
 
390
-    if( $this->leap->get() && $this->month > 11 ) $this->temp_day++;
390
+    if ($this->leap->get() && $this->month > 11) $this->temp_day++;
391 391
 
392
-    $_year = ( ( ( ( ( $this->year - 1 ) * 365.2422 ) + $this->temp_day ) - 119) / 354.3670 ) + 1;
392
+    $_year = ((((($this->year - 1) * 365.2422) + $this->temp_day) - 119) / 354.3670) + 1;
393 393
 
394
-    $_year = explode( '.', $_year );
394
+    $_year = explode('.', $_year);
395 395
 
396 396
     $this->year = $_year[0];
397 397
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 
400 400
      $var_temp = '0.0';
401 401
 
402
-      for ( $i = strlen( $_month ); $i > 2; $i-- ) {
402
+      for ($i = strlen($_month); $i > 2; $i--) {
403 403
 
404 404
         $var_temp .= '0';
405 405
 
@@ -407,11 +407,11 @@  discard block
 block discarded – undo
407 407
 
408 408
      $var_temp .= '1';
409 409
 
410
-    $_month = $_month * $var_temp ;
410
+    $_month = $_month * $var_temp;
411 411
 
412
-    $_month = ( $_month * 12 ) + 1;
412
+    $_month = ($_month * 12) + 1;
413 413
 
414
-    $_month = explode( '.', $_month );
414
+    $_month = explode('.', $_month);
415 415
 
416 416
     $this->month = $_month[0];
417 417
 
@@ -419,9 +419,9 @@  discard block
 block discarded – undo
419 419
 
420 420
     $var_temp = '0.0';
421 421
 
422
-    for ( $i = strlen( $_day );  $i > 2;  $i-- ) {
422
+    for ($i = strlen($_day); $i > 2; $i--) {
423 423
 
424
-       $var_temp .= '0' ;
424
+       $var_temp .= '0';
425 425
 
426 426
     }
427 427
 
@@ -429,13 +429,13 @@  discard block
 block discarded – undo
429 429
 
430 430
     $_day = $_day * $var_temp;
431 431
 
432
-    $_day = ( $_day * 29.530 );
432
+    $_day = ($_day * 29.530);
433 433
 
434
-    $_day = explode( '.', $_day );
434
+    $_day = explode('.', $_day);
435 435
 
436 436
     $this->day = $_day[0];
437 437
 
438
-   $this->date_time->setDate( $this->year, $this->month, $this->day );
438
+   $this->date_time->setDate($this->year, $this->month, $this->day);
439 439
 
440 440
    return $this->date_time;
441 441
 
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
    * @since Oct, 17 2015
447 447
    * @return object
448 448
    */
449
-public function ghamariToShamsi( $date_time ) {
449
+public function ghamariToShamsi($date_time) {
450 450
 
451 451
 $this->date_time = $date_time;
452 452
 
@@ -458,29 +458,29 @@  discard block
 block discarded – undo
458 458
 
459 459
 $days_of_year = 0;
460 460
 
461
-foreach ( $this->config['islamic_month_days'] as $month => $value ) {
461
+foreach ($this->config['islamic_month_days'] as $month => $value) {
462 462
 
463
-  if( $this->month > $month ) $days_of_year += $value;
463
+  if ($this->month > $month) $days_of_year += $value;
464 464
 
465 465
 }
466 466
 
467 467
 $days_of_year += $this->day;
468 468
 
469
-$days_of_leap_years =  intval( ( ( $this->year - 1 ) / 3 )  );
469
+$days_of_leap_years = intval((($this->year - 1) / 3));
470 470
 
471
-$days_of_ghamari_years = ( ( ( $this->year - 1 ) * 354 ) + $days_of_year + $days_of_leap_years );
471
+$days_of_ghamari_years = ((($this->year - 1) * 354) + $days_of_year + $days_of_leap_years);
472 472
 
473 473
 $days_of_shamsi_years = $days_of_ghamari_years + 179;
474 474
 
475
-$days_of_shamsi_years = $days_of_shamsi_years - intval( ( ( $this->year - 43 ) / 4 ) );
475
+$days_of_shamsi_years = $days_of_shamsi_years - intval((($this->year - 43) / 4));
476 476
 
477
-$shamsi_month = ( $days_of_shamsi_years % 365 );
477
+$shamsi_month = ($days_of_shamsi_years % 365);
478 478
 
479
-$shamsi_year = intval( $days_of_shamsi_years / 365 ) + 1;
479
+$shamsi_year = intval($days_of_shamsi_years / 365) + 1;
480 480
 
481 481
 foreach ($this->config['shamsi_month_days'] as $month => $value) {
482 482
 
483
-  if ( $shamsi_month < $value ) break;
483
+  if ($shamsi_month < $value) break;
484 484
 
485 485
     $shamsi_month -= $value;
486 486
 }
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 
490 490
   $shamsi_month = $month;
491 491
 
492
-  $this->date_time->setDate( $shamsi_year, $shamsi_month, $shamsi_day );
492
+  $this->date_time->setDate($shamsi_year, $shamsi_month, $shamsi_day);
493 493
 
494 494
  return $this->date_time;
495 495
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
     * @since Oct, 17 2015
501 501
     * @return object
502 502
     */
503
-  public function ghamariToGregorian( $date_time ) {
503
+  public function ghamariToGregorian($date_time) {
504 504
 
505 505
     $this->date_time = $date_time;
506 506
 
@@ -512,29 +512,29 @@  discard block
 block discarded – undo
512 512
 
513 513
     $days_of_year = 0;
514 514
 
515
-    foreach ( $this->config['islamic_month_days'] as $month => $value ) {
515
+    foreach ($this->config['islamic_month_days'] as $month => $value) {
516 516
 
517
-      if( $this->month > $month ) $days_of_year += $value;
517
+      if ($this->month > $month) $days_of_year += $value;
518 518
 
519 519
     }
520 520
 
521 521
     $days_of_year += $this->day;
522 522
 
523
-    $days_of_leap_years =  intval( ( ( $this->year - 1 ) / 3 )  );
523
+    $days_of_leap_years = intval((($this->year - 1) / 3));
524 524
 
525
-    $days_of_ghamari_years = ( ( ( $this->year - 1 ) * 354 ) + $days_of_year + $days_of_leap_years );
525
+    $days_of_ghamari_years = ((($this->year - 1) * 354) + $days_of_year + $days_of_leap_years);
526 526
 
527 527
     $days_of_gregorain_years = $days_of_ghamari_years + 227078;
528 528
 
529
-    $days_of_gregorain_years = $days_of_gregorain_years - intval( ( ( $this->year + 578 ) / 4 ) );
529
+    $days_of_gregorain_years = $days_of_gregorain_years - intval((($this->year + 578) / 4));
530 530
 
531
-    $gregorian_month = ( $days_of_gregorain_years % 365 );
531
+    $gregorian_month = ($days_of_gregorain_years % 365);
532 532
 
533
-    $gregorian_year = intval( $days_of_gregorain_years / 365 ) + 1;
533
+    $gregorian_year = intval($days_of_gregorain_years / 365) + 1;
534 534
 
535 535
     foreach ($this->config['gregorian_month_days'] as $month => $value) {
536 536
 
537
-      if ( $gregorian_month < $value ) break;
537
+      if ($gregorian_month < $value) break;
538 538
 
539 539
         $gregorian_month -= $value;
540 540
     }
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 
544 544
       $gregorian_month = $month;
545 545
 
546
-      $this->date_time->setDate( $gregorian_year, $gregorian_month, $gregorian_day );
546
+      $this->date_time->setDate($gregorian_year, $gregorian_month, $gregorian_day);
547 547
 
548 548
      return $this->date_time;
549 549
 
Please login to merge, or discard this patch.
src/Datium.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 
61 61
     $this->config = include('Config.php');
62 62
 
63
-    $this->calendar_type = $this->config[ 'default_calendar' ];
63
+    $this->calendar_type = $this->config['default_calendar'];
64 64
 
65
-    date_default_timezone_set( $this->config['timezone'] );
65
+    date_default_timezone_set($this->config['timezone']);
66 66
 
67
-    switch( Datium::$call_type ) {
67
+    switch (Datium::$call_type) {
68 68
 
69 69
       case 'now':
70 70
 
71
-        $this->date_time = new DateTime( 'now' );
71
+        $this->date_time = new DateTime('now');
72 72
 
73 73
         $this->gregorian_DayofWeek = $this->date_time->format('w');
74 74
 
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 
79 79
       case 'make':
80 80
 
81
-        $this->date_time = new DateTime( 'now' );
81
+        $this->date_time = new DateTime('now');
82 82
 
83
-        $this->date_time->setDate( self::$array_date['year'], self::$array_date['month'], self::$array_date['day'] );
83
+        $this->date_time->setDate(self::$array_date['year'], self::$array_date['month'], self::$array_date['day']);
84 84
 
85
-        $this->date_time->setTime( self::$array_date['hour'], self::$array_date['minute'], self::$array_date['second'] );
85
+        $this->date_time->setTime(self::$array_date['hour'], self::$array_date['minute'], self::$array_date['second']);
86 86
 
87 87
         $this->gregorian_DayofWeek = $this->date_time->format('w');
88 88
 
@@ -128,12 +128,12 @@  discard block
 block discarded – undo
128 128
    * @param $second integer
129 129
    * @return object
130 130
    */
131
-  public static function create( $year = 2000, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0 ) {
131
+  public static function create($year = 2000, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0) {
132 132
 
133 133
       /**
134 134
        * When we want to set a Datetime object to Datium
135 135
        */
136
-      if( func_num_args() === 1 ) {
136
+      if (func_num_args() === 1) {
137 137
 
138 138
         self::$static_date_time = func_get_arg(0);
139 139
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
       } else {
143 143
 
144
-        self::$array_date = array( 'year' => $year, 'month' => $month, 'day' => $day, 'hour' => $hour, 'minute' => $minute, 'second' => $second );
144
+        self::$array_date = array('year' => $year, 'month' => $month, 'day' => $day, 'hour' => $hour, 'minute' => $minute, 'second' => $second);
145 145
 
146 146
         self::$call_type = 'make';
147 147
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
   }
153 153
 
154
-  public static function between( $date_start, $date_end ) {
154
+  public static function between($date_start, $date_end) {
155 155
 
156 156
     self::$date_start = $date_start;
157 157
 
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 
164 164
   }
165 165
 
166
-  public function to( $calendar ) {
166
+  public function to($calendar) {
167 167
 
168
-    $this->convert = new Convert( $this->date_time );
168
+    $this->convert = new Convert($this->date_time);
169 169
 
170
-    $this->date_time = $this->convert->to( $calendar );
170
+    $this->date_time = $this->convert->to($calendar);
171 171
 
172 172
     return $this;
173 173
 
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
    * @param $start datetime
180 180
    * @param $end datetime
181 181
    */
182
-  public static function diff( $start, $end ) {
182
+  public static function diff($start, $end) {
183 183
 
184
-    return date_diff( $start, $end );
184
+    return date_diff($start, $end);
185 185
 
186 186
   }
187 187
 
@@ -190,13 +190,13 @@  discard block
 block discarded – undo
190 190
    * @param $value string
191 191
    * @return object
192 192
    */
193
-  public function add( $value ) {
193
+  public function add($value) {
194 194
 
195
-    $this->date_interval_expression = str_replace( $this->config['date_simple'], $this->config['date_interval'], $value );
195
+    $this->date_interval_expression = str_replace($this->config['date_simple'], $this->config['date_interval'], $value);
196 196
 
197
-    $this->date_interval_expression = str_replace( ' ', '', 'P' . $this->date_interval_expression );
197
+    $this->date_interval_expression = str_replace(' ', '', 'P'.$this->date_interval_expression);
198 198
 
199
-    $this->date_time->add( new DateInterval( $this->date_interval_expression ) );
199
+    $this->date_time->add(new DateInterval($this->date_interval_expression));
200 200
 
201 201
     return $this;
202 202
 
@@ -207,13 +207,13 @@  discard block
 block discarded – undo
207 207
    * @param $value
208 208
    * @param return obejct
209 209
    */
210
-  public function sub( $value ) {
210
+  public function sub($value) {
211 211
 
212
-    $this->date_interval_expression = str_replace( $this->config['date_simple'], $this->config['date_interval'], $value );
212
+    $this->date_interval_expression = str_replace($this->config['date_simple'], $this->config['date_interval'], $value);
213 213
 
214
-    $this->date_interval_expression = str_replace( ' ', '', 'P' . $this->date_interval_expression );
214
+    $this->date_interval_expression = str_replace(' ', '', 'P'.$this->date_interval_expression);
215 215
 
216
-    $this->date_time->sub( new DateInterval( $this->date_interval_expression ) );
216
+    $this->date_time->sub(new DateInterval($this->date_interval_expression));
217 217
 
218 218
     return $this;
219 219
 
@@ -223,9 +223,9 @@  discard block
 block discarded – undo
223 223
    * Check if current year is leap or not
224 224
    * @return boolean
225 225
    */
226
-  public function leap( $type = 'gr') {
226
+  public function leap($type = 'gr') {
227 227
 
228
-    $this->leap = new Leap( $this->date_time->format( 'Y' ), $type );
228
+    $this->leap = new Leap($this->date_time->format('Y'), $type);
229 229
 
230 230
     return $this->leap;
231 231
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
    */
237 237
   public function dayOf() {
238 238
 
239
-    $this->day_of = new DayOf( $this->date_time, $this->calendar_type );
239
+    $this->day_of = new DayOf($this->date_time, $this->calendar_type);
240 240
 
241 241
     return $this->day_of;
242 242
 
@@ -247,13 +247,13 @@  discard block
 block discarded – undo
247 247
    */
248 248
   public function events() {
249 249
 
250
-    if ( Datium::$call_type == 'between' ) {
250
+    if (Datium::$call_type == 'between') {
251 251
 
252
-      $this->events = new Events( Datium::$date_start, Datium::$date_end );
252
+      $this->events = new Events(Datium::$date_start, Datium::$date_end);
253 253
 
254 254
     } else {
255 255
 
256
-      $this->events = new Events( $this->date_time );
256
+      $this->events = new Events($this->date_time);
257 257
 
258 258
     }
259 259
 
@@ -261,9 +261,9 @@  discard block
 block discarded – undo
261 261
 
262 262
   }
263 263
 
264
-  public function translate( $calendar, $format ) {
264
+  public function translate($calendar, $format) {
265 265
 
266
-  $this->date_time = new Translate( $this->date_time, $calendar, $format, $this->gregorian_DayofWeek );
266
+  $this->date_time = new Translate($this->date_time, $calendar, $format, $this->gregorian_DayofWeek);
267 267
 
268 268
   return $this->date_time;
269 269
 
@@ -310,19 +310,19 @@  discard block
 block discarded – undo
310 310
   //
311 311
   // }
312 312
 
313
-  public function toShamsi( $type = 'gr' ) {
313
+  public function toShamsi($type = 'gr') {
314 314
 
315
-    switch ( $type ) {
315
+    switch ($type) {
316 316
 
317 317
       case 'gr':
318 318
 
319
-           $this->date_time = $this->convert_calendar->gregorianToShamsi( $this->date_time );
319
+           $this->date_time = $this->convert_calendar->gregorianToShamsi($this->date_time);
320 320
 
321 321
         break;
322 322
 
323 323
       case 'gh':
324 324
 
325
-            $this->date_time = $this->convert_calendar->ghamariToShamsi( $this->date_time );
325
+            $this->date_time = $this->convert_calendar->ghamariToShamsi($this->date_time);
326 326
 
327 327
         break;
328 328
     }
@@ -333,19 +333,19 @@  discard block
 block discarded – undo
333 333
 
334 334
   }
335 335
 
336
-  public function toGhamari( $type = 'gr') {
336
+  public function toGhamari($type = 'gr') {
337 337
 
338
-switch ( $type  ) {
338
+switch ($type) {
339 339
 
340 340
   case 'ir':
341 341
 
342
-        $this->date_time = $this->convert_calendar->shamsiToGhamari( $this->date_time );
342
+        $this->date_time = $this->convert_calendar->shamsiToGhamari($this->date_time);
343 343
 
344 344
     break;
345 345
 
346 346
   case 'gr':
347 347
 
348
-    $this->date_time = $this->convert_calendar->gregorianToGhamari( $this->date_time );
348
+    $this->date_time = $this->convert_calendar->gregorianToGhamari($this->date_time);
349 349
 
350 350
     break;
351 351
 
@@ -357,19 +357,19 @@  discard block
 block discarded – undo
357 357
 
358 358
   }
359 359
 
360
-  public function toGregorian( $type = 'gr' ) {
360
+  public function toGregorian($type = 'gr') {
361 361
 
362
-    switch ( $type ) {
362
+    switch ($type) {
363 363
 
364 364
       case 'ir':
365 365
 
366
-        $this->date_time = $this->convert_calendar->shamsiToGregorian( $this->date_time );
366
+        $this->date_time = $this->convert_calendar->shamsiToGregorian($this->date_time);
367 367
 
368 368
         break;
369 369
 
370 370
       case 'gh':
371 371
 
372
-        $this->date_time = $this->convert_calendar->ghamariToGregorian( $this->date_time );
372
+        $this->date_time = $this->convert_calendar->ghamariToGregorian($this->date_time);
373 373
 
374 374
       case 'gr':
375 375
 
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
    *
395 395
    *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
396 396
    */
397
-  public function object(){
397
+  public function object() {
398 398
 
399 399
     return $this->date_time;
400 400
 
@@ -406,11 +406,11 @@  discard block
 block discarded – undo
406 406
    * @param $calendar string
407 407
    * @param $format string
408 408
    */
409
-  public function get( $format = 'Y-m-d H:i:s' ) {
409
+  public function get($format = 'Y-m-d H:i:s') {
410 410
 
411
-    if( in_array( $this->calendar_type, $this->config[ 'calendar' ] ) ){
411
+    if (in_array($this->calendar_type, $this->config['calendar'])) {
412 412
 
413
-        return $this->translate( $this->calendar_type, $format )->get();
413
+        return $this->translate($this->calendar_type, $format)->get();
414 414
 
415 415
     }
416 416
 
Please login to merge, or discard this patch.
src/DayOf.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
   protected $geregorian_DayofWeek;
21 21
 
22
-  public function __construct( $date_time, $calendar_type = 'ir' ) {
22
+  public function __construct($date_time, $calendar_type = 'ir') {
23 23
 
24
-    $this->config = include( 'Config.php' );
24
+    $this->config = include('Config.php');
25 25
 
26 26
     $this->date_time = $date_time;
27 27
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
    */
43 43
   public function year() {
44 44
 
45
-    switch ( $this->calendar_type ) {
45
+    switch ($this->calendar_type) {
46 46
 
47 47
       case 'ir':
48 48
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
       case 'gr':
60 60
 
61
-      $this->result = date( 'z', strtotime( $this->date_time->format('Y-m-d H:i:s') ) ) + 1;
61
+      $this->result = date('z', strtotime($this->date_time->format('Y-m-d H:i:s'))) + 1;
62 62
 
63 63
        break;
64 64
     }
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
 
79 79
     $this->day = $this->date_time->format('d');
80 80
 
81
-    foreach( $this->config['shamsi_month_days'] as $month => $value ) {
81
+    foreach ($this->config['shamsi_month_days'] as $month => $value) {
82 82
 
83
-      if ( $month < $this->month ) $this->result += $value;
83
+      if ($month < $this->month) $this->result += $value;
84 84
 
85 85
     }
86 86
 
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
 
102 102
     $this->day = $this->date_time->format('d');
103 103
 
104
-    foreach( $this->config['islamic_month_days'] as $month => $value ) {
104
+    foreach ($this->config['islamic_month_days'] as $month => $value) {
105 105
 
106
-      if ( $month < $this->month ) $this->result += $value;
106
+      if ($month < $this->month) $this->result += $value;
107 107
 
108 108
     }
109 109
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
    */
121 121
   public function week() {
122 122
 
123
-    switch ( $this->calendar_type ) {
123
+    switch ($this->calendar_type) {
124 124
 
125 125
       case 'ir':
126 126
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
       case 'gr':
138 138
 
139
-      $this->result = date( 'w', strtotime( $this->date_time->format('Y-m-d H:i:s') ) ) + 1;
139
+      $this->result = date('w', strtotime($this->date_time->format('Y-m-d H:i:s'))) + 1;
140 140
 
141 141
        break;
142 142
     }
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
    */
152 152
   protected function persian_day_of_week() {
153 153
 
154
-    $this->day = str_replace( $this->config['week_days_name']['english'], $this->config['week_days_name']['persian'], $this->day);
154
+    $this->day = str_replace($this->config['week_days_name']['english'], $this->config['week_days_name']['persian'], $this->day);
155 155
 
156
-    foreach ( $this->config['week_days_name']['persian'] as $key => $value ) {
156
+    foreach ($this->config['week_days_name']['persian'] as $key => $value) {
157 157
 
158
-      if( $value == $this->day ) return $key += 1;
158
+      if ($value == $this->day) return $key += 1;
159 159
 
160 160
     }
161 161
 
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
    */
168 168
   protected function islamic_day_of_week() {
169 169
 
170
-    $this->day = str_replace( $this->config['week_days_name']['english'], $this->config['week_days_name']['islamic'][$this->geregorian_DayofWeek], $this->day);
170
+    $this->day = str_replace($this->config['week_days_name']['english'], $this->config['week_days_name']['islamic'][$this->geregorian_DayofWeek], $this->day);
171 171
 
172
-    foreach ( $this->config['week_days_name']['islamic'] as $key => $value ) {
172
+    foreach ($this->config['week_days_name']['islamic'] as $key => $value) {
173 173
 
174
-      if( $value == $this->day ) return $key += 1;
174
+      if ($value == $this->day) return $key += 1;
175 175
 
176 176
     }
177 177
 
Please login to merge, or discard this patch.
src/Events/Events.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 
27 27
 	private static $date_end;
28 28
 
29
-	public function __construct( $date_time, $date_end = NULL ) {
29
+	public function __construct($date_time, $date_end = NULL) {
30 30
 
31
-		if( $date_end !== NULL ) {
31
+		if ($date_end !== NULL) {
32 32
 
33 33
 			Events::$date_start = $date_time;
34 34
 
@@ -56,19 +56,19 @@  discard block
 block discarded – undo
56 56
 	 *
57 57
 	 *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
58 58
 	 */
59
-	private function fetch( $path ) {
59
+	private function fetch($path) {
60 60
 
61
-		$this->events = include( $path );
61
+		$this->events = include($path);
62 62
 
63 63
 		$this->interval = DateInterval::createFromDateString('1 day');
64 64
 
65
-		$this->period = new DatePeriod( Events::$date_start, $this->interval, Events::$date_end );
65
+		$this->period = new DatePeriod(Events::$date_start, $this->interval, Events::$date_end);
66 66
 
67
-		foreach ( $this->period as $dt ) {
67
+		foreach ($this->period as $dt) {
68 68
 
69
-			if ( isset( $this->events[ 'events' ][ intval( $dt->format('m') ) ][ intval( $dt->format('d') ) ] ) ) {
69
+			if (isset($this->events['events'][intval($dt->format('m'))][intval($dt->format('d'))])) {
70 70
 
71
-				$this->result[ $dt->format( 'Y-m-d' ) ][] = $this->events[ 'events' ][ intval( $dt->format('m') ) ][ intval( $dt->format('d') ) ];
71
+				$this->result[$dt->format('Y-m-d')][] = $this->events['events'][intval($dt->format('m'))][intval($dt->format('d'))];
72 72
 
73 73
 			}
74 74
 
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function get() {
89 89
 
90
-		if( ! empty( $this->result ) ) {
90
+		if ( ! empty($this->result)) {
91 91
 
92
-			foreach( $this->result as $key => $day ) {
92
+			foreach ($this->result as $key => $day) {
93 93
 
94
-				if ( ! ( $key > Events::$date_start->format( 'Y-m-d' ) && $key < Events::$date_end->format( 'Y-m-d' ) ) ) {
94
+				if ( ! ($key > Events::$date_start->format('Y-m-d') && $key < Events::$date_end->format('Y-m-d'))) {
95 95
 
96
-					unset( $this->result[ $key ] );
96
+					unset($this->result[$key]);
97 97
 
98 98
 				}
99 99
 
@@ -118,49 +118,49 @@  discard block
 block discarded – undo
118 118
 		 *
119 119
 		 *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
120 120
 		 */
121
-		public function local( $country_code = "ir" ) {
121
+		public function local($country_code = "ir") {
122 122
 
123 123
 				/*
124 124
 				 * Capitalize the first character of $country_code according the file
125 125
 				 * structure.
126 126
 				 */
127
-				$country_code = strtolower( $country_code = 'ir' ) ;
127
+				$country_code = strtolower($country_code = 'ir');
128 128
 
129
-				$this->local = include( 'Localization/' . $country_code . '.php' );
129
+				$this->local = include('Localization/'.$country_code.'.php');
130 130
 
131
-				foreach( $this->local[ 'events' ] as $month => $events ) {
131
+				foreach ($this->local['events'] as $month => $events) {
132 132
 
133
-					foreach( $events as $day => $event ){
133
+					foreach ($events as $day => $event) {
134 134
 
135 135
 						$this->date_time = new DateTime();
136 136
 
137
-						$this->date_time->setDate( Events::$date_start->format( 'Y' ), $month, $day );
137
+						$this->date_time->setDate(Events::$date_start->format('Y'), $month, $day);
138 138
 
139
-						switch ( $this->local[ 'default_calendar' ] ) {
139
+						switch ($this->local['default_calendar']) {
140 140
 
141 141
 							case 'shamsi':
142 142
 
143
-							$this->date_time->setDate( 1394, $month, $day );
143
+							$this->date_time->setDate(1394, $month, $day);
144 144
 
145
-							$this->date_time = $this->convert->shamsiToGregorian( $this->date_time );
145
+							$this->date_time = $this->convert->shamsiToGregorian($this->date_time);
146 146
 
147 147
 							break;
148 148
 
149 149
 							case 'ghamari':
150 150
 
151
-								$this->date_time = $this->convert->ghamariToGregorian( $this->date_time );
151
+								$this->date_time = $this->convert->ghamariToGregorian($this->date_time);
152 152
 
153 153
 							break;
154 154
 
155 155
 						}
156 156
 
157
-						$this->result[ $this->date_time->format( 'Y-m-d' ) ][] =  $event;
157
+						$this->result[$this->date_time->format('Y-m-d')][] = $event;
158 158
 
159 159
 					}
160 160
 
161 161
 				}
162 162
 
163
-				ksort( $this->result );
163
+				ksort($this->result);
164 164
 
165 165
 		return $this;
166 166
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
 	public function international() {
182 182
 
183
-		$this->fetch( 'Global/global.php' );
183
+		$this->fetch('Global/global.php');
184 184
 
185 185
 		return $this;
186 186
 
Please login to merge, or discard this patch.
src/Events/Global/global.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      * @link http://www.un.org/en/sections/observances/international-days/
14 14
      */
15 15
     'events' => array(
16
-      1 => array( 27 => 'International Day of Commemoration in Memory of the Victims of the Holocaust' ),
16
+      1 => array(27 => 'International Day of Commemoration in Memory of the Victims of the Holocaust'),
17 17
       2 => array(
18 18
         4 => 'World Cancer Day',
19 19
         6 => 'International Day of Zero Tolerance to Female Genital Mutilation',
Please login to merge, or discard this patch.
src/Events/Localization/ir.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
      * as a arraye value
13 13
      */
14 14
     'events' => array(
15
-      1 => array( 1 => 'nowruz', 2 => 'nowruz', 3 => 'nowruz', 5 => 'nowruz' ),
16
-      10 => array( 22 => 'Iran revelution day' ),
17
-      12 => array( 29 => 'Iran oil national day' )
15
+      1 => array(1 => 'nowruz', 2 => 'nowruz', 3 => 'nowruz', 5 => 'nowruz'),
16
+      10 => array(22 => 'Iran revelution day'),
17
+      12 => array(29 => 'Iran oil national day')
18 18
     ),
19 19
 
20 20
 );
Please login to merge, or discard this patch.
src/Events/Localization/us.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@
 block discarded – undo
9 9
 
10 10
   'events' => array(
11 11
 
12
-    4  => array( 22 => 'Earth day' ),
12
+    4  => array(22 => 'Earth day'),
13 13
 
14
-    12 => array( 25 => 'Christmas' )
14
+    12 => array(25 => 'Christmas')
15 15
 
16 16
   )
17 17
 
Please login to merge, or discard this patch.