Browse Source

Merge pull request #17301 from cakephp/5.x-cleanup

Fix up exception message and docs.
Mark Story 2 years ago
parent
commit
00480a818a

+ 1 - 1
src/Controller/Controller.php

@@ -778,7 +778,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface
                 }
             }
 
-            throw new NotFoundException();
+            throw new NotFoundException(sprintf('View class for `%s` extension not found', $ext));
         }
 
         // Use accept header based negotiation.

+ 2 - 2
src/Datasource/ModelAwareTrait.php

@@ -25,8 +25,8 @@ use function Cake\Core\pluginSplit;
  * Provides functionality for loading table classes
  * and other repositories onto properties of the host object.
  *
- * Example users of this trait are Cake\Controller\Controller and
- * Cake\Console\Shell.
+ * Example users of this trait are {@link \Cake\Controller\Controller} and
+ * {@link \Cake\Command\Command}.
  */
 trait ModelAwareTrait
 {

+ 2 - 2
src/Error/ExceptionTrap.php

@@ -124,8 +124,8 @@ class ExceptionTrap
         if (is_string($class)) {
             if (!is_subclass_of($class, ExceptionRendererInterface::class)) {
                 throw new InvalidArgumentException(
-                    "Cannot use {$class} as an `exceptionRenderer`. " .
-                    'It must be an instance of Cake\Error\ExceptionRendererInterface.'
+                    "Cannot use `{$class}` as an `exceptionRenderer`. " .
+                    'It must be an instance of `Cake\Error\ExceptionRendererInterface`.'
                 );
             }
 

+ 2 - 2
src/Routing/Router.php

@@ -599,7 +599,7 @@ class Router
      * handled in order to reverse a params array into a string URL.
      *
      * @param \Cake\Http\ServerRequest|array $params The params array or
-     *     Cake\Http\ServerRequest object that needs to be reversed.
+     *     {@link \Cake\Http\ServerRequest} object that needs to be reversed.
      * @return array The URL array ready to be used for redirect or HTML link.
      */
     public static function reverseToArray(ServerRequest|array $params): array
@@ -649,7 +649,7 @@ class Router
      * handled in order to reverse a params array into a string URL.
      *
      * @param \Cake\Http\ServerRequest|array $params The params array or
-     *     Cake\Http\ServerRequest object that needs to be reversed.
+     *     {@link \Cake\Http\ServerRequest} object that needs to be reversed.
      * @param bool $full Set to true to include the full URL including the
      *     protocol when reversing the URL.
      * @return string The string that is the reversed result of the array

+ 1 - 1
src/View/Form/ArrayContext.php

@@ -35,7 +35,7 @@ use function Cake\I18n\__d;
  *   flags to indicate a field is required. The value can also be a string to be used
  *   as the required error message
  * - `schema` An array of data that emulate the column structures that
- *   Cake\Database\Schema\Schema uses. This array allows you to control
+ *   {@link \Cake\Database\Schema\TableSchema} uses. This array allows you to control
  *   the inferred type for fields and allows auto generation of attributes
  *   like maxlength, step and other HTML attributes. If you want
  *   primary key/id detection to work. Make sure you have provided a `_constraints`