Browse Source

Merge pull request #4677 from dereuromark/3.0-translate

Add typehint for TranslateBehavior
ADmad 11 years ago
parent
commit
b88a0d8b7f
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/Model/Behavior/TranslateBehavior.php
  2. 1 1
      src/ORM/Behavior.php

+ 2 - 2
src/Model/Behavior/TranslateBehavior.php

@@ -71,7 +71,7 @@ class TranslateBehavior extends Behavior {
 /**
  * Constructor
  *
- * @param Table $table The table this behavior is attached to.
+ * @param \Cake\ORM\Table $table The table this behavior is attached to.
  * @param array $config The config for this behavior.
  */
 	public function __construct(Table $table, array $config = []) {
@@ -131,7 +131,7 @@ class TranslateBehavior extends Behavior {
  * @param \Cake\ORM\Query $query Query
  * @return void
  */
-	public function beforeFind(Event $event, $query) {
+	public function beforeFind(Event $event, Query $query) {
 		$locale = $this->locale();
 
 		if ($locale === $this->config('defaultLocale')) {

+ 1 - 1
src/ORM/Behavior.php

@@ -130,7 +130,7 @@ class Behavior implements EventListener {
  * Does not retain a reference to the Table object. If you need this
  * you should override the constructor.
  *
- * @param Table $table The table this behavior is attached to.
+ * @param \Cake\ORM\Table $table The table this behavior is attached to.
  * @param array $config The config for this behavior.
  */
 	public function __construct(Table $table, array $config = []) {