File tree 7 files changed +17
-23
lines changed
tests/_data/console/app/models/files
7 files changed +17
-23
lines changed Original file line number Diff line number Diff line change
1
+ # [ 4.0.6] ( https://github.com/phalcon/cphalcon/releases/tag/v4.0.6 )
2
+ ## Fixed
3
+ - Fixed model findFirst return type error [ #1478 ] ( https://github.com/phalcon/phalcon-devtools/issues/1478 )
4
+
1
5
# [ 4.0.5] ( https://github.com/phalcon/cphalcon/releases/tag/v4.0.5 ) (2021-03-14)
2
6
## Fixed
3
7
- Fixed model creation failure in webtools due to wrong variable mutation [ #1415 ] ( https://github.com/phalcon/phalcon-devtools/issues/1415 )
Original file line number Diff line number Diff line change @@ -265,9 +265,9 @@ public function getModelFindFirst($className)
265
265
* Allows to query the first record that match the specified conditions
266
266
*
267
267
* @param mixed \$parameters
268
- * @return %s|\Phalcon\Mvc\Model\ResultInterface
268
+ * @return %s|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null
269
269
*/
270
- public static function findFirst( \$parameters = null)
270
+ public static function findFirst( \$parameters = null): ?\Phalcon\Mvc\ModelInterface
271
271
{
272
272
return parent::findFirst( \$parameters);
273
273
}
Original file line number Diff line number Diff line change @@ -57,9 +57,9 @@ public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInt
57
57
* Allows to query the first record that match the specified conditions
58
58
*
59
59
* @param mixed $parameters
60
- * @return TestModel|\Phalcon\Mvc\Model\ResultInterface
60
+ * @return TestModel|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null
61
61
*/
62
- public static function findFirst ($ parameters = null )
62
+ public static function findFirst ($ parameters = null ): ? \ Phalcon \ Mvc \ ModelInterface
63
63
{
64
64
return parent ::findFirst ($ parameters );
65
65
}
Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInt
43
43
* Allows to query the first record that match the specified conditions
44
44
*
45
45
* @param mixed $parameters
46
- * @return TestModel2|\Phalcon\Mvc\Model\ResultInterface
46
+ * @return TestModel2|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null
47
47
*/
48
- public static function findFirst ($ parameters = null )
48
+ public static function findFirst ($ parameters = null ): ? \ Phalcon \ Mvc \ ModelInterface
49
49
{
50
50
return parent ::findFirst ($ parameters );
51
51
}
Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInt
43
43
* Allows to query the first record that match the specified conditions
44
44
*
45
45
* @param mixed $parameters
46
- * @return TestModel3|\Phalcon\Mvc\Model\ResultInterface
46
+ * @return TestModel3|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null
47
47
*/
48
- public static function findFirst ($ parameters = null )
48
+ public static function findFirst ($ parameters = null ): ? \ Phalcon \ Mvc \ ModelInterface
49
49
{
50
50
return parent ::findFirst ($ parameters );
51
51
}
Original file line number Diff line number Diff line change @@ -27,23 +27,13 @@ public function initialize()
27
27
$ this ->setSource ("TestModel5 " );
28
28
}
29
29
30
- /**
31
- * Returns table name mapped in the model.
32
- *
33
- * @return string
34
- */
35
- public function getSource ()
36
- {
37
- return 'TestModel5 ' ;
38
- }
39
-
40
30
/**
41
31
* Allows to query a set of records that match the specified conditions
42
32
*
43
33
* @param mixed $parameters
44
34
* @return TestModel5[]|TestModel5|\Phalcon\Mvc\Model\ResultSetInterface
45
35
*/
46
- public static function find ($ parameters = null )
36
+ public static function find ($ parameters = null ): \ Phalcon \ Mvc \ Model \ ResultsetInterface
47
37
{
48
38
return parent ::find ($ parameters );
49
39
}
@@ -52,9 +42,9 @@ public static function find($parameters = null)
52
42
* Allows to query the first record that match the specified conditions
53
43
*
54
44
* @param mixed $parameters
55
- * @return TestModel5|\Phalcon\Mvc\Model\ResultInterface
45
+ * @return TestModel5|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null
56
46
*/
57
- public static function findFirst ($ parameters = null )
47
+ public static function findFirst ($ parameters = null ): ? \ Phalcon \ Mvc \ ModelInterface
58
48
{
59
49
return parent ::findFirst ($ parameters );
60
50
}
Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInt
43
43
* Allows to query the first record that match the specified conditions
44
44
*
45
45
* @param mixed $parameters
46
- * @return Testmodel4|\Phalcon\Mvc\Model\ResultInterface
46
+ * @return Testmodel4|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null
47
47
*/
48
- public static function findFirst ($ parameters = null )
48
+ public static function findFirst ($ parameters = null ): ? \ Phalcon \ Mvc \ ModelInterface
49
49
{
50
50
return parent ::findFirst ($ parameters );
51
51
}
You can’t perform that action at this time.
0 commit comments