Completed
Push — master ( 106f43...23f28a )
by mehdi
02:19
created
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/CalendarSettings/Ghamari.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Convert.php 2 patches
Braces   +22 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,7 +112,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -63,6 +63,10 @@  discard block
 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 ) {
@@ -96,6 +100,7 @@  discard block
 block discarded – undo
96 100
 /**
97 101
    *convert shamsi year to gregorian year
98 102
    * @since Oct, 16 2015
103
+   * @param \DateTime $date_time
99 104
    * @return object
100 105
    */
101 106
 public function shamsiToGregorian( $date_time ) {
@@ -296,6 +301,7 @@  discard block
 block discarded – undo
296 301
   /**
297 302
     * convert ghamari year to gregorian year
298 303
     * @since Oct, 17 2015
304
+    * @param \DateTime $date_time
299 305
     * @return object
300 306
     */
301 307
   public function ghamariToGregorian( $date_time ) {
Please login to merge, or discard this patch.
src/CalendarSettings/Gregorian.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,9 @@
 block discarded – undo
131 131
 
132 132
      foreach( $config['month_days_number'] as $month => $value ) {
133 133
 
134
-       if ( $_month < $month ) $result += $value;
134
+       if ( $_month < $month ) {
135
+         $result += $value;
136
+       }
135 137
 
136 138
      }
137 139
 
Please login to merge, or discard this patch.
src/DayOf.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,9 @@  discard block
 block discarded – undo
91 91
 
92 92
     foreach ( $this->config['week_days_name']['persian'] as $key => $value ) {
93 93
 
94
-      if( $value == $this->day ) return $key += 1;
94
+      if( $value == $this->day ) {
95
+        return $key += 1;
96
+      }
95 97
 
96 98
     }
97 99
 
@@ -107,7 +109,9 @@  discard block
 block discarded – undo
107 109
 
108 110
     foreach ( $this->config['week_days_name']['islamic'] as $key => $value ) {
109 111
 
110
-      if( $value == $this->day ) return $key += 1;
112
+      if( $value == $this->day ) {
113
+        return $key += 1;
114
+      }
111 115
 
112 116
     }
113 117
 
Please login to merge, or discard this patch.
src/Datium.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
   /**
144 144
    * Get current datetime
145 145
    * @since Aug 17 2015
146
-   * @return object
146
+   * @return Datium
147 147
    */
148 148
   public static function now() {
149 149
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
    * @param $hour integer
162 162
    * @param $minute integer
163 163
    * @param $second integer
164
-   * @return object
164
+   * @return Datium
165 165
    */
166 166
   public static function create( $year = 2000, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0 ) {
167 167
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
   /**
231 231
    * Add new date value to current date
232 232
    * @param $value string
233
-   * @return object
233
+   * @return Datium
234 234
    */
235 235
   public function add( $value ) {
236 236
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
   /**
248 248
    * Sub date from current date
249 249
    * @param $value
250
-   * @return obejct
250
+   * @return Datium
251 251
    */
252 252
   public function sub( $value ) {
253 253
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
   /**
265 265
    * Check if current year is leap or not
266
-   * @return boolean
266
+   * @return Leap
267 267
    */
268 268
   public function leap( $type = 'gregorian') {
269 269
 
Please login to merge, or discard this patch.
src/CalendarSettings/Shamsi.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,9 @@
 block discarded – undo
131 131
 
132 132
     foreach( $config['month_days_number'] as $_month => $value ) {
133 133
 
134
-      if ( $_month < $month ) $result += $value;
134
+      if ( $_month < $month ) {
135
+        $result += $value;
136
+      }
135 137
 
136 138
     }
137 139
 
Please login to merge, or discard this patch.