Code Duplication    Length = 14-14 lines in 2 locations

www/engine/System/Classes/Utils/Schema/_Object.php 2 locations

@@ 74-87 (lines=14) @@
71
72
		# Load JSON file
73
74
		public function load() {
75
76
			if ('' === static::$file_name) return null;
77
78
			$file_name = (DIR_SYSTEM_DATA . static::$file_name);
79
80
			if (null === ($data = JSON::load($file_name))) return null;
81
82
			if (null === ($data = $this->validate($data))) return null;
83
84
			# ------------------------
85
86
			return $data;
87
		}
88
89
		# Save JSON file
90
@@ 91-104 (lines=14) @@
88
89
		# Save JSON file
90
91
		public function save(array $data) {
92
93
			if ('' === static::$file_name) return false;
94
95
			$file_name = (DIR_SYSTEM_DATA . static::$file_name);
96
97
			if (null === ($data = $this->validate($data))) return false;
98
99
			if (false === JSON::save($file_name, $data)) return false;
100
101
			# ------------------------
102
103
			return true;
104
		}
105
106
		# Remove JSON file
107