CoreFiles by mySites.guru
ResultTypeMixedAware.php42 lines, 1,165 bytes, from Joomla_5.4.9-Stable-Full_Package.zip
Raw History Compare with 5.4.8
md5
e9b5046d43df024f633784733c589890
sha1
af1b051f1a0136c0cdc1420295321f8b09b9fe50
sha256
c7bf08929e778ec9a358b9721ee818061fd272f4be18d42f2ffd2f4f873578c3
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
 * @license        GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Event\Result;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * This Trait partially implements the ResultAwareInterface for type checking.
 *
 * Events using this Trait (and the ResultAware trait) will expect event handlers to set results
 * of a any type. THIS IS A COP OUT! If you expect a nullable or union type it's best to implement
 * the typeCheckResult method yourself to check for the exact types you expect.
 *
 * @since  4.2.0
 */
trait ResultTypeMixedAware
{
    /**
     * Checks the type of the data being appended to the result argument.
     *
     * @param   mixed  $data  The data to type check
     *
     * @return  void
     * @throws  \InvalidArgumentException
     *
     * @internal
     * @since   4.2.0
     */
    public function typeCheckResult($data): void
    {
        // Intentionally left blank; no type check is performed.
    }
}

The same content is in 153 releases, Joomla 5.0.0-alpha3 to 6.2.1-rc1. See them all, or every version of this file.