Code Duplication    Length = 9-9 lines in 4 locations

src/Batch.php 4 locations

@@ 46-54 (lines=9) @@
43
     * @param   array 	$args    Assoc array of arguments (usually your data)
44
     * @return  void
45
     */
46
    public function get($id, $method, $args=array())
47
    {
48
    	$this->operations[] = array(
49
				'operation_id' => $id,
50
				'method'       => 'GET',
51
				'path'         => $method,
52
				'params'       => json_encode($args),
53
    		);
54
    }
55
56
    /**
57
     * Add an HTTP PATCH request operation to the batch - for performing partial updates
@@ 63-71 (lines=9) @@
60
     * @param   array   $args    Assoc array of arguments (usually your data)
61
     * @return  void
62
     */
63
    public function patch($id, $method, $args=array())
64
    {
65
    	$this->operations[] = array(
66
				'operation_id' => $id,
67
				'method'       => 'PATCH',
68
				'path'         => $method,
69
				'body'         => json_encode($args),
70
    		);
71
    }
72
73
    /**
74
     * Add an HTTP POST request operation to the batch - for creating and updating items
@@ 80-88 (lines=9) @@
77
     * @param   array    $args    Assoc array of arguments (usually your data)
78
     * @return  void
79
     */
80
    public function post($id, $method, $args=array())
81
    {
82
    	$this->operations[] = array(
83
				'operation_id' => $id,
84
				'method'       => 'POST',
85
				'path'         => $method,
86
				'body'         => json_encode($args),
87
    		);
88
    }
89
90
    /**
91
     * Add an HTTP PUT request operation to the batch - for creating new items
@@ 97-105 (lines=9) @@
94
     * @param   array   $args    Assoc array of arguments (usually your data)
95
     * @return  void
96
     */
97
    public function put($id, $method, $args=array())
98
    {
99
        $this->operations[] = array(
100
				'operation_id' => $id,
101
				'method'       => 'PUT',
102
				'path'         => $method,
103
				'body'         => json_encode($args),
104
    		);
105
    }
106
107
    /**
108
     * Execute the batch request