src/TerminalObject/Dynamic/Animation/Keyframe.php
protected function getDirectionFrames($direction, array $lines, $line_method)
    {
        $mapping = [
            'exitHorizontalFrames' => ['left', 'right'],
            'exitVerticalFrames'   => ['top', 'bottom'],
        ];

        foreach ($mapping as $method => $directions) {
            if (in_array($direction, $directions)) {
                return $this->$method($lines, $line_method);
            }
        }

        // Fail gracefully, simply return an array
        return [];
    }
protected function getDirectionFrames($direction, array $lines, $line_method)
    {
        $mapping = [
            'exitHorizontalFrames' => ['left', 'right'],
            'exitVerticalFrames'   => ['top', 'bottom'],
        ];

        foreach ($mapping as $method => $directions) {
            if (in_array($direction, $directions)) {
                return $this->$method($lines, $line_method);
            }
        }

        // Fail gracefully, simply return an array
        return [];
    }
protected function getDirectionFrames ( $ direction , array $ lines , $ line_method ) { $ mapping = [ 'exitHorizontalFrames' => [ 'left' , 'right' ] , 'exitVerticalFrames' => [ 'top' , 'bottom' ] , ] ; foreach ( $ mapping as $ method => $ directions ) { if ( in_array ( $ direction , $ directions ) ) { return $ this -> $ method ( $ lines , $ line_method ) ; } } // Fail gracefully, simply return an array return [ ] ; }
Get the keyframes appropriate for the animation direction

@param string $direction
@param array $lines
@param string $line_method

@return array
Get the keyframes appropriate for the animation direction