mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-29 22:16:01 +02:00
This method should typehint the incoming value once union types are available, but for now this ensures that method_exists() is not called on scalar values, which is unsupported in PHP 8.
20 lines
313 B
PHP
20 lines
313 B
PHP
<?php
|
|
|
|
namespace SilverStripe\Core\Tests\ClassInfoTest;
|
|
|
|
use SilverStripe\Core\CustomMethods;
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
/**
|
|
* Example of class with hasMethod() implementation
|
|
*/
|
|
class HasMethod implements TestOnly
|
|
{
|
|
use CustomMethods;
|
|
|
|
public function example()
|
|
{
|
|
return true;
|
|
}
|
|
}
|