Code Duplication    Length = 5-6 lines in 2 locations

lib/Dwoo/Core.php 2 locations

@@ 1174-1178 (lines=5) @@
1171
     */
1172
    public function addStack($blockName, array $args = array())
1173
    {
1174
        if (isset($this->plugins[$blockName])) {
1175
            $class = $this->plugins[$blockName]['class'];
1176
        } else {
1177
            $class = self::NAMESPACE_PLUGINS_BLOCKS . 'Plugin' . self::toCamelCase($blockName);
1178
        }
1179
1180
        if ($this->curBlock !== null) {
1181
            $this->curBlock->buffer(ob_get_contents());
@@ 1255-1260 (lines=6) @@
1252
     */
1253
    public function findBlock($type)
1254
    {
1255
        if (isset($this->plugins[$type])) {
1256
            $type = $this->plugins[$type]['class'];
1257
        } else {
1258
            $type = self::NAMESPACE_PLUGINS_BLOCKS . 'Plugin_' . str_replace(self::NAMESPACE_PLUGINS_BLOCKS.'Plugin',
1259
                    '', $type);
1260
        }
1261
1262
        $keys = array_keys($this->stack);
1263
        while (($key = array_pop($keys)) !== false) {