blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
8c8fd5eceb65707a3a2d74de623143a7849204c2 | PHP | TuxBoy/0--site-integrale | /src/Entity/Shop.php | UTF-8 | 4,327 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use App\Validator\Constraints as ShopAssert;
use ReflectionClass;
/**
* @ORM\Entity(repositoryClass="App\Repository\ShopRepository")
*/
class Shop implements \JsonSerializable
{
/**
* @ORM\... | true |
3ac86866ccf6c9f470fb5faeb4874f5a99474393 | PHP | amift/custom-modules-for-phalcon | /Forum/src/Forum/Repository/ForumCategoryRepository.php | UTF-8 | 9,024 | 2.75 | 3 | [] | no_license | <?php
namespace Forum\Repository;
use Doctrine\ORM\EntityRepository;
use Forum\Entity\ForumCategory;
class ForumCategoryRepository extends EntityRepository
{
/**
* Get forum category object by ID value.
*
* @access public
* @param int $id
* @return null|ForumCategory
*/
public... | true |
8a9c41ec3616a955045ce683f5ed5fef45a5666d | PHP | Burzhun/Api-Yii2-app | /api/versions/v1/models/requestModels/check/ApiFormatter.php | UTF-8 | 2,697 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: JamalAbsalimov
* Date: 30.07.2019
* Time: 2:20
* Telegram: @JamalWeb
*/
namespace api\versions\v1\models\requestModels\check;
use yii\base\BaseObject;
use yii\helpers\ArrayHelper;
class ApiFormatter extends BaseObject
{
public $check;
public function __constr... | true |
3f651700867756410c9a6212dd35642ec4f8a6dd | PHP | thiagoHagge/xlsxtomysql | /import_xlsx.php | UTF-8 | 908 | 3.078125 | 3 | [] | no_license | <?php
require_once('db.class.php');
require_once('vendor/autoload.php'); // PhpSpreadsheet
$filename = "teste.xlsx";
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$spreadsheet = $reader->load($filename);
foreach ($spreadsheet->getWorksheetIterator() as $worksheet) {
$worksheets[$workshee... | true |
665228e367c76bb1547ae54795bd7b6aa70a90b7 | PHP | cmslz/hyperf-tenancy | /src/function.php | UTF-8 | 2,799 | 2.546875 | 3 | [] | no_license | <?php
/**
* Each engineer has a duty to keep the code elegant
* Created by xiaobai at 2023/6/11 23:34
*/
use Cmslz\HyperfTenancy\Kernel\Tenant\Tenant;
use Hyperf\Cache\Driver\DriverInterface;
use Hyperf\Context\ApplicationContext;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Contract\LengthAwarePaginatorInterfac... | true |
e58643ed77142def9f50c5efa42e5af056ae8bb6 | PHP | Kubik-Rubik/solusiovps | /lib/ClientAPI/Response.php | UTF-8 | 560 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
// Copyright 2020. Plesk International GmbH.
namespace WHMCS\Module\Server\SolusIoVps\ClientAPI;
/**
* Trait Response
* @package WHMCS\Module\Server\SolusIoVps\ClientAPI
*/
trait Response
{
/**
* @param array $data
*/
public function success(array $data)
{
echo json_encode(['su... | true |
d16df1f50aacfd7dcc15aa9daec7b6e02eed030a | PHP | matej2000/Forum_ST_nal3 | /Model/ForumDB.php | UTF-8 | 6,969 | 2.734375 | 3 | [] | no_license | <?php
require_once "DBInit.php";
class ForumDB{
public static function search($query){
$db = DBInit::getInstance();
$statement = $db->prepare("SELECT idpost, post_idpost, title, content, time, likes, removed, edited FROM post WHERE post_idpost IS NULL AND
(title LIKE :query OR conten... | true |
7f30f914d360c9a4ba92c2e9abe7ba5f3e466bb4 | PHP | Zehuxx/RAC | /app/Http/Requests/EmployeeStoreRequest.php | UTF-8 | 2,694 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class EmployeeStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* ... | true |
6c24d5d7dcfa851afe8f3c2a8cb54d418c5ee860 | PHP | arm1n/efit-backend | /src/AppBundle/Repository/TaskRepository.php | UTF-8 | 860 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
use AppBundle\Entity\Workshop;
/**
* Custom repository for task entity.
*
* @subpackage Repository
* @package AppBundle
* @author Armin Pfurtscheller
*/
class TaskRepository extends EntityRepository
{
/**
* Retrieves current `isActi... | true |
502a62c2df2b7ff8343a51d12283c2d0cb3b0443 | PHP | weierophinney/zf-web | /public/issues/secure/attachment/10943/Cell.php | UTF-8 | 18,201 | 2.65625 | 3 | [] | no_license | <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license an... | true |
6f6e8faeca1ab242c2092be131a166de5f2b7599 | PHP | mprince2k18/laravel8-viber-bot | /src/Messages/TextMessage.php | UTF-8 | 549 | 2.890625 | 3 | [] | no_license | <?php
namespace Paragraf\ViberBot;
use Paragraf\ViberBot\Messages\Message;
use Paragraf\ViberBot\Intefaces\MessageInterface;
class TextMessage extends Message implements MessageInterface
{
protected $text;
protected $type = 'text';
public function body()
{
return array_merge(parent::body(),... | true |
93ad498de098b701d9a6e3bcb778687c3e105cb5 | PHP | doan281/edupham_validator | /src/app/Rules/UpperCaseRule.php | UTF-8 | 726 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Edupham\Validator\App\Rules;
use Illuminate\Contracts\Validation\Rule;
class UpperCaseRule implements Rule
{
/**
* Determine if the validation rule passes.
*
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, ... | true |
1232d7ac52d1012785c25b7c4eece4d0798e02be | PHP | opencnab/opencnab | /application/libraries/OpenCnab.php | UTF-8 | 3,057 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2018 Tiago M. Abreu
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to u... | true |
e794f947c68c5297c83774d1d59f02f454014840 | PHP | devntech-fr/eureka-g6k-package | /src/G6K/EventListener/FileSystemLoader.php | UTF-8 | 778 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Devntech\G6K\EventListener;
use Twig\Loader\FilesystemLoader as TwigLoaderFilesystem;
/**
* Loads twig template from the filesystem.
*
* @copyright Jacques Archimède
*
*/
class FileSystemLoader extends TwigLoaderFilesystem {
/**
* Checks if the template can be found.
*
* Override the par... | true |
b9d5844e50e8a482beb5eaf6811893d231468aeb | PHP | francivancastro/sistema | /app/models/CartaoModel.php | UTF-8 | 2,875 | 2.59375 | 3 | [] | no_license | <?php
class CartaoModel extends Model {
public $_tabela = 'cartao';
public $pkName = 'id_cartao';
public $fkName = 'id_pagamento';
public $id_cartao;
public $id_pagamento;
public $id_cartao_tipo;
public $bandeira;
public $codigo;
public $parcelas;
public $valor;
pu... | true |
e215ad5ef7707bfb3f985b1bdd1c933d7a24b8a6 | PHP | nat-GH/simple-products-crud-php | /controller/listAll.php | UTF-8 | 329 | 2.671875 | 3 | [] | no_license | <?php
include_once 'database.php';
function listAll()
{
$con = open_database();
$sql = "select * from produtos";
if ($result = mysqli_query($con, $sql)) {
$dataArray = mysqli_fetch_all($result, MYSQLI_ASSOC);
return $dataArray;
} else {
return null;
}
close_database(... | true |
0effa13b4e29e96613289dc45c0a64bbbbd63eb6 | PHP | Byteflux/mta-sts | /mta-sts.php | UTF-8 | 2,085 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | #!/usr/bin/env php
<?php
function info($message, ...$args)
{
printf("$message\n", ...$args);
}
function error($message, ...$args)
{
fwrite(STDERR, sprintf("$message\n", ...$args));
exit(1);
}
foreach (['POLICY_MODE', 'POLICY_MX', 'POLICY_MAX_AGE'] as $env_var) {
if (!isset($_SERVER[$env_var])) {
... | true |
31f3642b41a351671756da4dcfac6f0866bbdc47 | PHP | jstroem/phpwork | /config/Config.php | UTF-8 | 284 | 2.828125 | 3 | [] | no_license | <?php
class Config {
private $db = array(
'user' => '',
'pass' => '',
'dsn' => '',
);
private $debug = true;
public function getPDO() {
return new PDO($this->db['dsn'],$this->db['user'],$this->db['pass']);
}
public function debug(){
return $this->debug;
}
}
?>
| true |
8359b93ff5ebe4b2d21b47790a5c9cd99c8c1f77 | PHP | edukmattos/SisConPat | /app/Repositories/MaterialUnitRepository.php | UTF-8 | 612 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace SisConPat\Repositories;
use SisConPat\MaterialUnit;
class MaterialUnitRepository
{
private $material_unit;
public function __construct(MaterialUnit $material_unit)
{
$this->material_unit = $material_unit;
}
public function allMaterialUnits()
{
return $this->material_unit
->orderBy('d... | true |
558cffcddbf7ea8fb9ac62e3a02d4f0871cbaa14 | PHP | stevehollands/sql | /hiking/create.php | UTF-8 | 1,106 | 2.75 | 3 | [] | no_license | <?php
include 'connect.php';
if (isset($_POST['send'])) {
$hike_name = $_POST['hike_name'];
$difficulty = $_POST['difficulty'];
$distance = $_POST['distance'];
$duration = $_POST['duration'];
$height_difference = $_POST['height_difference'];
$sqlinsert = "INSERT INTO hiking (hike_name, difficult... | true |
b043c307e662f7add3cab82007b6c0a9398a480e | PHP | arnoldmontiel/greensys | /protected/models/PurchaseOrder.php | UTF-8 | 5,324 | 2.609375 | 3 | [] | no_license | <?php
/**
* This is the model class for table "purchase_order".
*
* The followings are the available columns in table 'purchase_order':
* @property integer $Id
* @property integer $code
* @property integer $Id_supplier
* @property integer $Id_shipping_parameter
* @property string $date_creation
* @property in... | true |
0441f1ba787a79a32efba9f46941589e13845916 | PHP | MichalGallovic/Pantry | /app/UnitTypeCategory.php | UTF-8 | 1,236 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
final class UnitTypeCategory
{
const VOLUME = 'volume';
const WEIGHT = 'weight';
const LENGTH = 'length';
const TEMPERATURE = 'temperature';
const QUANTITY = 'quantity';
/** @var array */
private static $map = [
self::VOLUME => [
UnitType::TEASPOON... | true |
411ad68b3dfa91839d1abedd23f52c0dd90aab5b | PHP | amitnitjsr/backup-engine | /src/Dimsav/Backup/Storage/Storage.php | UTF-8 | 678 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php namespace Dimsav\Backup\Storage;
use Dimsav\Backup\Storage\Exceptions\InvalidStorageException;
interface Storage {
/**
* Validates its properties.
*
* @return void
* @throws InvalidStorageException
*/
public function validate();
/**
* Copies the selected file to the s... | true |
23be633e729ebd8ce222bcf081d77d9ea359314b | PHP | floegel/brainteaser-api | /src/Brainteaser/Domain/Exercise/ColoredTiles/GridSizeFactory.php | UTF-8 | 1,216 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Brainteaser\Domain\Exercise\ColoredTiles;
use Brainteaser\Domain\Exercise\Difficulty;
use Brainteaser\Domain\Exercise\GridSize;
class GridSizeFactory
{
/**
* @param Difficulty $difficulty
* @return GridSize
*/
public function build(Difficulty $difficulty) : GridSize
{
... | true |
e4bb5fdef51f2cf2074d1c690bd06f841d7abd83 | PHP | akDeveloper/Aktive-Merchant | /lib/AktiveMerchant/Billing/Gateways/Pin.php | UTF-8 | 11,512 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
namespace AktiveMerchant\Billing\Gateways;
use AktiveMerchant\Billing\Interfaces as Interfaces;
use AktiveMerchant\Billing\Gateway;
use AktiveMerchant\Billing\CreditCard;
use AktiveMerchant\Billing\Response;
use AktiveMerchant\Common\Options;
use A... | true |
6b1b1397e938e7bbda87d8cb4778d79c94fd38a3 | PHP | KostyaRyabov/TriTochki | /resource/action/user_chat_knock.php | UTF-8 | 866 | 2.625 | 3 | [] | no_license | <?php
/*!
\file
\brief Заявка на вступление в чат
*/
// Подключение ядра
include($_SERVER["DOCUMENT_ROOT"]."/core.php");
// Ид текущего чата
$chat = treat(intval($_POST["chat"]));
if(!$chat) exit("Wrong chat id!");
// Получение текущего пользователя
$user_data = userData();
$user_id = $user_data["id... | true |
7507dbdd1c59fc8e203d393af818098d174c9a5b | PHP | enginbakir/MyTests | /jQueryPostDeneme.php | UTF-8 | 1,880 | 2.609375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<?php
if(isset($_POST['name'])){
$query = "SELECT * FROM student where name=".$_POST['name'];
echo $query;
}
if(isset($_POST['city']))
echo... | true |
e811438ff795289a2901873660f90d5d59bb799b | PHP | link2zain/webmagic_dashboard | /src/Core/Content/Exceptions/FieldNotDefined.php | UTF-8 | 438 | 2.71875 | 3 | [] | no_license | <?php
namespace Webmagic\Dashboard\Core\Content\Exceptions;
class FieldNotDefined extends \Exception
{
/**
* SectionNotDefined constructor.
*
* @param string $fieldName
* @param $object
*/
public function __construct(string $fieldName, $object)
{
$class = get_class... | true |
d8c93f3f21d68280085f538aca7f6bc8bf3c1fab | PHP | sellastica/data-grid | /src/Model/DataGridHeaderColumn.php | UTF-8 | 2,519 | 2.875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
namespace Sellastica\DataGrid\Model;
use Sellastica\Entity\Sorter;
class DataGridHeaderColumn
{
use \Nette\SmartObject;
const TYPE_TEXT = 'text',
TYPE_SORTABLE = 'sortable',
TYPE_CHECKBOX = 'checkbox',
TYPE_BULK_ACTIONS = 'bulkActions';
/** @var array */
private $class = [];
/** @var string *... | true |
4aeac75a42c298f4474ff2bbf8b206f48365fc1c | PHP | adpauly/checkmycomposer-commands | /CmC/Helper/UploadHelperInterface.php | UTF-8 | 767 | 2.703125 | 3 | [] | no_license | <?php
namespace CmC\Helper;
interface UploadHelperInterface
{
/**
* Upload requirements on www.checkmycomposer.com with cURL
* @param array $requirements
* @param string $syncToken Synchronization token (give on www.checkmycomposer.com/user/projects)
*
* @return string $response Server'... | true |
9b510a8de435bcf5e9952b9028cba9ca1f0b239b | PHP | scento/phalcon | /src/Phalcon/DI/Service/Builder.php | UTF-8 | 10,226 | 2.859375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Service Builder
*
* @author Andres Gutierrez <andres@phalconphp.com>
* @author Eduar Carvajal <eduar@phalconphp.com>
* @author Wenzel Pünter <wenzel@phelix.me>
* @version 1.2.6
* @package Phalcon
*/
namespace Phalcon\DI\Service;
use \Phalcon\DI\Exception;
use \Phalcon\DiInterface;
use \ReflectionCla... | true |
7b22a19925535f58d58430e209b4f01310c7d31a | PHP | lcarbonaro/student | /backend/setup.php | UTF-8 | 7,491 | 2.59375 | 3 | [] | no_license | <?php
require_once 'includes/rb.db.inc.php';
/* set up Smith family
$family = R::dispense('family');
$family->last_name = 'Smith';
$family->first_name = 'Mario';
$family->address_line_1 = '123 Main Street';
$family->address_line_2 = 'Apt. 5432';
$family->city = 'Brampton';
$family->postal_code = 'L6S 2J4';
... | true |
5a4ab8d0e822bf6087eb2baaed0261a3fc59f661 | PHP | wladimirfalcao/sistema-hospital | /Projeto/Arquivos PHP e HTML/SisHospBiblioteca.php | ISO-8859-1 | 2,908 | 3.71875 | 4 | [] | no_license | <?php
define(TAMANHO_CPF, 14);
function TamanhoDeUmaString(string $str)
{
/*
* essa funo retorna um inteiro
* representando o tamanho
* de uma string passada como parmetro
*/
$result= (int) 0;
foreach($str as $c)
{
$result= (int) $result + 1;
}
return $result;
... | true |
aa8023446cfa003fd0c04fa1341a2d641390b093 | PHP | AnitaAnnaStephen/COMP606A2 | /libs/dbconnect.php | UTF-8 | 412 | 2.5625 | 3 | [] | no_license | <!-- Database connection page -->
<?php
error_reporting(0);
//parameters for database connection
$user = "testuser";
$password = "testuser";
$database = "assignment2";
$host = "localhost";
$mysqli = mysqli_connect($host, $user, $password, $database);//connecting to database
if ($mysqli == false){
header("location:... | true |
ed6a9bdce35ceaebe03e47e89a15746de49ee441 | PHP | DzMcHUB/PHPasignments | /nd9-for0601-02/Krepsys.php | UTF-8 | 744 | 3.109375 | 3 | [] | no_license | <?php
class Krepsys {
const DYDIS = 500;
private $pririnktaGrybu = 0;
// public function rinktiGrybus(){
// $krepsioSvoris = 0;
// do{
// $grybas = new Grybas;
// if($grybas->valgomas && !$grybas->sukirmijes){
// $this->pririnktaGrybu++;
// ... | true |
8dc03d2435065e80f77226d5d1404e7675b25ee0 | PHP | jamesvweston/stripe-php | /src/Responses/BankAccount.php | UTF-8 | 5,438 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace jamesvweston\Stripe\Responses;
/**
* Class BankAccount
* @see https://stripe.com/docs/api#customer_bank_account_object
* @package jamesvweston\Stripe\Responses
*/
class BankAccount extends BaseObject
{
/**
* @var string
*/
protected $account;
/**
* @var string
*/... | true |
f902f58d40a29abd310c9a6d699dc3d5b12a8a3d | PHP | stealkillradio/tets | /mysql.php | UTF-8 | 335 | 2.53125 | 3 | [] | no_license | <?php
$link = @mysqli_connect('mysql', 'root', 'test');
if(!$link) {
die('failed to connect to the server: ' . mysqli_connect_error());
}
if(!@mysqli_select_db($link, 'test_database')) {
die('failed to connect to the database: ' . mysqli_error($link));
}else{
die('MySQL version is: ' . mysqli_get_server_i... | true |
bfc76978b7e2ebfc0d7b9a12cc84337690d0efa9 | PHP | ashwin1111/Guvi-Task | /save.php | UTF-8 | 1,742 | 2.578125 | 3 | [] | no_license | <?php
if(isset($_POST['submit'])) {
$file = "data.json";
if (!unlink($file))
{
//echo ("Error deleting $file");
}
else
{
// echo ("Deleted $file");
}
$file = "data.json";
$json_string = json_encode($_POST, JSON_PRETTY_PRINT);
file_put_contents($file, $json_string, FILE_APPEND);
$file =... | true |
a791077ac97def600e23cfe35f2ea82153887503 | PHP | carlostoquero/porra | /controller/Comun.php | UTF-8 | 613 | 3 | 3 | [] | no_license | <?php
function JornadaComenzada($jornada){
$ahora = new DateTime("now");
$inicio_jornada = new DateTime($jornada->fecha_inicio);
return ($ahora > $inicio_jornada);
}
// Usado tanto para Partidos como para Pronosticos
function Signo($elemento){
$signo = '';
if (isset($elemento) and (is_numeric($element... | true |
553396fdf14a0448569f5ee077733fd61d590b1f | PHP | GZJSWX/swoole | /Udp.php | UTF-8 | 688 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2020/12/2
* Time: 17:58
*/
class Udp
{
private $server = null;
public function __construct()
{
$this->server = new Swoole\Server("127.0.0.1", 9502, SWOOLE_PROCESS, SWOOLE_SOCK_UDP);
$this->server->set([
'work... | true |
3c0071c2b88b9c3405c26f200058966d451bfe58 | PHP | aboleon/metaframework | /src/Models/Setting.php | UTF-8 | 2,371 | 2.53125 | 3 | [] | no_license | <?php
namespace MetaFramework\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
class Setting extends Model
{
public $fillable = ['name', 'value'];
public static function getValidationRules(): array
{
return self::getDefinedSettingFiel... | true |
e8b691306f7d91bc5b3972d7f0650b5d008ef280 | PHP | ckl983/library | /includes/WPLib/WPApi/Swoole.php | UTF-8 | 2,251 | 2.640625 | 3 | [] | no_license | <?php
/**
* Swoole::send
*
* @author
* @copyright 2014-2018
*/
namespace WPLib\WPApi;
use WPLib\WPApi,
Logger,
WPLib\Message;
class Swoole extends WPApi
{
/**
*
*/
public static function send($module_name, $data = '', $type = null, $options = [], $timeout = 3, $connection_timeout = 3, $retry_time = 1)
... | true |
17a624ccd5041ac9328d70ff2fafe57d0f76f797 | PHP | TomatoPana/DesarrolloWeb | /Practica 1/Control.php | UTF-8 | 278 | 2.5625 | 3 | [] | no_license | <?php
include_once('Calculadora.php');
$obj = new Calculadora();
$numero1 = $_POST['num1'];
$numero2 = $_POST['num2'];
$operador = $_POST['op'];
$obj->setNumero1($numero1);
$obj->setNumero2($numero2);
$obj->setOperador($operador);
echo 'La Operación es: '.$obj->getResultado(); | true |
c7d336ef420a28380e302ce3c8e7354ec36b8d5a | PHP | InnovusLATAM/Empiric | /endpoints/EndPoint.php | UTF-8 | 5,624 | 2.796875 | 3 | [] | no_license | <?php
chdir(__DIR__);
include_once '../database/DataBase.php';
chdir(__DIR__);
include_once 'Crud.php';
include_once 'CrudOperations.php';
chdir(__DIR__);
include_once '../utils/ServerData.php';
chdir(__DIR__);
class EndPoint extends DataBase implements Crud
{
private string $endpoint;
private array $db_field... | true |
cbbd62109fbda8f32f1d24537bb7cbc8ccc7ec81 | PHP | BasterCz/DB_view_IP | /pages/room/mistnost.php | UTF-8 | 2,049 | 2.546875 | 3 | [] | no_license | <?php
require_once "../../_includes/bootstrap.php";
require_once "../../_includes/db.php";
require_once "../../_includes/functions.php";
$m = new MustacheRunner();
session_start();
$loggedIn = $_SESSION['loggedIn'] ?? false;
$roomId = (int) ($_GET['roomId'] ?? 0);
$roomId > 0 ? $badgateway = false : $badgateway =... | true |
becc8b8e256e70b4aa8839d93e18d59825695984 | PHP | jingmian/SuperCooperationAPI | /app/Http/Controllers/Pool/ArticleController.php | UTF-8 | 1,772 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Http\Controllers\Pool;
use App\Consts\GlobalConst;
use App\Exceptions\BusinessException;
use App\Http\Controllers\Controller;
use App\Services\Pool\ArticleService;
use Illuminate\Http\Request;
class ArticleController extends Controller
{
protected $articleService;
public function __constr... | true |
e73ea4ffea62d3516a64cb9bc2df2c88020a107c | PHP | mynameshixin/shixin | /app/Services/Admin/ImageService.php | UTF-8 | 5,150 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: yantingting
* Date: 15/7/21
* Time: 下午12:36
*/
namespace App\Services\Admin;
use App\Lib\LibUtil;
use App\Lib\ResizeImage;
use App\Models\Images;
use App\Services\ApiService;
use Illuminate\Support\Facades\Log;
class ImageService extends ApiService
{
/**
* @retur... | true |
184bc7197b8abffa480445ffe5342ae1dad7f09c | PHP | OsCordero/masterfumigaciones | /database/migrations/2020_10_30_155719_create_suppliers_table.php | UTF-8 | 1,072 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSuppliersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('suppliers', f... | true |
5cd8cf90644a8f1bf4f8647685ca0db05c55f58c | PHP | adlouniahmad-dev/idreader | /src/Entity/Schedule.php | UTF-8 | 1,561 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ScheduleRepository")
*/
class Schedule
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Enti... | true |
0428862b0a848b40f041b48521709ea572da3f7e | PHP | gjhuerte/laravel-tms-deprecate | /app/Models/Ticket/Ticket.php | UTF-8 | 3,454 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Ticket;
use app\Models\User\User;
use App\Models\Ticket\Tag;
use App\Scopes\StatusScope;
use App\Scopes\TicketIdScope;
use Auxilliary\Generator\Code;
use Illuminate\Support\Carbon;
use App\Models\Ticket\Activity;
use App\Models\Ticket\Category;
use Illuminate\Database\Eloquent\Model;
use Il... | true |
d210b36843c3052c0c8fb8020ec6c6749da5ee87 | PHP | gsokolowski/laravel-social51 | /app/Models/User.php | UTF-8 | 4,223 | 2.703125 | 3 | [] | no_license | <?php
namespace Social\Models;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
class User extends Model implements AuthenticatableContract
{
use Authenticatable;
protected $table = 'users';
protected... | true |
fd117bf7cfc707120b4e8226bb5d7aa26fff76e1 | PHP | urlimited/getoncourse | /api_logging/app/Models/LoggerMessage.php | UTF-8 | 1,963 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use App\Enums\EmergencyLevel;
use Exception;
class LoggerMessage
{
protected string $message;
protected string $initiator;
protected string $emergencyLevel;
/**
* LoggerMessage constructor.
* @param string $dataJson
* @throws Exception
*/
public fu... | true |
fdb1c345620e2385cc75eb4e4e05626439ca82ee | PHP | njerucyrus/kyp | /kenyapesa-hotfix/models/class.auth.php | UTF-8 | 1,440 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: hudutech
* Date: 3/15/17
* Time: 1:02 AM
*/
require_once __DIR__.'/../db/class.db.php';
class Auth{
private $token;
public function authenticate($username, $password)
{
global $conn;
try {
$stmt = $conn->prepare("SELECT * FROM user... | true |
4d0fa326b5d0e25aa660c69e0e6f33cdd6724258 | PHP | Catfeeds/da_frame | /Administrator/Common/Model/goods_fcodeModel.class.php | UTF-8 | 1,316 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 商品F码模型
* * @大商城 (c) 2014-2018 SHOPDA Inc. http://www.shopda.cn
* @license http://www.shopda.cn
* @link 交流群号:387110194
* @since 大商城荣誉出品
*/
namespace Common\Model;
use Common\Lib\Language;
use Common\Lib\Model;
use Common\Lib\Db;
class goods_fcodeModel extends Model {
public function... | true |
58219b3385a7b4d5e71a4e07a21e482e6c9024e3 | PHP | spring121121/shwh | /app/Http/Services/UserService.php | UTF-8 | 3,205 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Services;
use App\models\FocusModel;
use App\models\GradeModel;
use App\models\ScoreModel;
use App\models\UserModel;
class UserService
{
public static function getUid($request)
{
$userInfo = $request->session()->get('userInfo');
if(empty($userInfo)){
$uid... | true |
31c0d7f9af2207208b99eacf714a5770958ec4ce | PHP | marcvifi10/Curso-PHP-y-MySQL | /16 - BDD MySQL/91 - Creacion de blog Ill/InsertarContenido.php | UTF-8 | 1,778 | 2.78125 | 3 | [] | no_license | <html>
<head>
<title></title>
<meta charset="utf-8">
</head>
<body>
<?php
$conexion = mysqli_connect("localhost", "user", "1234", "bddBlog");
/* Comprobar conexion */
if(!$conexion)
{
echo "La conexion ha fallado: ".mysqli_error();
exit();
}
if($_FILES['imagen']['error'])
... | true |
cbfb3a963ee3f6ea87c129e1959900745443e54f | PHP | ntentan/honam | /src/engines/php/HelperVariable.php | UTF-8 | 3,002 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
* Ntentan Framework
* Copyright (c) 2010-2015 James Ekow Abaka Ainooson
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation ... | true |
a12c2653c88f5daca58f5b3087eedde9b4accc98 | PHP | pcdinh/atom | /library/classes/atom/cache/driver/redis.php | UTF-8 | 1,156 | 3.046875 | 3 | [
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | <?php
/**
* Cache Access Layer implementation. This namespace controls all access to the
* caching resources. Multiple drivers for the cache's can be loaded at the same
* time, along with multiple connections, even to the same cache.
*
* @package Atom
* @subpackage Library
*/
namespace Atom\Cache;
/**
* Re... | true |
c6496620fde6e9071833c9c9d76832702dc51a05 | PHP | DonMilligan/caffeine_twitter | /modules/blog/controllers/admin_post.php | UTF-8 | 6,849 | 2.71875 | 3 | [] | no_license | <?php
class Blog_Admin_PostController extends Controller {
/**
* Displays a table of blog posts.
*
* Route: admin/blog/posts/manage
*/
public static function manage()
{
$table = Html::table();
$table->addHeader()->addCol('Title', array('colspan' => 2));
... | true |
58654e8a0c6584ff40771ffc7be6239756f48207 | PHP | bit-oasis/bitfinex-api | /src/BitOasis/Bitfinex/Websocket/Channel/Trade/TradeMessage.php | UTF-8 | 1,242 | 3.140625 | 3 | [] | no_license | <?php
namespace BitOasis\Bitfinex\Websocket\Channel\Trade;
use BitOasis\Bitfinex\Utils\DateTimeUtils;
/**
* @author David Fiedor <davefu@seznam.cz>
*/
class TradeMessage {
/** @var string */
protected $id;
/** @var int in milliseconds */
protected $timestamp;
/** @var float */
protected $amount;
/**... | true |
d3a09d92d1da7c0bc467f3327e6fc8213b4ef898 | PHP | wp-plugins/resume-extended | /sections/resume-ext-awards.php | UTF-8 | 4,001 | 2.671875 | 3 | [] | no_license | <?php
/**
* Awards Section
* manage everything that has to do with the awards section.
*
* @package resume-extended
* @subpackage resume-extended-sections
* @since 0.2
* @author Aaron Spaulding
**/
require_once('resume-ext-section.php');
class resume_ext_awards
extends resume_ext_section
implements resume_... | true |
1b6a432e773bf512071b991bf57957e5263bb9d5 | PHP | timbec/weil-hoverable | /includes/load-meta-box.php | UTF-8 | 3,923 | 2.578125 | 3 | [] | no_license | <?php
// function add_meta_box() {
// add_meta_box( 'hoverable_meta_box', __( 'Hoverable', 'hoverable' ), array( $this, 'hoverable_meta_box' ), 'hoverable', 'normal' );
// }
function load_meta_box() { ?>
<span class="hov-add">
<img src="<?php echo WP_PLUGIN_URL; ?>/hoverable/assets/add.png" t... | true |
4359c5fadf24e2751b9999ebc48b16d9c194ae04 | PHP | Whyounes/kayo-commands | /src/Commands/TranslateCommand.php | UTF-8 | 8,085 | 2.6875 | 3 | [] | no_license | <?php
namespace KAYO\Commands;
use Symfony\Component\Console\Command\Command as SymfonyCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Finde... | true |
06cd5cb67e37aac8dbcbc969abf45b13f509ea14 | PHP | danilor/Luminus | /modules/currencies/currencies.php | UTF-8 | 4,911 | 2.671875 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
namespace Modules;
// Necesitamos extender el DModule
use App\Classes\DModule\DModule;
use App\Classes\DModule\DModuleMenuItem;
use App\Classes\DModule\DModuleTable;
use App\Classes\DModule\DModuleMenu;
use App\Classes\DModule\DModuleRequest;
use App\Classes\DModule\DModuleResponseJson;
use App\Classes\DModule\... | true |
fa5c53ff091b41d0b67c52161d887e4ce59a5500 | PHP | impuls666/realityv2 | /app/Http/Controllers/MarkerController.php | UTF-8 | 2,597 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Marker;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Input;
class MarkerController extends Controller
{
//
public function index()
{
$markers = DB::table('markers')->get();... | true |
f148aae0d091358cd7c7e0763cda0cd88ebe216e | PHP | Luk0s/sabrocito | /model/dao/Otro.php | UTF-8 | 2,535 | 2.765625 | 3 | [] | no_license | <?php
namespace model\dao;
use PDO, PDOException;
class Otro extends Bd
{
public static function nuevo(\model\Otro $otro){
try{
$sql = "INSERT INTO otro (descripcion, precio, visible) VALUES(:descripcion, :precio, 1);";
$sth = self::conexion()->prepare($sql);
$sth->exec... | true |
1e0538a19f29973ea9e6d136d24eda808bd54243 | PHP | krzysztofrewak/pwsz-inf-resources | /s3-inf-ppo/laboratoria/lab04/php/index.php | UTF-8 | 1,384 | 3.65625 | 4 | [
"MIT"
] | permissive | <?php
class WinnerWasCalled extends Exception {}
class Log {
static function info(string $message = ""): void {
echo $message . PHP_EOL;
}
}
class Dice {
function roll(): int {
$result = rand(1, 6);
Log::info("Dice roll: " . $result);
return $result;
}
}
class Pawn {
public $position;
public $nam... | true |
095e2f731616a79065ccc537a677f02f6be8fafe | PHP | dodih2/ace | /application/controllers/Laporanpdf.php | UTF-8 | 2,747 | 2.734375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
Class Laporanpdf extends CI_Controller{
function __construct() {
parent::__construct();
$this->load->library('pdf');
}
function index(){
$pdf = new FPDF('L','mm','A4');
// membuat halaman baru
$pdf->AddPage();
// setting jenis font yang akan digunakan
... | true |
9a4b74d6b7857979ce7f33fd23032ea3c08d4f50 | PHP | skymanla/susino | /www/lib/file_upload.php | UTF-8 | 1,686 | 2.6875 | 3 | [] | no_license | <?
//파일업로드 함수
$max_size = 1024*20*1000;
$uploadOk = 1;
$file1 = $_FILES["file1"]["name"];//file1에 있는 파일 이름!
if($file1 != NULL)
{
$new_file1 = "";
$regfile = $flag.Date("ymdHis");//$flag에 Date("ymdHis")를 붙여줌..
$uploadOk = 1;
$file_ext = explode(".", $file1);//.을 배열로 만들어줌..
$target_dir = "../data/".$flag.... | true |
cb10018b1cbf91f6e7e80edf9348dc9c44674c17 | PHP | jonoirwinrsa/Markov-Chain-Rap-Generator | /getVerifiedArtists.php | UTF-8 | 546 | 2.859375 | 3 | [] | no_license | <?php
// Let's include our PHP Simple HTML DOM Parser.
include('simple_html_dom.php');
/*
* Retrive list of artists
*
* @param string $artist Name of the artist.
* @return array Discography data (name, link)
*/
for($x=1; $x < 500; $x++){
$html = file_get_html( 'http://genius.com/verified-artists?page='.$x );
//ec... | true |
fa6e79f580c105f8e6bdc61c9df9a7d2487f5fad | PHP | LaravelChen/easy_lumen_api | /app/Com/Response/ResponseData.php | UTF-8 | 4,751 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Com\Response;
use App\Com\Traits\ArrayAccessTrait;
use App\Com\Traits\JsonableTrait;
use App\Com\Traits\JsonSerializableTrait;
use ArrayAccess;
use Illuminate\Support\Arr;
use JsonSerializable;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Sup... | true |
3675aa686a439bc48162d9fa44d95c397f93b875 | PHP | refi-github/Host2Host | /api/protected/controllers/DebtorController.php | UTF-8 | 1,228 | 2.578125 | 3 | [] | no_license | <?php
namespace app\controllers;
use Yii;
use yii\web\Controller;
use yii\web\Response;
use app\models\Debtor;
use app\models\Partner;
class DebtorController extends Controller
{
public function actionCreate()
{
Yii::$app->response->format = Response::FORMAT_JSON;
$model = new Debtor... | true |
03f91da164d71131d7ce0397e2650a51a08f9770 | PHP | hir0nobu0tas/seisan_2 | /lib/com_func2.php | UTF-8 | 1,772 | 3.125 | 3 | [] | no_license | <?php
//-------------------------------------------------------------------
// com_func2.php
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// テキストファイル->配列
//
// 引数 $txt_data = フルパスファイル名
// 戻り値 return = 1行毎に配列格納
//-------... | true |
71b867d2a4ee843be26e68b23383b852a007330a | PHP | prabhatojha/gizmos | /model/util/validateText.php | UTF-8 | 877 | 2.640625 | 3 | [] | no_license | <?php
/**
*
*/
class ValidateUserData
{
/*function __construct(argument)
{
# code...
}*/
function validateDate($value='')
{
$value=trim($value);
$pieces=explode('/', $value);
if(count($pieces)==3 && ctype_digit($pieces[0]) && ctype_digit($pieces[1]) && ctype_digit($pieces[2]))
if(checkdate($pieces[... | true |
67e747e97504a6ccb2387651970066b7d232720a | PHP | luciano/studying_laravel | /lsapp/routes/web.php | UTF-8 | 1,566 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... | true |
67d2b48e949537c77d9fbf4e8d3ca15a4ce52d89 | PHP | Casper0513/bitcoin-faucet-rotator-v2 | /database/seeds/LanguagesSeeder.php | UTF-8 | 1,040 | 2.765625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
use App\Models\Language;
/**
* Class LanguagesSeeder
*
* @author Rob Attfield <emailme@robertattfield.com> <http://www.robertattfield.com>
*/
class LanguagesSeeder extends BaseSeeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Schema::d... | true |
a60545c49e05d89cef6dbb57f3e0472a9d4e68fd | PHP | joseandres25/udemylaravel | /app/Contact.php | UTF-8 | 347 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Contact extends Model
{
//
public function user()
{
return $this->belongsTo('User::class');
}
public function categorie()
{
return $this->belongsTo('Categorie::... | true |
dc8a4688a7d722601fd2a3b28de7e87c0f29b3fe | PHP | lingtalfi/bee | /fakeapp/web/libs/php/module-grappin-functions/1.0/functions.php | UTF-8 | 3,360 | 2.703125 | 3 | [] | no_license | <?php
//------------------------------------------------------------------------------/
// MODULE STANDARD FUNCTIONS
//------------------------------------------------------------------------------/
/**
* 2014-10-27
* by LingTalfi
*
* Just copy paste this file for every new module you create.
* Or, if you are a ... | true |
beb9f0a4c40730c9df615783f571b4214e2c7ca9 | PHP | CodeDone4U/niche-one | /wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/PersonalizeStore.php | UTF-8 | 1,833 | 2.625 | 3 | [
"GPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-or-later",
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"GPL-2.0-or-later"
] | permissive | <?php
/**
* WooCommerce Admin Personalize Your Store Note Provider.
*
* Adds a note to the merchant's inbox prompting them to personalize their store.
*/
namespace Automattic\WooCommerce\Admin\Notes;
defined( 'ABSPATH' ) || exit;
/**
* Personalize_Store
*/
class PersonalizeStore {
/**
* Note traits.
*/
u... | true |
54e8d32aec7e0ff726cf497ab8175cd9b0123711 | PHP | ClassConnect/ClassConnect-Core | /core/inc/func/app/quiz/main.php | UTF-8 | 541 | 2.671875 | 3 | [] | no_license | <?php
// create a question set
function create_question_set($title, $points) {
$set = array();
$set['title'] = $title;
$set['points'] = $points;
return $set;
}
// end create_question_set
// create a multiple choice question
function create_mcq($question_set, $question_text, $answer_list, $answer_key)... | true |
c2ef186edd2301a976a46a0588d76e09126fb542 | PHP | friendsofhyperf/components | /tests/ValidatedDTO/Unit/CallableCastTest.php | UTF-8 | 1,103 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* This file is part of friendsofhyperf/components.
*
* @link https://github.com/friendsofhyperf/components
* @document https://github.com/friendsofhyperf/components/blob/main/README.md
* @contact huangdijia@gmail.com
*/
use FriendsOfHyperf\ValidatedDTO\Exception\CastExcept... | true |
a333663d8f8e363f4666599b133b27a92ee2d0d3 | PHP | arun057/framework | /application/modules/cms/models/links_model.php | UTF-8 | 3,919 | 3.03125 | 3 | [] | no_license | <?php
require_once 'cms_model.php';
//
// this is for blog roll, or other simple list of links
//
class Links_model extends CMS_Model {
var $id = '';
var $url = '';
var $name = '';
var $image = '';
var $target = '_blank';
var $description = '';
var $visible = 'Y';
var $owner = '1';
... | true |
79299cb1ef91334ffdc8f4dc6659500de606bbef | PHP | RRRemixed/Ravenuke | /includes/nukeSEO/forms/CLinkedSelect.php | UTF-8 | 7,392 | 2.640625 | 3 | [] | no_license | <?php
/*
* Writed by Setec Astronomy - setec@freemail.it
* Modified by Kevin Guske to support 2 dependent fields for nukeFEED
* (http://nukeSEO.com - home of nukeSEO, nukeWYSIWYG, nukeFEED and more)
* This script is distributed under the GPL License
*
* This program is distributed in the ... | true |
f4c7cc92859aa385187b3431a26dc985399a73bd | PHP | irwantsiregar/PHP-Native-Xampp-Compaq-2019- | /belajar_javascript/belajar_javascript/bab_25_ajax/belajar_ajax/tanggal_format.php | UTF-8 | 156 | 2.5625 | 3 | [] | no_license | <?php
date_default_timezone_set("Asia/Jakarta");
$tanggal = date("j F Y, h:i:s A");
echo "<h2>Tanggal saat ini di server: <i>$tanggal</i></h2>";
?> | true |
4db32c064ea6a10fceb0d9ad3d4523fd4b1d708d | PHP | rjkeller/OrangesMongoDbBundle | /Oranges/MongoDbBundle/Helper/FileUploadManager.php | UTF-8 | 2,565 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Oranges\MongoDbBundle\Helper;
/**
File Manager for storing files in the Ajent file system cloud.
@author R.J. Keller <rjkeller@pixonite.com>
*/
class FileUploadManager
{
/**
Stores the specified file upload in GridFS.
@param $upload_field_name - The name of the $_POST[] field where the user
... | true |
02822a2a4d24a70bb535b79c3774788551868773 | PHP | dmitriy-zhuzhniev/laravel | /src/app/Components/Store/Repositories/StoreRepository.php | UTF-8 | 1,317 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Components\Store\Repositories;
use App\Components\Store\StoreEntity;
use App\Models\Store;
class StoreRepository implements StoreRepositoryContract
{
public function all()
{
return Store::all();
}
public function byId(int $id): StoreEntity
{
$store = Store::fi... | true |
9549152b19a66cea87ff4976ea00c2c9c15a6c1b | PHP | GregHolmes/vonage-php-sdk-core | /src/Client/Credentials/AbstractCredentials.php | UTF-8 | 1,122 | 2.703125 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
/**
* Vonage Client Library for PHP
*
* @copyright Copyright (c) 2016 Vonage, Inc. (http://vonage.com)
* @license https://github.com/vonage/vonage-php/blob/master/LICENSE MIT License
*/
namespace Vonage\Client\Credentials;
abstract class AbstractCredentials implements CredentialsInterface
{
protected... | true |
aeb1d9d5497f68f7bf765677b68c21f7fedc8bed | PHP | Mirko-Solutions/t3customroutes | /Classes/Configuration/Configuration.php | UTF-8 | 1,097 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Mirko\T3customroutes\Configuration;
class Configuration
{
/**
* @return array
*/
public static function getProcessors(): array
{
return self::getClassNamesSortedByPriority(
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3customroutes']['pro... | true |
bf43cf1313a752b44ee5cc0b629abe6ee3fe3adf | PHP | isnotempty/laravel-cron-bundle | /src/Helpers/JobLogger.php | UTF-8 | 3,586 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tolacika\CronBundle\Helpers;
use Carbon\Carbon;
use Tolacika\CronBundle\CronBundle;
use Tolacika\CronBundle\Models\CronJob;
use Tolacika\CronBundle\Models\CronLog;
class JobLogger
{
/**
* Universally creates a log entry based by config
*
* @param $action
* @param CronJob $jo... | true |
8fb5f6e9dae2cf34d10981f08b7c614a48b847a8 | PHP | RanjithkumarAnkam/motorcar | /components/RightsignatureComponent.php | UTF-8 | 1,527 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\components;
use Yii;
use yii\base\Component;
use app\models\TblAcaSharefileFolders;
use app\models\TblAcaSharefileEmployees;
use app\models\TblAcaCompanies;
use app\models\TblAcaBrands;
class RightsignatureComponent extends Component {
/***** function to get the document details based on recip... | true |
57494c9fed2a398cdc9fedd5ee7ce1922c051908 | PHP | FLUX-SE/odoo-api-client | /src/PhpGenerator/OdooModelsStructureConverterHelper.php | UTF-8 | 2,147 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace FluxSE\OdooApiClient\PhpGenerator;
use DateTimeInterface;
use FluxSE\OdooApiClient\Model\OdooRelation;
final class OdooModelsStructureConverterHelper
{
/**
* @param array<string, string> $fieldInfo
*
* @return array<int, string>
*/
public static f... | true |
c4d23cdc107c6bd811554e50ff82f9ad10c1940f | PHP | PrestaShop/prestafony-project | /modules/developer_tools/developer_tools.php | UTF-8 | 2,996 | 2.6875 | 3 | [] | no_license | <?php
/**
* @author Mickaël Andrieu <andrieu.travail@gmail.com>
*
* This module register every available hook in PrestaShop application
* and display a useful block to show where the hook is rendered.
*/
class Developer_Tools extends Module
{
/**
* @var array the full list of registered hooks.
*/
... | true |
e0c1d0360b4a57683aac515306fd0870448afc6c | PHP | themilanguy1/DEVEL-H4 | /opdracht 5.php | UTF-8 | 129 | 3.46875 | 3 | [] | no_license | <?php
$var = 3;
if ($var % 2 == 0) {
echo "Is het getal $var even? Ja";
}
else {
echo "Is het getal $var even? Nee";
}
?> | true |
7e08c292a57a87be5fa8d4e3b7cf63793f5e4b74 | PHP | aminin/delayed | /src/Delayed/Job.php | UTF-8 | 5,815 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace AMinin\Delayed;
class Job extends Base implements JobInterface
{
public static $performRatherThanEnqueue = false;
public static $defaultQueue = 'default';
public static $delayBeforeRetryAfterError = 60;
protected $id;
protected $attempts = 0;
protected $createdAt;
protecte... | true |
3563c4e9ef769342d403e04dfec30ebff2ae56f4 | PHP | dylanlew/IIDR_v2 | /iiadmin/rawmenu.php | UTF-8 | 846 | 2.5625 | 3 | [] | no_license | <?php
include_once("sitedef.php");
class RawMenuPage extends AdminPage
{
function __construct()
{ parent::__construct();
} // end of fn __construct
function AdminBodyMain()
{ $adminmenu = new AdminMenu($this->user, $_GET["id"]);
if ($adminmenu->menuitems)
{ echo "<ul>";
foreach ($adminmenu->menuitem... | true |
e347316b509289bdc17641000d413bf517768313 | PHP | rollenes/biter | /biter/src/Rollen/Biter/BitSequenceIterator.php | UTF-8 | 2,442 | 3.234375 | 3 | [] | no_license | <?php
namespace Rollen\Biter;
class BitSequenceIterator implements \Iterator
{
private $sequenceLength;
private $resource;
private $current = 0;
private $buffer = '';
public function __construct($resource, $sequenceLength)
{
$this->checkResource($resource);
$... | true |
ed379b6674ac205766002d68ad9391dea2c1e642 | PHP | danchukas/AmadeusTask2 | /src/AlgorithmLib/Sha1.php | UTF-8 | 391 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
/**
* Created by PhpStorm.
* User: danchukas
* Date: 2018-03-30 10:40
*/
namespace DanchukAS\Crypt\AlgorithmLib;
use DanchukAS\Crypt\IData;
class Sha1 implements IDataHandler
{
public function run(IData $data):void
{
$handled_data = \var_export($data->getData(), tr... | true |
18e615c7a4a6f31b3f88ccb1fb750e7e0555c46a | PHP | BIBIOTA/MoonLover | /php/updateMatchMemInterstR.php | UTF-8 | 1,960 | 2.703125 | 3 | [] | no_license | <?php
include("./Lib/MemberClass.php");
$Member = new MemberClass();
$id = $Member->getMemberID();
include("./Lib/UtilClass.php");
$Util = new UtilClass();
// 取得MMC_ID
$sql = "SELECT ID FROM `member_match_condition` where mmcMEMBER_ID = $id";
$statement... | true |
f431b06927ee5cffe37530afd02a1083be8274d3 | PHP | Room-11/Jeeves | /src/Plugins/Lmgtfy.php | UTF-8 | 1,920 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Room11\Jeeves\Plugins;
use Room11\Jeeves\Chat\Command;
use Room11\Jeeves\System\PluginCommandEndpoint;
use Room11\StackChat\Client\Client as ChatClient;
use Room11\StackChat\Client\MessageResolver;
class Lmgtfy extends BasePlugin
{
private const URL = 'http://lmgtfy.com/'... | true |
a6785b1c409ac21337cdf4a2c97a3e12d5e2440c | PHP | eKristensen/beer | /app/Http/Controllers/RoomController.php | UTF-8 | 1,636 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Product;
use App\Room;
class RoomController extends Controller
{
public function index()
{
$rooms = Room::where('active', '=', '1')->get();
$products = Product::where('active', '=', '1')->get();
return view('rooms.index', compact('rooms',... | true |