File tree Expand file tree Collapse file tree 5 files changed +17
-11
lines changed
tests/Propel/Tests/Runtime/Util Expand file tree Collapse file tree 5 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 11includes :
22 - phpstan-baseline.neon
33parameters :
4- level : 5
4+ level : 6
55 checkGenericClassInNonGenericObjectType : false
66 checkMissingIterableValueType : false
77 paths :
Original file line number Diff line number Diff line change 88abstract class AbstractDataFetcher implements DataFetcherInterface
99{
1010 /**
11- * @var mixed
11+ * @var mixed|null
1212 */
1313 protected $ dataObject ;
1414
@@ -21,15 +21,17 @@ public function __construct($dataObject)
2121 }
2222
2323 /**
24- * @inheritDoc
24+ * @param mixed|null $dataObject
25+ *
26+ * @return void
2527 */
2628 public function setDataObject ($ dataObject )
2729 {
2830 $ this ->dataObject = $ dataObject ;
2931 }
3032
3133 /**
32- * @return \Propel\Runtime\DataFetcher\PDODataFetcher
34+ * @return mixed
3335 */
3436 public function getDataObject ()
3537 {
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public function getStyle()
6464 }
6565
6666 /**
67- * @param null $style
67+ * @param int| null $style
6868 *
6969 * @return array|null
7070 */
Original file line number Diff line number Diff line change @@ -49,20 +49,18 @@ protected static function isTimestamp($value)
4949 if (!is_numeric ($ value )) {
5050 return false ;
5151 }
52-
5352 if (strlen ((string )$ value ) === 8 ) {
5453 return false ;
5554 }
5655
57- $ stamp = strtotime ($ value );
58-
56+ $ stamp = strtotime ((string )$ value );
5957 if ($ stamp === false ) {
6058 return true ;
6159 }
6260
63- $ month = (int )date ('m ' , $ value );
64- $ day = (int )date ('d ' , $ value );
65- $ year = (int )date ('Y ' , $ value );
61+ $ month = (int )date ('m ' , ( int ) $ value );
62+ $ day = (int )date ('d ' , ( int ) $ value );
63+ $ year = (int )date ('Y ' , ( int ) $ value );
6664
6765 return checkdate ($ month , $ day , $ year );
6866 }
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ public function testIsTimestamp()
214214 {
215215 $ this ->assertEquals (false , TestPropelDateTime::isTimestamp ('20110325 ' ));
216216 $ this ->assertEquals (true , TestPropelDateTime::isTimestamp (1319580000 ));
217+ $ this ->assertEquals (true , TestPropelDateTime::isTimestamp ('1319580000 ' ));
217218 $ this ->assertEquals (false , TestPropelDateTime::isTimestamp ('2011-07-20 00:00:00 ' ));
218219 }
219220
@@ -246,6 +247,11 @@ public function testCreateHighPrecisioniTz()
246247
247248class TestPropelDateTime extends PropelDateTime
248249{
250+ /**
251+ * @param mixed $value
252+ *
253+ * @return bool
254+ */
249255 public static function isTimestamp ($ value )
250256 {
251257 return parent ::isTimestamp ($ value );
You can’t perform that action at this time.
0 commit comments