Code Duplication    Length = 13-13 lines in 2 locations

src/Darya/Database/Result.php 1 location

@@ 111-123 (lines=13) @@
108
	 * 
109
	 * @param array $info
110
	 */
111
	protected function setInfo(array $info) {
112
		$defaults = array(
113
			'count' => 0,
114
			'fields' => array(),
115
			'affected' => 0,
116
			'insert_id' => 0
117
		);
118
		
119
		foreach ($defaults as $key => $default) {
120
			$property = static::snakeToCamel($key);
121
			$this->$property = isset($info[$key]) ? $info[$key] : $default;
122
		}
123
	}
124
	
125
	/**
126
	 * Dynamically retrieve the given property.

src/Darya/Storage/Result.php 1 location

@@ 83-95 (lines=13) @@
80
	 * 
81
	 * @param array $info
82
	 */
83
	protected function setInfo(array $info) {
84
		$defaults = array(
85
			'count' => 0,
86
			'fields' => array(),
87
			'affected' => 0,
88
			'insert_id' => 0
89
		);
90
		
91
		foreach ($defaults as $key => $default) {
92
			$property = static::snakeToCamel($key);
93
			$this->$property = isset($info[$key]) ? $info[$key] : $default;
94
		}
95
	}
96
	
97
}
98