| @@ -80,7 +80,9 @@ discard block | ||
| 80 | 80 | |
| 81 | 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 ) { | |
| 84 | + $this->result += $value; | |
| 85 | + } | |
| 84 | 86 | |
| 85 | 87 | } | 
| 86 | 88 | |
| @@ -103,7 +105,9 @@ discard block | ||
| 103 | 105 | |
| 104 | 106 |      foreach( $this->config['islamic_month_days'] as $month => $value ) { | 
| 105 | 107 | |
| 106 | - if ( $month < $this->month ) $this->result += $value; | |
| 108 | +      if ( $month < $this->month ) { | |
| 109 | + $this->result += $value; | |
| 110 | + } | |
| 107 | 111 | |
| 108 | 112 | } | 
| 109 | 113 | |
| @@ -155,7 +159,9 @@ discard block | ||
| 155 | 159 | |
| 156 | 160 |      foreach ( $this->config['week_days_name']['persian'] as $key => $value ) { | 
| 157 | 161 | |
| 158 | - if( $value == $this->day ) return $key += 1; | |
| 162 | +      if( $value == $this->day ) { | |
| 163 | + return $key += 1; | |
| 164 | + } | |
| 159 | 165 | |
| 160 | 166 | } | 
| 161 | 167 | |
| @@ -171,7 +177,9 @@ discard block | ||
| 171 | 177 | |
| 172 | 178 |      foreach ( $this->config['week_days_name']['islamic'] as $key => $value ) { | 
| 173 | 179 | |
| 174 | - if( $value == $this->day ) return $key += 1; | |
| 180 | +      if( $value == $this->day ) { | |
| 181 | + return $key += 1; | |
| 182 | + } | |
| 175 | 183 | |
| 176 | 184 | } | 
| 177 | 185 | |
| @@ -34,7 +34,9 @@ discard block | ||
| 34 | 34 | |
| 35 | 35 | $leap = new Datium\Tools\Leap( $year ); | 
| 36 | 36 | |
| 37 | - if( $leap->get() && $month > 11 ) $temp_day++; | |
| 37 | +     if( $leap->get() && $month > 11 ) { | |
| 38 | + $temp_day++; | |
| 39 | + } | |
| 38 | 40 | |
| 39 | 41 | $_year = ( ( ( ( ( $year - 1 ) * 365.2422 ) + $temp_day ) - 119) / 354.3670 ) + 1; | 
| 40 | 42 | |
| @@ -110,7 +112,9 @@ discard block | ||
| 110 | 112 | |
| 111 | 113 |       foreach ( $config['month_days_number'] as $month => $value ) { | 
| 112 | 114 | |
| 113 | - if( $month > $month ) $days_of_year += $value; | |
| 115 | +       if( $month > $month ) { | |
| 116 | + $days_of_year += $value; | |
| 117 | + } | |
| 114 | 118 | |
| 115 | 119 | } | 
| 116 | 120 | |
| @@ -112,7 +112,9 @@ discard block | ||
| 112 | 112 | |
| 113 | 113 |  foreach ( $this->config['shamsi_month_days'] as $month => $value ) { | 
| 114 | 114 | |
| 115 | - if( $this->month > $month ) $days_of_year += $value; | |
| 115 | +  if( $this->month > $month ) { | |
| 116 | + $days_of_year += $value; | |
| 117 | + } | |
| 116 | 118 | |
| 117 | 119 | } | 
| 118 | 120 | |
| @@ -128,9 +130,7 @@ discard block | ||
| 128 | 130 | |
| 129 | 131 | $days_of_gregorain_years = $days_of_gregorain_years - intval( ( ( $this->year + 621 ) / 4 ) ); | 
| 130 | 132 | |
| 131 | -} | |
| 132 | - | |
| 133 | -elseif ( ( ( 10 == $this->month ) && ( $this->day > 10 ) ) || ( $this->month > 10 ) ) { | |
| 133 | +} elseif ( ( ( 10 == $this->month ) && ( $this->day > 10 ) ) || ( $this->month > 10 ) ) { | |
| 134 | 134 | |
| 135 | 135 | $days_of_gregorain_years = $days_of_gregorain_years - intval( ( ( $this->year + 622 ) / 4 ) ); | 
| 136 | 136 | |
| @@ -142,7 +142,9 @@ discard block | ||
| 142 | 142 | |
| 143 | 143 |  foreach ($this->config['gregorian_month_days'] as $month => $value) { | 
| 144 | 144 | |
| 145 | - if ( $gregorian_month < $value ) break; | |
| 145 | +  if ( $gregorian_month < $value ) { | |
| 146 | + break; | |
| 147 | + } | |
| 146 | 148 | |
| 147 | 149 | $gregorian_month -= $value; | 
| 148 | 150 | } | 
| @@ -185,7 +187,9 @@ discard block | ||
| 185 | 187 | |
| 186 | 188 | $this->leap = new Leap( $this->year ); | 
| 187 | 189 | |
| 188 | - if( $this->leap->get() && $this->month > 11 ) $this->temp_day++; | |
| 190 | +    if( $this->leap->get() && $this->month > 11 ) { | |
| 191 | + $this->temp_day++; | |
| 192 | + } | |
| 189 | 193 | |
| 190 | 194 | $_year = ( ( ( ( ( $this->year - 1 ) * 365.2422 ) + $this->temp_day ) - 119) / 354.3670 ) + 1; | 
| 191 | 195 | |
| @@ -258,7 +262,9 @@ discard block | ||
| 258 | 262 | |
| 259 | 263 |  foreach ( $this->config['islamic_month_days'] as $month => $value ) { | 
| 260 | 264 | |
| 261 | - if( $this->month > $month ) $days_of_year += $value; | |
| 265 | +  if( $this->month > $month ) { | |
| 266 | + $days_of_year += $value; | |
| 267 | + } | |
| 262 | 268 | |
| 263 | 269 | } | 
| 264 | 270 | |
| @@ -278,7 +284,9 @@ discard block | ||
| 278 | 284 | |
| 279 | 285 |  foreach ($this->config['shamsi_month_days'] as $month => $value) { | 
| 280 | 286 | |
| 281 | - if ( $shamsi_month < $value ) break; | |
| 287 | +  if ( $shamsi_month < $value ) { | |
| 288 | + break; | |
| 289 | + } | |
| 282 | 290 | |
| 283 | 291 | $shamsi_month -= $value; | 
| 284 | 292 | } | 
| @@ -312,7 +320,9 @@ discard block | ||
| 312 | 320 | |
| 313 | 321 |      foreach ( $this->config['islamic_month_days'] as $month => $value ) { | 
| 314 | 322 | |
| 315 | - if( $this->month > $month ) $days_of_year += $value; | |
| 323 | +      if( $this->month > $month ) { | |
| 324 | + $days_of_year += $value; | |
| 325 | + } | |
| 316 | 326 | |
| 317 | 327 | } | 
| 318 | 328 | |
| @@ -332,7 +342,9 @@ discard block | ||
| 332 | 342 | |
| 333 | 343 |      foreach ($this->config['gregorian_month_days'] as $month => $value) { | 
| 334 | 344 | |
| 335 | - if ( $gregorian_month < $value ) break; | |
| 345 | +      if ( $gregorian_month < $value ) { | |
| 346 | + break; | |
| 347 | + } | |
| 336 | 348 | |
| 337 | 349 | $gregorian_month -= $value; | 
| 338 | 350 | } |