Code Duplication    Length = 18-18 lines in 2 locations

src/Model.php 2 locations

@@ 600-617 (lines=18) @@
597
     *
598
     * @return string|false method name if it exists
599
     */
600
    public static function getMutator($property)
601
    {
602
        $class = get_called_class();
603
604
        $k = $class.':'.$property;
605
        if (!array_key_exists($k, self::$mutators)) {
606
            $inflector = Inflector::get();
607
            $method = 'set'.$inflector->camelize($property).'Value';
608
609
            if (!method_exists($class, $method)) {
610
                $method = false;
611
            }
612
613
            self::$mutators[$k] = $method;
614
        }
615
616
        return self::$mutators[$k];
617
    }
618
619
    /**
620
     * Gets the accessor method name for a given proeprty name.
@@ 628-645 (lines=18) @@
625
     *
626
     * @return string|false method name if it exists
627
     */
628
    public static function getAccessor($property)
629
    {
630
        $class = get_called_class();
631
632
        $k = $class.':'.$property;
633
        if (!array_key_exists($k, self::$accessors)) {
634
            $inflector = Inflector::get();
635
            $method = 'get'.$inflector->camelize($property).'Value';
636
637
            if (!method_exists($class, $method)) {
638
                $method = false;
639
            }
640
641
            self::$accessors[$k] = $method;
642
        }
643
644
        return self::$accessors[$k];
645
    }
646
647
    /**
648
     * Marshals a value for a given property from storage.