Code Duplication    Length = 10-10 lines in 2 locations

core/services/container/CoffeeShop.php 1 location

@@ 422-431 (lines=10) @@
419
     * @return string
420
     * @throws InvalidIdentifierException
421
     */
422
    private function processIdentifier($identifier)
423
    {
424
        if ( ! is_string($identifier)) {
425
            throw new InvalidIdentifierException(
426
                is_object($identifier) ? get_class($identifier) : gettype($identifier),
427
                '\Fully\Qualified\ClassName'
428
            );
429
        }
430
        return ltrim($identifier, '\\');
431
    }
432
433
434

core/services/container/Recipe.php 1 location

@@ 197-206 (lines=10) @@
194
     * @param  string $identifier Identifier for the entity class that the Recipe applies to
195
     *                            Typically a Fully Qualified Class Name
196
     */
197
    public function setIdentifier($identifier)
198
    {
199
        if ( ! is_string($identifier) || empty($identifier)) {
200
            throw new InvalidIdentifierException(
201
                is_object($identifier) ? get_class($identifier) : gettype($identifier),
202
                __('class identifier (typically a \Fully\Qualified\ClassName)', 'event_espresso')
203
            );
204
        }
205
        $this->identifier = $identifier;
206
    }
207
208
209