Browse Source

Change method visibility from public to protected

chinpei215 9 years ago
parent
commit
5ab3f67399

+ 1 - 1
src/Mailer/MailerAwareTrait.php

@@ -35,7 +35,7 @@ trait MailerAwareTrait
      * @return \Cake\Mailer\Mailer
      * @return \Cake\Mailer\Mailer
      * @throws \Cake\Mailer\Exception\MissingMailerException if undefined mailer class.
      * @throws \Cake\Mailer\Exception\MissingMailerException if undefined mailer class.
      */
      */
-    public function getMailer($name, Email $email = null)
+    protected function getMailer($name, Email $email = null)
     {
     {
         if ($email === null) {
         if ($email === null) {
             $email = new Email();
             $email = new Email();

+ 1 - 1
src/View/CellTrait.php

@@ -55,7 +55,7 @@ trait CellTrait
      * @throws \Cake\View\Exception\MissingCellException If Cell class was not found.
      * @throws \Cake\View\Exception\MissingCellException If Cell class was not found.
      * @throws \BadMethodCallException If Cell class does not specified cell action.
      * @throws \BadMethodCallException If Cell class does not specified cell action.
      */
      */
-    public function cell($cell, array $data = [], array $options = [])
+    protected function cell($cell, array $data = [], array $options = [])
     {
     {
         $parts = explode('::', $cell);
         $parts = explode('::', $cell);
 
 

+ 3 - 1
src/View/View.php

@@ -73,7 +73,9 @@ use RuntimeException;
 class View implements EventDispatcherInterface
 class View implements EventDispatcherInterface
 {
 {
 
 
-    use CellTrait;
+    use CellTrait {
+        cell as public;
+    }
     use EventDispatcherTrait;
     use EventDispatcherTrait;
     use LogTrait;
     use LogTrait;
     use RequestActionTrait;
     use RequestActionTrait;

+ 3 - 1
tests/TestCase/Mailer/MailerAwareTraitTest.php

@@ -23,7 +23,9 @@ use Cake\TestSuite\TestCase;
 class Stub
 class Stub
 {
 {
 
 
-    use MailerAwareTrait;
+    use MailerAwareTrait {
+        getMailer as public;
+    }
 }
 }
 
 
 /**
 /**