/home/kueuepay/public_html/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php
<?php
namespace Hamcrest\Text;

/*
 Copyright (c) 2009 hamcrest.org
 */

/**
 * Tests if the argument is a string that contains a substring.
 */
class StringContains extends SubstringMatcher
{

    public function __construct($substring)
    {
        parent::__construct($substring);
    }

    public function ignoringCase()
    {
        return new StringContainsIgnoringCase($this->_substring);
    }

    /**
     * Matches if value is a string that contains $substring.
     *
     * @factory
     */
    public static function containsString($substring)
    {
        return new self($substring);
    }

    // -- Protected Methods

    protected function evalSubstringOf($item)
    {
        return (false !== strpos((string) $item, $this->_substring));
    }

    protected function relationship()
    {
        return 'containing';
    }
}
Best Practice

Best Practices

To ensure a smooth integration process and optimal performance, follow these best practices:

  1. Use secure HTTPS connections for all API requests.
  2. Implement robust error handling to handle potential issues gracefully.
  3. Regularly update your integration to stay current with any API changes or enhancements.