| 1 | <?php |
||
| 3 | class QueryCounterBehavior extends ModelBehavior { |
||
|
|
|||
| 4 | |||
| 5 | private $runtime = array(); // @codingStandardsIgnoreLine |
||
| 6 | |||
| 7 | /** |
||
| 8 | * beforeFind |
||
| 9 | * |
||
| 10 | * @param Model $model Model |
||
| 11 | * @param array $query Query |
||
| 12 | * @return mixed |
||
| 13 | */ |
||
| 14 | public function beforeFind(Model $model, $query) { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * afterFind |
||
| 23 | * |
||
| 24 | * @param Model $model Model |
||
| 25 | * @param array $results Results |
||
| 26 | * @param bool $primary Primary |
||
| 27 | * @return mixed |
||
| 28 | */ |
||
| 29 | public function afterFind(Model $model, $results, $primary = false) { |
||
| 45 | |||
| 46 | /** |
||
| 47 | * queryCount |
||
| 48 | * |
||
| 49 | * @param Model $model Model |
||
| 50 | * @return int |
||
| 51 | */ |
||
| 52 | public function queryCount(Model $model) { |
||
| 55 | |||
| 56 | } |
||
| 57 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.