Completed
Push — master ( 4ac624...f91529 )
by mehdi
06:08
created
src/Convert.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -63,6 +63,10 @@
 block discarded – undo
63 63
    *
64 64
    *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
65 65
    */
66
+
67
+  /**
68
+   * @param \DateTime $date_time
69
+   */
66 70
   public function __construct( $date_time = NULL ) {
67 71
 
68 72
     if ( $date_time !== NULL ) {
Please login to merge, or discard this patch.
Braces   +22 added lines, -10 removed lines patch added patch discarded remove patch
@@ -120,7 +120,9 @@  discard block
 block discarded – undo
120 120
 
121 121
 foreach ( $this->config['month_days_number'] as $month => $value ) {
122 122
 
123
-  if( $this->month > $month ) $days_of_year += $value;
123
+  if( $this->month > $month ) {
124
+    $days_of_year += $value;
125
+  }
124 126
 
125 127
 }
126 128
 
@@ -136,9 +138,7 @@  discard block
 block discarded – undo
136 138
 
137 139
 $days_of_gregorain_years = $days_of_gregorain_years - intval( ( ( $this->year + 621 ) / 4 ) );
138 140
 
139
-}
140
-
141
-elseif ( ( ( 10 == $this->month ) && ( $this->day > 10 ) ) || ( $this->month > 10 ) ) {
141
+} elseif ( ( ( 10 == $this->month ) && ( $this->day > 10 ) ) || ( $this->month > 10 ) ) {
142 142
 
143 143
 $days_of_gregorain_years = $days_of_gregorain_years - intval( ( ( $this->year + 622 ) / 4 ) );
144 144
 
@@ -152,7 +152,9 @@  discard block
 block discarded – undo
152 152
 
153 153
 foreach ($this->config['month_days_number'] as $month => $value) {
154 154
 
155
-  if ( $gregorian_month < $value ) break;
155
+  if ( $gregorian_month < $value ) {
156
+    break;
157
+  }
156 158
 
157 159
     $gregorian_month -= $value;
158 160
 }
@@ -197,7 +199,9 @@  discard block
 block discarded – undo
197 199
 
198 200
      $this->leap = new Leap( $this->year );
199 201
 
200
-    if( $this->leap->get() && $this->month > 11 ) $this->temp_day++;
202
+    if( $this->leap->get() && $this->month > 11 ) {
203
+      $this->temp_day++;
204
+    }
201 205
 
202 206
     $_year = ( ( ( ( ( $this->year - 1 ) * 365.2422 ) + $this->temp_day ) - 119) / 354.3670 ) + 1;
203 207
 
@@ -272,7 +276,9 @@  discard block
 block discarded – undo
272 276
 
273 277
 foreach ( $this->config['month_days_number'] as $month => $value ) {
274 278
 
275
-  if( $this->month > $month ) $days_of_year += $value;
279
+  if( $this->month > $month ) {
280
+    $days_of_year += $value;
281
+  }
276 282
 
277 283
 }
278 284
 
@@ -294,7 +300,9 @@  discard block
 block discarded – undo
294 300
 
295 301
 foreach ($this->config['month_days_number'] as $month => $value) {
296 302
 
297
-  if ( $jalali_month < $value ) break;
303
+  if ( $jalali_month < $value ) {
304
+    break;
305
+  }
298 306
 
299 307
     $jalali_month -= $value;
300 308
 }
@@ -330,7 +338,9 @@  discard block
 block discarded – undo
330 338
 
331 339
     foreach ( $this->config['month_days_number'] as $month => $value ) {
332 340
 
333
-      if( $this->month > $month ) $days_of_year += $value;
341
+      if( $this->month > $month ) {
342
+        $days_of_year += $value;
343
+      }
334 344
 
335 345
     }
336 346
 
@@ -352,7 +362,9 @@  discard block
 block discarded – undo
352 362
 
353 363
     foreach ($this->config['month_days_number'] as $month => $value) {
354 364
 
355
-      if ( $gregorian_month < $value ) break;
365
+      if ( $gregorian_month < $value ) {
366
+        break;
367
+      }
356 368
 
357 369
         $gregorian_month -= $value;
358 370
     }
Please login to merge, or discard this patch.
src/Events/Events.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -56,6 +56,10 @@
 block discarded – undo
56 56
 	 *
57 57
 	 *\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
58 58
 	 */
59
+
60
+	/**
61
+	 * @param string $path
62
+	 */
59 63
 	private function fetch( $path ) {
60 64
 
61 65
 		$this->events = include( $path );
Please login to merge, or discard this patch.
src/Leap.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
   /**
101 101
    * check the ghamari year is leap or not
102 102
    * @since Oct, 24 2015
103
-   * @return boolean
103
+   * @return integer|null
104 104
    */
105 105
   public function ghamariLeapYear() {
106 106
 
Please login to merge, or discard this patch.
vendor/composer/ClassLoader.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -341,6 +341,10 @@
 block discarded – undo
341 341
         return $file;
342 342
     }
343 343
 
344
+    /**
345
+     * @param string $class
346
+     * @param string $ext
347
+     */
344 348
     private function findFileWithExtension($class, $ext)
345 349
     {
346 350
         // PSR-4 lookup
Please login to merge, or discard this patch.
src/Datium.php 2 patches
Doc Comments   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
   /**
139 139
    * Get current datetime
140 140
    * @since Aug 17 2015
141
-   * @return object
141
+   * @return Datium
142 142
    */
143 143
   public static function now() {
144 144
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
    * @param $hour integer
157 157
    * @param $minute integer
158 158
    * @param $second integer
159
-   * @return object
159
+   * @return Datium
160 160
    */
161 161
   public static function create( $year = 2000, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0 ) {
162 162
 
@@ -195,6 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
   /**
197 197
    * Convert from current calendar, what type is current calendar?
198
+   * @param string $calendar
198 199
    */
199 200
   public function from( $calendar ) {
200 201
 
@@ -213,6 +214,9 @@  discard block
 block discarded – undo
213 214
 
214 215
   }
215 216
 
217
+  /**
218
+   * @param string $calendar
219
+   */
216 220
   public function to( $calendar ) {
217 221
 
218 222
     $this->convert = new Convert( $this->date_time );
@@ -245,7 +249,7 @@  discard block
 block discarded – undo
245 249
   /**
246 250
    * Add new date value to current date
247 251
    * @param $value string
248
-   * @return object
252
+   * @return Datium
249 253
    */
250 254
   public function add( $value ) {
251 255
 
@@ -262,7 +266,7 @@  discard block
 block discarded – undo
262 266
   /**
263 267
    * Sub date from current date
264 268
    * @param $value
265
-   * @return obejct
269
+   * @return Datium
266 270
    */
267 271
   public function sub( $value ) {
268 272
 
@@ -278,7 +282,7 @@  discard block
 block discarded – undo
278 282
 
279 283
   /**
280 284
    * Check if current year is leap or not
281
-   * @return boolean
285
+   * @return Leap
282 286
    */
283 287
   public function leap( $type = 'gregorian') {
284 288
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -358,11 +358,13 @@
 block discarded – undo
358 358
    */
359 359
   public function get( $format = 'Y-m-d H:i:s' ) {
360 360
 
361
-    if ( is_null( $this->fromConfig ) )
362
-      $this->fromConfig = include( 'CalendarSettings/' . ucfirst( $this->translate_from ) . '.php' );
361
+    if ( is_null( $this->fromConfig ) ) {
362
+          $this->fromConfig = include( 'CalendarSettings/' . ucfirst( $this->translate_from ) . '.php' );
363
+    }
363 364
 
364
-    if ( is_null( $this->toConfig ) )
365
-        $this->toConfig = include( 'CalendarSettings/' . ucfirst( $this->translate_to ) . '.php' );
365
+    if ( is_null( $this->toConfig ) ) {
366
+            $this->toConfig = include( 'CalendarSettings/' . ucfirst( $this->translate_to ) . '.php' );
367
+    }
366 368
 
367 369
       $string_date = $this->date_time->format( $format );
368 370
 
Please login to merge, or discard this patch.
src/CalendarSettings/Gregorian.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,7 +137,9 @@  discard block
 block discarded – undo
137 137
 
138 138
      foreach( $config['month_days_number'] as $_month => $value ) {
139 139
 
140
-       if ( $_month < $month ) $result += $value;
140
+       if ( $_month < $month ) {
141
+         $result += $value;
142
+       }
141 143
 
142 144
      }
143 145
 
@@ -155,7 +157,9 @@  discard block
 block discarded – undo
155 157
 
156 158
     foreach ($config['days_of_week'] as $key => $value) {
157 159
 
158
-      if ( $value == $day ) return $key += 1;
160
+      if ( $value == $day ) {
161
+        return $key += 1;
162
+      }
159 163
 
160 164
     }
161 165
 
Please login to merge, or discard this patch.