Code Duplication    Length = 11-12 lines in 2 locations

src/dispatcher/OutputType.class.php 1 location

@@ 202-213 (lines=12) @@
199
     * @author     David Zülke <[email protected]>
200
     * @since      0.11.0
201
     */
202
    public function getLayout($name = null)
203
    {
204
        if ($name === null) {
205
            $name = $this->defaultLayout;
206
        }
207
        
208
        if (isset($this->layouts[$name])) {
209
            return $this->layouts[$name];
210
        } else {
211
            throw new AgaviException('Unknown layout "' . $name . '"');
212
        }
213
    }
214
    
215
    /**
216
     * Get the exception template filename for this renderer.

src/dispatcher/Dispatcher.class.php 1 location

@@ 710-720 (lines=11) @@
707
     * @author     David Zülke <[email protected]>
708
     * @since      0.11.0
709
     */
710
    public function getOutputType($name = null)
711
    {
712
        if ($name === null) {
713
            $name = $this->defaultOutputType;
714
        }
715
        if (isset($this->outputTypes[$name])) {
716
            return $this->outputTypes[$name];
717
        } else {
718
            throw new AgaviException('Output Type "' . $name . '" has not been configured.');
719
        }
720
    }
721
}
722