Completed
Push — master ( 23f28a...d5f8b0 )
by mehdi
02:00
created
src/CalendarSettings/Gregorian.php 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
- use Datium\Datium as Datium;
3
+  use Datium\Datium as Datium;
4 4
 
5
- return array (
5
+  return array (
6 6
 
7
- /************************************************************
7
+  /************************************************************
8 8
   *                        Convert to
9 9
   ************************************************************
10 10
   *
@@ -12,13 +12,13 @@  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 null;
17
+      return null;
18 18
 
19
-   },
19
+    },
20 20
 
21
-   /************************************************************
21
+    /************************************************************
22 22
     *                        Convert From
23 23
     ************************************************************
24 24
     *
@@ -26,13 +26,13 @@  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 null;
31
+      return null;
32 32
 
33
-   },
33
+    },
34 34
 
35
-   /************************************************************
35
+    /************************************************************
36 36
     *               Shorthand for jalali calendar
37 37
     ************************************************************
38 38
     *
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
     *
41 41
     *\_________________________________________________________/
42 42
     */
43
-   'shorthand' => 'gr',
43
+    'shorthand' => 'gr',
44 44
 
45
-   /************************************************************
45
+    /************************************************************
46 46
     *                        Month's name
47 47
     ************************************************************
48 48
     *
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 
77 77
       'December'
78 78
 
79
-     ),
79
+      ),
80 80
 
81
-   /************************************************************
81
+    /************************************************************
82 82
     *                        Days of Week
83 83
     ************************************************************
84 84
     *
@@ -87,63 +87,63 @@  discard block
 block discarded – undo
87 87
     *
88 88
     *\_________________________________________________________/
89 89
     */
90
-   'days_of_week' => array (
90
+    'days_of_week' => array (
91 91
 
92
-   'Saturday',
92
+    'Saturday',
93 93
 
94
-   'Sunday',
94
+    'Sunday',
95 95
 
96
-   'Monday',
96
+    'Monday',
97 97
 
98
-   'Tuesday',
98
+    'Tuesday',
99 99
 
100
-   'Wednesday',
100
+    'Wednesday',
101 101
 
102
-   'Thursday',
102
+    'Thursday',
103 103
 
104
-   'Friday'
104
+    'Friday'
105 105
 
106
-   ),
106
+    ),
107 107
 
108
-   'month_days_number' => array(   1 => 31,
109
-                                   2 => 28,
110
-                                   3 => 31,
111
-                                   4 => 30,
112
-                                   5 => 31,
113
-                                   6 => 30,
114
-                                   7 => 31,
115
-                                   8 => 31,
116
-                                   9 => 30,
117
-                                   10 => 31,
118
-                                   11 => 30,
119
-                                   12 => 30 ),
108
+    'month_days_number' => array(   1 => 31,
109
+                                    2 => 28,
110
+                                    3 => 31,
111
+                                    4 => 30,
112
+                                    5 => 31,
113
+                                    6 => 30,
114
+                                    7 => 31,
115
+                                    8 => 31,
116
+                                    9 => 30,
117
+                                    10 => 31,
118
+                                    11 => 30,
119
+                                    12 => 30 ),
120 120
 
121 121
 
122
-   'day_of_year' => function( $date_time ) {
122
+    'day_of_year' => function( $date_time ) {
123 123
 
124
-     $result = null;
124
+      $result = null;
125 125
 
126
-     $_month = null;
126
+      $_month = null;
127 127
 
128
-     $config = include( 'Gregorian.php' );
128
+      $config = include( 'Gregorian.php' );
129 129
 
130
-     $month = $date_time->format('n');
130
+      $month = $date_time->format('n');
131 131
 
132
-     $day = $date_time->format('d');
132
+      $day = $date_time->format('d');
133 133
 
134
-     foreach( $config['month_days_number'] as $_month => $value ) {
134
+      foreach( $config['month_days_number'] as $_month => $value ) {
135 135
 
136
-       if ( $_month < $month ) $result += $value;
136
+        if ( $_month < $month ) $result += $value;
137 137
 
138
-     }
138
+      }
139 139
 
140
-     $result += $day;
140
+      $result += $day;
141 141
 
142
-     return $result;
142
+      return $result;
143 143
 
144
-   },
144
+    },
145 145
 
146
-   /************************************************************
146
+    /************************************************************
147 147
     *                       Leap year
148 148
     ************************************************************
149 149
     *
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
     *
152 152
     *\_________________________________________________________/
153 153
     */
154
-   'leap_year' => null,
154
+    'leap_year' => null,
155 155
 
156
-   /************************************************************
156
+    /************************************************************
157 157
     *                        Weekend
158 158
     ************************************************************
159 159
     *
@@ -161,6 +161,6 @@  discard block
 block discarded – undo
161 161
     *
162 162
     *\_________________________________________________________/
163 163
     */
164
-   'weekend' => array( 'friday' )
164
+    'weekend' => array( 'friday' )
165 165
 
166 166
   );
Please login to merge, or discard this patch.