Code Duplication    Length = 10-10 lines in 2 locations

core/services/container/CoffeeShop.php 1 location

@@ 514-523 (lines=10) @@
511
     * @return string
512
     * @throws InvalidIdentifierException
513
     */
514
    private function processIdentifier($identifier)
515
    {
516
        if ( ! is_string($identifier)) {
517
            throw new InvalidIdentifierException(
518
                is_object($identifier) ? get_class($identifier) : gettype($identifier),
519
                '\Fully\Qualified\ClassName'
520
            );
521
        }
522
        return ltrim($identifier, '\\');
523
    }
524
525
526

core/services/container/Recipe.php 1 location

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