Completed
Push — master ( 0fe70c...966b09 )
by mehdi
02:16
created
src/CalendarSettings/Shamsi.php 1 patch
Spacing   +20 added lines, -20 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
     'Yekshanbe',
92 92
     'Doshanbe',
93 93
     'Seshanbe',
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
   'start_day_of_week' => 'Shanbe',
101 101
 
102
-  'month_days_number' => array(      1 => 31,
102
+  'month_days_number' => array(1 => 31,
103 103
                                      2 => 31,
104 104
                                      3 => 31,
105 105
                                      4 => 31,
@@ -110,22 +110,22 @@  discard block
 block discarded – undo
110 110
                                      9 => 30,
111 111
                                      10 => 30,
112 112
                                      11 => 30,
113
-                                     12 => 29 ),
113
+                                     12 => 29),
114 114
 
115 115
 
116
-  'day_of_year' => function( $date_time ) {
116
+  'day_of_year' => function($date_time) {
117 117
 
118 118
     $result = null;
119 119
 
120
-    $config = include( 'Shamsi.php' );
120
+    $config = include('Shamsi.php');
121 121
 
122 122
     $month = $date_time->format('n');
123 123
 
124 124
     $day = $date_time->format('d');
125 125
 
126
-    foreach( $config['month_days_number'] as $_month => $value ) {
126
+    foreach ($config['month_days_number'] as $_month => $value) {
127 127
 
128
-      if ( $_month < $month ) $result += $value;
128
+      if ($_month < $month) $result += $value;
129 129
 
130 130
     }
131 131
 
@@ -135,19 +135,19 @@  discard block
 block discarded – undo
135 135
 
136 136
   },
137 137
 
138
-  'day_of_week' => function( $date_time ) {
138
+  'day_of_week' => function($date_time) {
139 139
 
140
-        $configShamsi = include(  'Shamsi.php' );
140
+        $configShamsi = include('Shamsi.php');
141 141
 
142
-        $configGregorian = include( 'Gregorian.php' );
142
+        $configGregorian = include('Gregorian.php');
143 143
 
144 144
         $day = $date_time->format('l');
145 145
 
146
-        $day = str_replace( $configGregorian['days_of_week'], $configShamsi['days_of_week'], $day );
146
+        $day = str_replace($configGregorian['days_of_week'], $configShamsi['days_of_week'], $day);
147 147
 
148
-        foreach ( $configShamsi['days_of_week'] as $key => $value ) {
148
+        foreach ($configShamsi['days_of_week'] as $key => $value) {
149 149
 
150
-          if( $value == $day ) {
150
+          if ($value == $day) {
151 151
 
152 152
               return $key += 1;
153 153
 
@@ -177,6 +177,6 @@  discard block
 block discarded – undo
177 177
    *
178 178
    *\_________________________________________________________/
179 179
    */
180
-  'weekend' => array( 'friday' )
180
+  'weekend' => array('friday')
181 181
 
182 182
  );
Please login to merge, or discard this patch.