Code Duplication    Length = 12-15 lines in 3 locations

src/Controller/Anime.php 1 location

@@ 57-71 (lines=15) @@
54
	 *
55
	 * @param ContainerInterface $container
56
	 */
57
	public function __construct(ContainerInterface $container)
58
	{
59
		parent::__construct($container);
60
61
		$this->model = $container->get('anime-model');
62
63
		$this->base_data = array_merge($this->base_data, [
64
			'menu_name' => 'anime_list',
65
			'url_type' => 'anime',
66
			'other_type' => 'manga',
67
			'config' => $this->config,
68
		]);
69
70
		$this->cache = $container->get('cache');
71
	}
72
73
	/**
74
	 * Show a portion, or all of the anime list

src/Controller/Collection.php 1 location

@@ 59-72 (lines=14) @@
56
	 *
57
	 * @param ContainerInterface $container
58
	 */
59
	public function __construct(ContainerInterface $container)
60
	{
61
		parent::__construct($container);
62
63
		$this->urlGenerator = $container->get('url-generator');
64
		$this->anime_model = $container->get('anime-model');
65
		$this->anime_collection_model = $container->get('anime-collection-model');
66
		$this->base_data = array_merge($this->base_data, [
67
			'menu_name' => 'collection',
68
			'url_type' => 'anime',
69
			'other_type' => 'manga',
70
			'config' => $this->config,
71
		]);
72
	}
73
74
	/**
75
	 * Search for anime

src/Controller/Manga.php 1 location

@@ 51-62 (lines=12) @@
48
	 *
49
	 * @param ContainerInterface $container
50
	 */
51
	public function __construct(ContainerInterface $container)
52
	{
53
		parent::__construct($container);
54
55
		$this->model = $container->get('manga-model');
56
		$this->base_data = array_merge($this->base_data, [
57
			'menu_name' => 'manga_list',
58
			'config' => $this->config,
59
			'url_type' => 'manga',
60
			'other_type' => 'anime'
61
		]);
62
	}
63
64
	/**
65
	 * Get a section of the manga list