Code Duplication    Length = 9-9 lines in 6 locations

src/Aimeos/Shop/Controller/JqadmController.php 6 locations

@@ 37-45 (lines=9) @@
34
	 * @param integer $id Unique resource ID
35
	 * @return string Generated output
36
	 */
37
	public function copyAction( $site = 'default', $resource, $id )
38
	{
39
		if( config( 'shop.authorize', true ) ) {
40
			$this->authorize( 'admin' );
41
		}
42
43
		$cntl = $this->createClient( $site, $resource );
44
		return $this->getHtml( $site, $cntl->copy( $id ) );
45
	}
46
47
48
	/**
@@ 55-63 (lines=9) @@
52
	 * @param string $sitecode Unique site code
53
	 * @return string Generated output
54
	 */
55
	public function createAction( $site = 'default', $resource )
56
	{
57
		if( config( 'shop.authorize', true ) ) {
58
			$this->authorize( 'admin' );
59
		}
60
61
		$cntl = $this->createClient( $site, $resource );
62
		return $this->getHtml( $site, $cntl->create() );
63
	}
64
65
66
	/**
@@ 74-82 (lines=9) @@
71
	 * @param integer $id Unique resource ID
72
	 * @return string Generated output
73
	 */
74
	public function deleteAction( $site = 'default', $resource, $id )
75
	{
76
		if( config( 'shop.authorize', true ) ) {
77
			$this->authorize( 'admin' );
78
		}
79
80
		$cntl = $this->createClient( $site, $resource );
81
		return $this->getHtml( $site, $cntl->delete( $id ) . $cntl->search() );
82
	}
83
84
85
	/**
@@ 93-101 (lines=9) @@
90
	 * @param integer $id Unique resource ID
91
	 * @return string Generated output
92
	 */
93
	public function getAction( $site = 'default', $resource, $id )
94
	{
95
		if( config( 'shop.authorize', true ) ) {
96
			$this->authorize( 'admin' );
97
		}
98
99
		$cntl = $this->createClient( $site, $resource );
100
		return $this->getHtml( $site, $cntl->get( $id ) );
101
	}
102
103
104
	/**
@@ 111-119 (lines=9) @@
108
	 * @param string $sitecode Unique site code
109
	 * @return string Generated output
110
	 */
111
	public function saveAction( $site = 'default', $resource )
112
	{
113
		if( config( 'shop.authorize', true ) ) {
114
			$this->authorize( 'admin' );
115
		}
116
117
		$cntl = $this->createClient( $site, $resource );
118
		return $this->getHtml( $site, ( $cntl->save() ? : $cntl->search() ) );
119
	}
120
121
122
	/**
@@ 129-137 (lines=9) @@
126
	 * @param string $sitecode Unique site code
127
	 * @return string Generated output
128
	 */
129
	public function searchAction( $site = 'default', $resource )
130
	{
131
		if( config( 'shop.authorize', true ) ) {
132
			$this->authorize( 'admin' );
133
		}
134
135
		$cntl = $this->createClient( $site, $resource );
136
		return $this->getHtml( $site, $cntl->search() );
137
	}
138
139
140
	/**