Skip to content

Commit b3d5de4

Browse files
committed
Use maps instead of key/value annotation syntax
1 parent 3971073 commit b3d5de4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/main/php/rdbms/finder/Finder.class.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
use lang\MethodNotImplementedException;
77

8-
98
/**
109
* A finder is a collection of criteria for a given rdbms.Peer object.
1110
*
@@ -147,7 +146,7 @@ public function method($name) {
147146
*
148147
* @return rdbms.Criteria
149148
*/
150-
#[@finder(kind= COLLECTION)]
149+
#[@finder(['kind' => COLLECTION])]
151150
public function all() {
152151
return new \rdbms\Criteria();
153152
}

src/test/php/rdbms/unittest/dataset/JobFinder.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function getPeer() {
2626
* @param int pk the job_id
2727
* @return rdbms.Criteria
2828
*/
29-
#[@finder(kind= ENTITY)]
29+
#[@finder(['kind' => ENTITY])]
3030
public function byPrimary($pk) {
3131
return new \rdbms\Criteria(['job_id', $pk, EQUAL]);
3232
}
@@ -36,7 +36,7 @@ public function byPrimary($pk) {
3636
*
3737
* @return rdbms.Criteria
3838
*/
39-
#[@finder(kind= COLLECTION)]
39+
#[@finder(['kind' => COLLECTION])]
4040
public function newestJobs() {
4141
return (new \rdbms\Criteria())->addOrderBy('valid_from', DESCENDING);
4242
}
@@ -46,7 +46,7 @@ public function newestJobs() {
4646
*
4747
* @return rdbms.Criteria
4848
*/
49-
#[@finder(kind= COLLECTION)]
49+
#[@finder(['kind' => COLLECTION])]
5050
public function expiredJobs() {
5151
return new \rdbms\Criteria(['expire_at', \util\Date::now(), GREATER_THAN]);
5252
}
@@ -57,7 +57,7 @@ public function expiredJobs() {
5757
* @param string title
5858
* @return rdbms.Criteria
5959
*/
60-
#[@finder(kind= COLLECTION)]
60+
#[@finder(['kind' => COLLECTION])]
6161
public function similarTo($title) {
6262
return new Statement('select object(j) from job j where title like %s', $title.'%');
6363
}

0 commit comments

Comments
 (0)