Skip to content

Commit

Permalink
PSR2, PSR12 - abstract protected
Browse files Browse the repository at this point in the history
  • Loading branch information
najdanovicivan committed Dec 7, 2020
1 parent 8ee3965 commit bed6b60
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions system/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public function find($id = null)
*
* @return array|object|null The resulting row of data, or null.
*/
protected abstract function _find(bool $singleton, $id = null);
abstract protected function _find(bool $singleton, $id = null);

/**
* Fetches the column of database from $this->table
Expand Down Expand Up @@ -407,7 +407,7 @@ public function findColumn(string $columnName)
* @return array|null The resulting row of data, or null if no data found.
* @throws DataException Data Exception.
*/
protected abstract function _findColumn(string $columnName);
abstract protected function _findColumn(string $columnName);

/**
* Works with the current Query Builder instance to return
Expand Down Expand Up @@ -465,7 +465,7 @@ public function findAll(int $limit = 0, int $offset = 0)
*
* @return array
*/
protected abstract function _findAll(int $limit = 0, int $offset = 0);
abstract protected function _findAll(int $limit = 0, int $offset = 0);

/**
* Returns the first row of the result set. Will take any previous
Expand Down Expand Up @@ -513,7 +513,7 @@ public function first()
*
* @return array|object|null
*/
protected abstract function _first();
abstract protected function _first();

/**
* Captures the builder's set() method so that we can validate the
Expand Down Expand Up @@ -568,7 +568,7 @@ public function save($data): bool
*
* @return boolean
*/
protected abstract function _save($data): bool;
abstract protected function _save($data): bool;

/**
* Takes a class an returns an array of it's public and protected
Expand Down Expand Up @@ -780,7 +780,7 @@ public function insert($data = null, bool $returnID = true)
*
* @return object|integer|string|false
*/
protected abstract function _insert($data, ?bool $escape = null);
abstract protected function _insert($data, ?bool $escape = null);

/**
* Compiles batch insert strings and runs the queries, validating each row prior.
Expand Down Expand Up @@ -854,7 +854,7 @@ public function insertBatch(array $set = null, bool $escape = null, int $batchSi
* @return integer|boolean Number of rows inserted or FALSE on failure
* @throws ReflectionException ReflectionException.
*/
protected abstract function _insertBatch(
abstract protected function _insertBatch(
array $set = null,
bool $escape = null,
int $batchSize = 100,
Expand Down Expand Up @@ -965,7 +965,7 @@ public function update($id = null, $data = null): bool
*
* @return boolean
*/
protected abstract function _update($id = null, $data = null, ?bool $escape = null): bool;
abstract protected function _update($id = null, $data = null, ?bool $escape = null): bool;

/**
* Update_Batch
Expand Down Expand Up @@ -1046,7 +1046,7 @@ public function updateBatch(array $set = null, string $index = null, int $batchS
* @throws DatabaseException DatabaseException.
* @throws ReflectionException ReflectionException.
*/
protected abstract function _updateBatch(
abstract protected function _updateBatch(
array $set = null,
string $index = null,
int $batchSize = 100,
Expand Down Expand Up @@ -1107,7 +1107,7 @@ public function delete($id = null, bool $purge = false)
* @return object|boolean
* @throws DatabaseException DatabaseException.
*/
protected abstract function _delete($id = null, bool $purge = false);
abstract protected function _delete($id = null, bool $purge = false);

/**
* Permanently deletes all rows that have been marked as deleted
Expand All @@ -1131,7 +1131,7 @@ public function purgeDeleted()
*
* @return boolean|mixed
*/
protected abstract function _purgeDeleted();
abstract protected function _purgeDeleted();

/**
* Sets $useSoftDeletes value so that we can temporarily override
Expand Down Expand Up @@ -1168,7 +1168,7 @@ public function onlyDeleted()
*
* @return void
*/
protected abstract function _onlyDeleted();
abstract protected function _onlyDeleted();

/**
* Replace
Expand Down Expand Up @@ -1201,7 +1201,7 @@ public function replace(array $data = null, bool $returnSQL = false)
*
* @return mixed
*/
protected abstract function _replace(array $data = null, bool $returnSQL = false);
abstract protected function _replace(array $data = null, bool $returnSQL = false);

//--------------------------------------------------------------------
// Utility
Expand Down Expand Up @@ -1409,7 +1409,7 @@ public function errors(bool $forceDB = false)
*
* @return array|null
*/
protected abstract function _errors();
abstract protected function _errors();

/**
* It could be used when you have to change default or override current allowed fields.
Expand Down

0 comments on commit bed6b60

Please sign in to comment.