<commit_before><?php declare(strict_types=1);
/**
 * @license MIT
 * @author <NAME> <<EMAIL>>
 *
 * This file is part of the EmmetBlue project, please read the license document
 * available in the root level of the project
 */
namespace EmmetBlue\Plugins\HumanResources\StaffProfile;

use EmmetBlue\Core\Builder\BuilderFactory as Builder;
use EmmetBlue\Core\Factory\DatabaseConnectionFactory as DBConnectionFactory;
use EmmetBlue\Core\Factory\DatabaseQueryFactory as DBQueryFactory;
use EmmetBlue\Core\Builder\QueryBuilder\QueryBuilder as QB;
use EmmetBlue\Core\Exception\SQLException;
use EmmetBlue\Core\Session\Session;
use EmmetBlue\Core\Logger\DatabaseLog;
use EmmetBlue\Core\Logger\ErrorLog;
use EmmetBlue\Core\Constant;

/**
 * class NewStaffProfile.
 *
 * NewStaffProfile Controller
 *
 * @author <NAME> <<EMAIL>>
 * @since v0.0.1 08/06/2016 14:20
 */
class StaffProfile
{
	/**
	 * @param array $data
	 */
    public static function create(array $data)
    {
        $staff = $data['staff'];
        unset($data['staff']);

        $selectBuilder = (new Builder("QueryBuilder", "Select"))->getBuilder();

        try
        {
           $selectBuilder->columns('*')->from('Staffs.StaffProfileRecords');

            $result = (
                    DBConnectionFactory::getConnection()
                    ->query((string)$selectBuilder)
                )->fetchAll(\PDO::FETCH_ASSOC);

            foreach ($result as $key=>$value)
            {
                
            }
        }
        catch (\PDOException $e)
        {
            throw new SQLException(sprintf(
                "Unable to retrieve requested data, %s",
                $e->getMessage()
            ), Constant::UNDEFINED);
        }

        /*try
        {
            $result = DBQueryFactory::insert('Staffs.StaffProfiles', [
                'RecordName'=>QB::wrapString($name, "'"),
                'RecordType'=>QB::wrapString($type, "'"),
                'RecordDescription'=>QB::wrapString($description, "'")
            ]);
            
            return $result;
        }
        catch (\PDOException $e)
        {
            throw new SQLException(sprintf(
                "Unable to process request, %s",
                $e->getMessage()
            ), Constant::UNDEFINED);
        }*/
    }<commit_msg>Automated Push<commit_after><?php declare(strict_types=1);
/**
 * @license MIT
 * @author <NAME> <<EMAIL>>
 *
 * This file is part of the EmmetBlue project, please read the license document
 * available in the root level of the project
 */
namespace EmmetBlue\Plugins\HumanResources\StaffProfile;

use EmmetBlue\Core\Builder\BuilderFactory as Builder;
use EmmetBlue\Core\Factory\DatabaseConnectionFactory as DBConnectionFactory;
use EmmetBlue\Core\Factory\DatabaseQueryFactory as DBQueryFactory;
use EmmetBlue\Core\Builder\QueryBuilder\QueryBuilder as QB;
use EmmetBlue\Core\Exception\SQLException;
use EmmetBlue\Core\Session\Session;
use EmmetBlue\Core\Logger\DatabaseLog;
use EmmetBlue\Core\Logger\ErrorLog;
use EmmetBlue\Core\Constant;

/**
 * class NewStaffProfile.
 *
 * NewStaffProfile Controller
 *
 * @author <NAME> <<EMAIL>>
 * @since v0.0.1 08/06/2016 14:20
 */
class StaffProfile
{
    /**
     * @param array $data
     */
    public static function create(array $data)
    {
        $staff = $data['staff'] ?? null;
        unset($data['staff']);

        $selectBuilder = (new Builder("QueryBuilder", "Select"))->getBuilder();

        try
        {
           $selectBuilder->columns('*')->from('Staffs.StaffProfileRecords');

            $result = (
                    DBConnectionFactory::getConnection()
                    ->query((string)$selectBuilder)
                )->fetchAll(\PDO::FETCH_ASSOC);

            $staffProfileRecords = [];
            $staffProfile = [];
            foreach ($result as $value)
            {
                $staffProfileRecords[strtolower($value["RecordName"])] = $value;
            }

            foreach ($data as $key=>$value)
            {
                $key = strtolower($key);
                if (isset($staffProfileRecords[$key]))
                {
                    $record = $staffProfileRecords[$key];
                    $staffProfile[$record["RecordID"]] = $value;
                }
            }

            print_r($_FILES);
            die();
        }
        catch (\PDOException $e)
        {
            throw new SQLException(sprintf(
                "Unable to retrieve requested data, %s",
                $e->getMessage()
            ), Constant::UNDEFINED);
        }

        /*try
        {
            $result = DBQueryFactory::insert('Staffs.StaffProfiles', [
                'RecordName'=>QB::wrapString($name, "'"),
                'RecordType'=>QB::wrapString($type, "'"),
                'RecordDescription'=>QB::wrapString($description, "'")
            ]);
            
            return $result;
        }
        catch (\PDOException $e)
        {
            throw new SQLException(sprintf(
                "Unable to process request, %s",
                $e->getMessage()
            ), Constant::UNDEFINED);
        }*/
    }
{'fraction_non_alphanumeric': 0.13052795636080264, 'fraction_numerical': 0.006234171050068186, 'mean_word_length': 2.0559523809523808, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7143271', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1374, 'n_words': 278}