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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0da260e51f7bdab066e86d78bb22fa8a21a88290 | PHP | brayansdt/tdd-ticket-to-ride | /src/colors/Routes/YellowRoute.php | UTF-8 | 192 | 2.671875 | 3 | [] | no_license | <?php
namespace Colors\Routes;
use Colors\Color;
class YellowRoute extends RouteColor
{
public function compareWithColor(Color $color)
{
return $color->isYellow();
}
} | true |
d5495307077db894fc6fa225343fa6d56916a3e7 | PHP | externall-projects/esp8266-kfc-fw | /lib/KFCWebBuilder/bin/include/ESPWebFramework/FileUtils.php | UTF-8 | 3,978 | 2.984375 | 3 | [] | no_license | <?php
/**
* Author: sascha_lammers@gmx.de
*/
namespace ESPWebFramework;
/**
* Class FileUtils
* @package ESPWebFramework
*/
class FileUtils {
/**
* @var string
*/
private static $baseDir;
/**
* @param string $baseDir
*/
public static function setBaseDir(string $baseDir): voi... | true |
cca5aa4809e5ca3a3fde081c41311cb73f4604db | PHP | maxthink/shop | /application/admin/model/Log.php | UTF-8 | 929 | 2.53125 | 3 | [
"PHP-3.0",
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: nango
* Date: 2018/1/6
* Time: 18:06
*/
namespace app\admin\model;
use app\common\model\Common;
use think\facade\Request;
class Log extends Common {
protected $insert = ['ip','time'];
public function setIpAttr() {
return request()->ip();
}
publ... | true |
2242a51c7463c8e02a7c3f992177fb565b5872ea | PHP | rhazen35/blueberry_v1_noLaravel | /app/core/traits/ProjectConfiguration.php | UTF-8 | 1,616 | 2.75 | 3 | [] | no_license | <?php
namespace app\core\traits;
trait ProjectConfiguration
{
public static function create_version_number( $version )
{
$parts = explode( ".", $version );
$total_parts = count( $parts );
if( $total_parts === 4 ): /** Status is validate */
$version = "0.0.0.1";
... | true |
25e6c1b7d80d086e5d2afd7c2808cac22f4cae17 | PHP | wifidu/yl.back | /database/seeds/AccidentTypesSeeder.php | UTF-8 | 627 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
use App\Model\Accident;
use App\Model\AccidentType;
use Illuminate\Database\Seeder;
class AccidentTypesSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$accidentTypes = [
['type' => '烧伤'],
['type' =>... | true |
e950aee24eb92ad482f14bed72ea6ebf71f0008b | PHP | atsushi-yabui/kadai-microposts | /app/Http/Controllers/FavoritesController.php | UTF-8 | 1,520 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class FavoritesController extends Controller
{
/*public function index()
{
$data = [];
if (\Auth::check()) {
// 認証済みユーザ(閲覧者)を取得
$user = \Auth::user();
// ユーザとフォロー中ユーザの投稿の一覧を作成日時の降順で取得
... | true |
858ab9988376275bc60a0fdb63ab0b4ba8c35981 | PHP | yangxiaoen/PHP_Demo | /demo2-4.php | UTF-8 | 323 | 3.59375 | 4 | [] | no_license | <?php
$one = 200;//全局变量
$two = 300;
function demo(){
global $one,$two;//在函数的内部可以使用全局变量
echo "运算结果为:".($one+$two);//局部变量
}
function demo2(){
$sum = $GLOBALS['one']+$GLOBALS['two'];
echo "运算结果为:".($sum);
}
//demo();
demo2();
?> | true |
9fefe1ac0e3959fd8733b7bac777e6803d9b935e | PHP | timi-codes/HNG-Internship-Test | /index.php | UTF-8 | 2,423 | 3.515625 | 4 | [] | no_license | <?php
//9. Connect to a mysql database and read something from it and display
$HOST = "localhost";
$USERNAME = "root";
$PASSWORD = "root";
$DBNAME = "HNG";
//Create connection
$conn = new mysqli($HOST, $USERNAME, $PASSWORD, $DBNAME);
//Check Connection
if($conn->connect_error){
die("Connection failed: " . $conn-... | true |
dce792c76cd93fc56dbd312eece3f225a11d5772 | PHP | danielascoferta/test_produs | /testProdus/pages/new_product.php | UTF-8 | 806 | 2.5625 | 3 | [] | no_license | <?
if(!empty($_POST['name']) && !empty($_POST['price'])) {
$result = mysqli_query($connection, "SELECT * FROM produse");
if(mysqli_query($connection, "INSERT INTO produse SET name = '{$_POST['Name']}', price = {$_POST['Price']}, category = {$_POST['Category']}")) {
echo 'Succes';
} else {
echo 'Eroa... | true |
3a3a5e58d45a90082d754a3984bd6490a224389d | PHP | samani1847/ecommerce_react | /app/Lib/ClientInterface.php | UTF-8 | 105 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Lib;
interface ClientInterface{
public function login($username, $password);
} | true |
dc1f7ce1f9469d5a04c282bea728195f178eca63 | PHP | tosinezekiel/pangea-test | /app/helpers.php | UTF-8 | 274 | 3.03125 | 3 | [] | no_license | <?php
if(!function_exists('reference_generator'))
{
function reference_generator(string $value, int $length) : string
{
$code = '';
for($i = 0; $i < $length; $i++){
$code .= mt_rand(0,9);
}
return $value.$code;
}
}
| true |
28fc8573483d02f7e167d06a42f3bf907eb80171 | PHP | jeomora/Azteca | /application/models/Reales_model.php | UTF-8 | 967 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Reales_model extends MY_Model {
function __construct(){
parent::__construct();
$this->TABLE_NAME = "reales";
$this->PRI_INDEX = "id_real";
}
public function getReales($where=[]){
$this->db->select("r.id_real,p.nombre,r.precio FROM... | true |
26418ef4962cd8470a89d4a2265dca54f0d6e1fc | PHP | trantrongbinh/FS-Focus | /app/Repositories/VisitorRepository.php | UTF-8 | 2,352 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Tools\IP;
use App\Visitor;
class VisitorRepository
{
use BaseRepository;
/**
* @var $model
*/
protected $model;
/**
* @var IP
*/
protected $ip;
/**
* VisitorRepository constructor.
* @param Visitor $visitor
* @par... | true |
1ecd349067251989ecde32458f73cc384e60a9ad | PHP | h3len/Project | /livsns/.svn/pristine/1e/1ecd349067251989ecde32458f73cc384e60a9ad.svn-base | UTF-8 | 593 | 2.953125 | 3 | [] | no_license | <?php
/**
* 返现
* Created by PhpStorm.
* User: wangleyuan
* Date: 14/11/20
* Time: 10:19
*/
class HgCashReturn extends HgCash
{
//返现条件
private $condition = '';
//返现金额
private $return = '';
public function __construct()
{
parent::__construct();
}
public function __destruc... | true |
8595279f7f080547fe90aba01cbd8b31ce795c6f | PHP | andreiuta97/quizApp | /src/Service/Paginator.php | UTF-8 | 2,442 | 3.359375 | 3 | [] | no_license | <?php
namespace QuizApp\Service;
class Paginator
{
private $totalResults;
private $totalPages;
private $currentPage;
private $resultsPerPage;
public function __construct
(
int $totalResults,
int $currentPage = 1,
int $resultsPerPage = 5
)
{
$this->tot... | true |
d6771c517b5d9d5aba1a5d0cbcbec0ea4e95baf4 | PHP | LeonardoMariut/Ed.Civica | /ARPAV/index.php | UTF-8 | 1,746 | 2.828125 | 3 | [] | no_license |
<?php
function genTable()
{
$dir='sqlite:C:/Work/polveri.db';
$dbh= new PDO($dir) or die("noooo");
$query="SELECT *FROM stazioni";
$stmt = $dbh->prepare( $query );
$stmt->execute();
echo "<table class=\"tab\">";
echo "<thead>";
ec... | true |
3e7d71a1bee3f0d6fb0604b88d85de81937ff3e4 | PHP | jordan-wilson/killdeer | /app/front/models/blogs.model.php | UTF-8 | 6,754 | 2.890625 | 3 | [] | no_license | <?php
class blogs_model extends model
{
// get the total number of blogs
public function get_total_number_of_blogs()
{
$total = 0;
try
{
$stmt = $this->db->prepare("SELECT id FROM blogs WHERE date < :now AND enabled");
$stmt->execute( array(':no... | true |
74152cd7cde63422a71ad46caa9d4273461d1bbc | PHP | julianseymour/php-web-application-framework | /src/data/SoftDeletableTrait.php | UTF-8 | 692 | 2.609375 | 3 | [] | no_license | <?php
namespace JulianSeymour\PHPWebApplicationFramework\data;
use JulianSeymour\PHPWebApplicationFramework\query\column\MultipleColumnDefiningTrait;
trait SoftDeletableTrait
{
use MultipleColumnDefiningTrait;
public function setSoftDeletionTimestamp(int $value): int
{
return $this->setColumnValue("softDeletio... | true |
d40763826b0aff265b48efc7c08e6bf8e899207b | PHP | asantibanez/laravel-blade-sortable-demo | /app/Http/Livewire/SortableForm.php | UTF-8 | 1,123 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Livewire;
use Faker\Generator;
use Livewire\Component;
use Ramsey\Uuid\Uuid;
class SortableForm extends Component
{
public $people = [];
public function mount()
{
$this->addPerson();
$this->addPerson();
$this->addPerson();
$this->addPerson();
... | true |
abdd786cbbd70d7a7271302a061a251b1de052a5 | PHP | ericabouaf/php-qonto | /Qonto/Model/ExternalTransferBuilder.php | UTF-8 | 4,248 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace neyric\Qonto\Model;
/**
* Class ExternalTransferBuilder
* @package neyric\Qonto\Model
* @author MeilleursBiens
*/
class ExternalTransferBuilder
{
/**
* UUID of the beneficiary
*
* @var string UUID of the beneficiary
*/
protected $beneficiary_id;
/**
* IBAN of... | true |
04f3cd1b7422c7765749e4273c5f00f223b87353 | PHP | FerhanGit/Gozbite | /includes/tools/checkSMScodeSpecialitet.php | UTF-8 | 7,277 | 2.515625 | 3 | [] | no_license | <?php
require_once '../header.inc.php';
$Period = '7';
if(isset($_REQUEST['sendCode'])) {
$izbran = trim(htmlspecialchars($_REQUEST['izbran']));
$servID = 6044;
$errors = "";
$message = "";
if(!isset($izbran) || (strlen($izbran) <= 0))
$errors = "<br />... | true |
a9a6076bf8140e0d30fb53035a61f29248d9512c | PHP | eiwuert/Myrepo | /condor_www_root/bfw.1.edataserver.com/include/modules/olp/fcna_handler.php | UTF-8 | 2,307 | 2.5625 | 3 | [] | no_license | <?php
/**
@version:
1.0.0 2005-04-15 - FCNA processing
@author:
Jason Duffy - version 1.0.0
@Updates:
@Todo:
*/
class FCNA_Handler
{
private $collected_data;
private $config;
public function __construct(&$olp, $collected_data, &$applog = NULL)
{
$this->config = $olp->Get_Config();
$this->collected_da... | true |
9c9abab008965f5fa3ebc4746825fdf587d19220 | PHP | JoelLisenby/jbl-locator | /Shortcode.php | UTF-8 | 2,343 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace JBLLocator;
use WP_Query;
class ShortCode {
public $defaults;
public $options;
public $option_name;
public function __construct() {
$this->defaults = array(
'pt_slug' => 'location',
'pt_name' => 'Locations',
'pt_name_singular' => 'Location',
'api_key' => '',
... | true |
085f18ae0a8034e28e2b3dbd988ec52cd3c920b4 | PHP | tabernicola/JukeCloudBundle | /Form/DataTransformer/TextToDiskTransformer.php | UTF-8 | 1,447 | 2.65625 | 3 | [] | no_license | <?php
namespace Tabernicola\JukeCloudBundle\Form\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Doctrine\Common\Persistence\ObjectManager;
use Tabernicola\JukeCloudBundle\Entity\Disk;
class TextToDiskTransformer implements ... | true |
d445afe8c000b5113f6c524b23fe488a0eeaf655 | PHP | wookieb/zorro-data-schema | /src/Wookieb/ZorroDataSchema/Schema/Builder/Implementation/Style/Styles.php | UTF-8 | 1,098 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace Wookieb\ZorroDataSchema\Schema\Builder\Implementation\Style;
use Wookieb\Assert\Assert;
/**
* @author Łukasz Kużyński "wookieb" <lukasz.kuzynski@gmail.com>
*/
class Styles
{
private $styles = array();
/**
* Register new style
*
* @param string $name style name
* @param ... | true |
e2b32054c556e16264db171a12622f0b0e6f114a | PHP | kinghinds/kingtest2 | /protected/components/SearchKeywords.php | UTF-8 | 484 | 2.734375 | 3 | [] | no_license | <?php
class SearchKeywords extends CWidget {
public $keywords = array();
public function run() {
if (empty($this->keywords)) {
return;
}
$keywords = explode(',', $this->keywords);
$items = array();
foreach ($keywords as $keyword) {
$items[] = array(
'label' => $keyword,
'url' => Yii::ap... | true |
9460a8f4ec6448f7cf3e794efb67c815af718be7 | PHP | Yuukikaneko/test1 | /resources/views/layouts/laravelapp_bu/database/seeds/PeopleTableSeeder.php | UTF-8 | 485 | 2.625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class PeopleTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
for ($i=0; $i < 100; $i++) {
$param = [
'name' => 'dummy',
... | true |
81cf269177527ae7333386392c93fb41ca3eb19e | PHP | alejandr0pg/ADRA | /modules/Emergency/Http/Controllers/EventTypeController.php | UTF-8 | 3,047 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Emergency\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller;
use Modules\Emergency\Entities\EventType;
class EventTypeController extends Controller
{
public function __construct()
{
// Pagina para el menú
... | true |
7b7845c74c818672d8ce4307361c6e981dfaf78f | PHP | viktor-melnikov/kladr | /src/Kladr.php | UTF-8 | 1,168 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: viktor
* Date: 19.05.17
* Time: 15:06
*/
namespace Kladr;
use Illuminate\Support\Facades\Config;
use Requester\Http;
use Requester\Request;
/**
* Class Kladr
*
* @method Query find
*/
class Kladr
{
protected $request;
private $query = null;
/**
* ... | true |
4364f4f062bc6139ce96e1f4d92eaad57c6f9134 | PHP | ilariamammucari/laravel-fruttaverdura-crud | /app/Http/Controllers/VegetableController.php | UTF-8 | 3,335 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Vegetable;
class VegetableController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$dati_verdura = Vegetable::all();
... | true |
aa0904303e58cc28959e183a769d5e4a0e023efb | PHP | tlkit/TQT | /vpp/app/models/GroupCategory.php | UTF-8 | 1,794 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: tuanna
* Date: 20/06/2016
* Time: 8:30 CH
*/
class GroupCategory extends Eloquent
{
protected $table = 'group_category';
public $timestamps = false;
protected $primaryKey = 'group_category_id';
protected $fillable = array('group_category_name','group_cat... | true |
b6098a0c8d9226dcab11570da3306cc3d2f54e8a | PHP | cryptobuks1/BlockStarter | /module/Member/src/Member/Model/MedicalRecordEntity.php | UTF-8 | 1,110 | 2.90625 | 3 | [] | no_license | <?php
namespace Member\Model;
class MedicalRecordEntity
{
protected $id;
protected $name;
protected $description;
protected $tags;
protected $created_datetime;
protected $created_user_id;
public function __construct()
{
$this->created_datetime = date('Y-m-d H:i:s');
}
public function getId()
{
return ... | true |
2530b6af8d3a48b7c43c67a17193e11879a3d4fd | PHP | MaxenceDupressoir/CRM | /src/CRM/CoreBundle/Entity/Agenda.php | UTF-8 | 1,701 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace CRM\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Agenda
*/
class Agenda
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var \Doctrine\Common\Collections\Collection
*/
private $appointments;
/**... | true |
a40525d0f3a99e8e9bea96efb902412b127f654f | PHP | agungnurulhuda/pwd-per4 | /hasil_data.php | UTF-8 | 913 | 3.0625 | 3 | [] | no_license | <?php
// Create database connection using config file
include_once("koneksi2.php");
// Fetch all users data from database
$result = mysqli_query($con, "SELECT * FROM user ");
?>
<html>
<head>
<title>Halaman Utama</title>
</head>
<body>
<table width='80%' border=1>
<tr>
<th>N... | true |
9f7f752ee3e41050c9b258c6548935659967f04d | PHP | mazeyarr/Roctracker | /app/HistoryData.php | UTF-8 | 5,677 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
class HistoryData extends Model
{
/**
* This function will generate data for the Dashboard graphs
*
* @return array
*/
public static function generate()
{
$data = array();
foreach (College:... | true |
ea6c9ba7d13504fb1a4037b0bccd6a29e2fc615b | PHP | Hysnijee/Projekti | /components/article.php | UTF-8 | 351 | 3.21875 | 3 | [] | no_license | <?php
class Article{
private $type;
private $description;
public function __construct($type, $description){
$this->type = $type;
$this->description = $description;
}
public function getType(){
return $this->type;
}
public function getDescription(){
ret... | true |
64200d70e293da4c354de305356c79ab6e812887 | PHP | thesponge/glider | /protected/fw/MODELS/single/singleHandler.php | UTF-8 | 528 | 2.53125 | 3 | [] | no_license | <?php
/**
* PHP Version 5.3+
*
* @category
* @package
* @author Ioana Cristea <ioana@serenitymedia.ro>
* @copyright 2010 Serenity Media
* @license http://www.gnu.org/licenses/agpl-3.0.txt AGPLv3
* @link http://serenitymedia.ro
*/
class sponge_interactiv
{
var $caller;
var $objName;
var $spongeb; ... | true |
bbe1c59bb2989719c093728259ba06dd5e315cda | PHP | swoft-cloud/swoft-component | /src/framework/src/Concern/AbstractMiddlewareChain.php | UTF-8 | 2,869 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | <?php declare(strict_types=1);
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://swoft.org/docs
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/
namespace Swoft\Concern;
use Countable;
use RuntimeException;
use SplDoublyLink... | true |
a59650b840812d961663033b510f7c7b20d85323 | PHP | biplovbhandari/ImageDisplay | /php/read-coordinates.php | UTF-8 | 2,223 | 2.71875 | 3 | [] | no_license | <?php
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$path_to_folder = '../metadata';
$image_path = '../image/';
$... | true |
72aeacbb5e209b95bc48e3f42b4a921765f69082 | PHP | vityokkv73/android_retrieval_system_server_side | /Packets/Call.php | UTF-8 | 486 | 2.953125 | 3 | [] | no_license | <?php
include_once 'Packet.php';
class Call extends Packet
{
var $caller;
var $caller_number;
var $recipient;
var $recipient_number;
var $time;
function Call($stream)
{
$this->caller = $this->readString($stream);
$this->recipient = $this->readString($stream);
$this... | true |
4883d1dc3ecb935f3aba742bbb1026f91ab633fb | PHP | web2all/softwear | /app/code/Web2All/Softwear/Api/Data/SyncStateInterface.php | UTF-8 | 1,235 | 2.859375 | 3 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Web2All\Softwear\Api\Data;
interface SyncStateInterface
{
/**
* Get the Id
*
* @return int
*/
public function getId();
/**
* Set the Id
*
* @param int $id
*/
public function setId($id);
/**
* Get the running status
*
*... | true |
a4c695be1406d188bc30eb5e7084e320e536d77e | PHP | ndomenichelli/Comp-3450-Advanced-Web-Project | /model.php | UTF-8 | 3,079 | 2.609375 | 3 | [] | no_license | <?php
// connect to MySQL DB
$conn = mysqli_connect('localhost','ndomenichellf9','ndomenichellf9424','C354_ndomenichellf9');
function insert_new_user($username, $password, $email)
{
global $conn;
if (does_exist($username))
return false;
else {
$current_date = date('Ymd');
... | true |
37a7db4d8c1f2a57a19f350fe115aec34ea52dcc | PHP | 0xtceb/onetouch | /app/libs/xinstall.php | UTF-8 | 5,602 | 2.6875 | 3 | [] | no_license | <?php
class xinstall {
public static function runQueries($sql_file)
{
$file_content = file($sql_file);
$query = array();
$create = $insert = $alter = $update = $drop = $rename = false;
$response = array();
foreach($file_content as $sql_line) {
if(!$sql_line) {
continue;
... | true |
b5716f77c82809f96bb43b95f19c6a394eb3e5c9 | PHP | alexey-kar/AppEx | /AppExGit/AppExCore/classes/core/CAppEx.php | UTF-8 | 348 | 2.90625 | 3 | [] | no_license | <?php
final class CAppEx
{
private static $m_aObjects = array();
public static function run(){}
public function __get($alias)
{
return isset($this->m_aObjects[$alias]) ? $this->m_aObjects[$alias] : null;
}
public function __set($alias, $ref)
{
if (!isset($this->m_aObjects[$alias]))
{
$this->m_aObjects... | true |
0336b456f2031e619c3ff155c759c88e8b9a9d77 | PHP | sandftae/RESTfull | /api.todo.eu/DataProviders/Database/AbstractDataProvider/DataProvider.php | UTF-8 | 958 | 2.78125 | 3 | [] | no_license | <?php
namespace DataProviders\Database\AbstractDataProvider;
use DataProviders\Database\Connector\Connector;
use DataProviders\Config;
/**
* Class DataProvider
* @package DataProviders\Database\AbstractDataProvider
*/
class DataProvider extends Connector
{
/**
* @param string $column
* @param i... | true |
4000705c7a02c621adfc8cce44fe927d36855854 | PHP | webeeq/restapi.eeq | /lib/TopPerson/HttpCurl.php | UTF-8 | 1,495 | 2.75 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Library\TopPerson;
use Library\TopPerson\TopPersonException;
class HttpCurl
{
public static function doRequest(string $requestType, string $pathUrl, array $auth, ?array $data = null): array
{
if (empty($pathUrl)) {
throw new TopPerson... | true |
14fcb88418923715aab2bcfad39b71b47a8b09eb | PHP | garry3peace/smart-rewrite | /components/SpinFormat.php | UTF-8 | 852 | 3.046875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* SpinFormat to manage spin text format
*/
namespace app\components;
class SpinFormat {
/**
* Generate the given array as spin text format
* @param Array $words
* @retunr string text in spin text format
*/
public static function generate($words){
$words = array_filter($words);//remove empty a... | true |
983e5155723eef73215bdec78bbb2aea322e6b7e | PHP | Provence1129/ggt | /App/User/UserData.php | UTF-8 | 20,841 | 2.546875 | 3 | [] | no_license | <?php
/**
* @Copyright (C) 2016.
* @Description UserData
* @FileName UserData.php
* @Author Huang.Xiang
* @Version 1.0.1
**/
declare(strict_types = 1);//strict
namespace App\User;
use \App\Pub\Common;
use \Libs\Comm\Time;
use \Libs\Comm\Valid;
use \Libs\Tag\Db;
use \Libs\Comm\Net;
use \App\Auth\MyAuth;
use \L... | true |
616bae495fd2e357c97617b6b9322f54e96f7612 | PHP | hardeep/AutoGit | /libs/classes/ConsoleDoc.class.php | UTF-8 | 4,822 | 3.15625 | 3 | [] | no_license | <?php
class ConsoleDoc
{
public function __construct($filename = null)
{
$this->console = new Console();
if ($filename != null)
{
$this->file = file($filename);
}
}
function load_file_($filename)
{
$this->file = file($filename);
$this->fi... | true |
d4261bc265529262edef0c243225647e562eb9b9 | PHP | IBMS-Network/IBMS-Network | /pages/Prod2.php | UTF-8 | 13,174 | 2.53125 | 3 | [] | no_license | <?php
namespace pages;
use classes\core\clsDB;
use classes\core\clsPage;
use entities;
use PHPExcel_IOFactory;
use PHPExcel_Reader_IReadFilter;
use PHPExcel_Cell;
use classes\clsExcelProduct2;
use classes\clsAdminProducts;
class Prod2 extends clsPage
{
public function __construct()
{
parent::clsPage... | true |
6944e5ba94a6650178fd2a659a854a8bdc932aeb | PHP | chingu-voyage5/Bears-Team-33 | /app/Http/Controllers/SessionsController.php | UTF-8 | 898 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class SessionsController extends Controller
{
public function __construct()
{
$this->middleware('guest', ['except' => 'destroy']);
}
//
function index()
{
}
function create()
{
return view('ses... | true |
7a0b36e57dafd6620dca87bf28be6fc6af94cec7 | PHP | kingjerod/CSSTools | /src/Optimizers/SameStyleOptimizer.php | UTF-8 | 1,573 | 3.171875 | 3 | [] | no_license | <?php
namespace mrjking\CSSTools\Optimizers;
class SameStyleOptimizer extends Optimizer
{
public function calculate()
{
$styleCounts = [];
//Calculate counts for each style
foreach ($this->styles as $style) {
if(!isset($styleCounts[$style->md5])) {
$styleCo... | true |
ed1849408d9e676ac227d044c0abe83fc04fa57e | PHP | GGpx/blog | /user/objet/response.php | UTF-8 | 209 | 2.5625 | 3 | [] | no_license | <?php
class Response{
public $message;
public $sucess;
function __construct($sucess, $message){
$this ->sucess = $sucess;
$this ->message = $message;
}
};
?> | true |
29a7681c191b48efaa9c1951a9d22220b08ba207 | PHP | Fahimsakib1/Web-Tech-Final-Project | /MVC/model/XbudgetExpenseModel.php | UTF-8 | 2,068 | 2.609375 | 3 | [] | no_license | <?php
require('../model/Xdb.php');
function loadPrevBudgetExistance(){
$val=0;
$sql = "SELECT amount FROM budget WHERE amount<>'".$val."' ";
$result = connectionOpen()->query($sql);
if ($result->num_rows > 0) {
connectionOpen()->close();
return true;
... | true |
4f07b6c4f323b6437fd00fec761895d0c09f2d09 | PHP | cmc44/IT490 | /registration.php | UTF-8 | 817 | 2.53125 | 3 | [] | no_license | <?php
ini_set("display_errors", 1);
ini_set("log_errors",1);
ini_set("error_log", "/tmp/error.log");
error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT);
include ('client.php');
$email = $_POST['email'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$user = $_POST['user'];
$pass = $_POST['pass'];
$zipcode = $... | true |
229fd3e7e5137f5d07ee2ae66f8684e757debd78 | PHP | Mixi59/AzoteWeb | /app/Helpers/Utils.php | UTF-8 | 1,366 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Helpers;
use App\Shop\ShopStatus;
use App\Transfert;
class Utils
{
static public function transaction_status($status)
{
switch ($status)
{
case ShopStatus::PAYMENT_SUCCESS:
$status_text = "Validé";
break;
case ShopSta... | true |
606065acb20fee95deff9cf39b07a307a2aab65a | PHP | PotatoSmith/codeDemo | /designpattern/observer.php | UTF-8 | 1,935 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
// 主题 被观察者
interface SplSubjectMy {
public function attach($observer); // 注册观察者到当前主题
public function detach($observer); // 从当前主题删除观察者
public function notify(); // 主题状态更新 通知所有观察者做相应处理
}
// 观察者
interface SplObserverMy {
public function update($subject); // 注册观察者到当前主题
}
class User impleme... | true |
6f9863cde509d3352fefe278fadeeb61929d8054 | PHP | rizamasta/kemenag-nilai-siswa | /application/libraries/imageloader.php | UTF-8 | 17,116 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* @package Imageloader
* @author Arief Budi SAntoso
* @copyright Copyright(c) 2016
* @version 1.0.0
**/
class ImageLoader
{
public $CI;
public $values;
public function __construct()
{
// get CodeIgniter instance
... | true |
f8ebda7ec7f5c0c8e94fb8c8a5a62b44eed2491c | PHP | ksidenko/smto | /protected/modules/smto/views/fkey/_subform.php | UTF-8 | 2,155 | 2.53125 | 3 | [] | no_license | <?php
$index = '['. $index . ']' ;
$errors = $form->errorSummary($model);
if (!empty($errors)) { ?>
<tr><td><?php echo $errors;?></td></tr>
<?php }
?>
<tr>
<td>
<?php echo $form->hiddenField($model, $index . 'id'); ?>
<?php echo $form->hiddenField($model, $index . 'nu... | true |
3058cd18dc14defbc73c7967339f8074cd5de3f7 | PHP | jeandev84/janklod | /src/janklod/Component/Event/Support/Event.php | UTF-8 | 299 | 2.625 | 3 | [] | no_license | <?php
namespace Jan\Component\Event\Support;
use ReflectionClass;
/**
* Class Event
*
* @package Jan\Component\Event\Support
*/
abstract class Event
{
/**
* @return string
*/
public function getName()
{
return (new ReflectionClass($this))->getShortName();
}
} | true |
b1b68506d7fcf483e55c432b5654dc892299e808 | PHP | SOINSOFTWARE/petcity | /php/entity/clinichistory.php | UTF-8 | 1,020 | 2.96875 | 3 | [] | no_license | <?php
include_once 'pet.php';
class ClinicHistory {
public $id;
public $id_pet;
public $id_company;
public $record_custom_id;
public $pet;
function __construct($id, $id_pet, $id_company, $record_custom_id) {
$this->id = $id;
$this->id_pet = $id_pet;
$this->id_company ... | true |
b2a756f8f4bf87d205c79d8d4f3220c1bb09358a | PHP | parsius/grupo42 | /de pablo/CursoPHP/Practicas/SitioWeb/publicarViaje.php | UTF-8 | 2,265 | 2.515625 | 3 | [] | no_license | <?php
session_start();
// if(isset($_SESSION['usuario'])){
// header('Location: index.php');
// }
$usuario=$_SESSION['usuario'];
if($_SERVER['REQUEST_METHOD'] == 'POST'){
$origen=$_POST['origen'];
$hora=$_POST['hora'];
$tipo=$_POST['tipo'];
$destino=$_POST['destino'];
$fecha=$_POST['fecha'];
$fechaLlega... | true |
480fbaea6fb290049847786d9ad984cfa2ce0d66 | PHP | osusara/quiz-app | /pages/update.php | UTF-8 | 4,631 | 2.796875 | 3 | [] | no_license | <?php
session_start();
require_once('../includes/connection.php');
require_once('../includes/functions.php');
// check if user is logged in
if(!isset($_SESSION['user_id'])){
header('Location: ../index.php?user=no');
}
$errors = array();
$name = "";
$email = "";
// get user information
... | true |
89e149cc850175554e21be5d4fbf07d4fbc973d2 | PHP | xeneize-js/laravel-petmatch | /app/models/UsuariosModel.php | UTF-8 | 4,665 | 2.515625 | 3 | [] | no_license | <?php
class UsuariosModel extends Eloquent {
protected $table = 'usuarios';
protected $primaryKey = "UUID_usuarios";
public function mVerifyEmail($email){
try {
$this->where("email", "=", $email)->firstOrFail();
return 1;
}catch (exception $e){
retu... | true |
b070a3d3f5e91f4da271ff6da0c4d13631dbe72e | PHP | Adamantios/FarmIt-Backend-Client | /application/models/Cart_model.php | UTF-8 | 1,509 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Cart_model extends CI_Model
{
public function __construct()
{
// Call the CI_Model constructor
parent::__construct();
$this->load->database();
}
public function create_cart($user_id, $cart)
{
return $this->db->insert('cart', array('user_id' => $user_id, ... | true |
26f14bd4c4036fbb96d26a0b9292994cc71cfb94 | PHP | Tamma1234/cms | /app/Validators/Transactions/ServicePaymentValidator.php | UTF-8 | 1,391 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Validators\Transactions;
use App\Repositories\Orders\OrderRepository;
use App\Repositories\Services\UserServiceRepository;
use App\Validators\Base\BaseValidator;
class ServicePaymentValidator extends BaseValidator
{
/**
* order repo
*
* @var UserServiceRepository
*/
pr... | true |
1f2175dc7c116ae33f04c0a651b78530b80bde67 | PHP | Jeket/xml | /tests/Xml/Dom/Validator/InternalXsdValidatorTest.php | UTF-8 | 1,761 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace VeeWee\Tests\Xml\Dom\Validator;
use PHPUnit\Framework\TestCase;
use VeeWee\Xml\Dom\Document;
use function VeeWee\Xml\Dom\Validator\internal_xsd_validator;
use function VeeWee\Xml\Xsd\Schema\Manipulator\base_path;
final class InternalXsdValidatorTest extends TestCase
{
/*... | true |
10fe056954c0a111c1f5d94a028318ccedec84bb | PHP | ashwiniMGawade/flipitApplication | /core/Domain/Usecase/Admin/AddLandingPageUsecase.php | UTF-8 | 3,193 | 2.703125 | 3 | [] | no_license | <?php
namespace Core\Domain\Usecase\Admin;
use \Core\Domain\Adapter\PurifierInterface;
use \Core\Domain\Entity\LandingPage;
use \Core\Domain\Entity\Shop;
use \Core\Domain\Repository\LandingPageRepositoryInterface;
use \Core\Domain\Validator\LandingPageValidator;
use \Core\Service\Errors\ErrorsInterface;
class AddLand... | true |
11caa257c1c1dcd263dcf0fef895eb13fcc36136 | PHP | hadyfasters/sam_api | /app/controllers/api/Outlet.php | UTF-8 | 6,564 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
class Outlet extends SAM_Controller
{
public function __construct()
{
parent::__construct();
// Load the Model
$this->load->model('M_region');
$this->load->model('M_branch');
// Verify Login
$this->is_l... | true |
a6b07a987caa779eb97f1673b07e0dd419d00f36 | PHP | w3site/Articles | /Model/Category/Repository.php | UTF-8 | 602 | 2.609375 | 3 | [] | no_license | <?php
namespace MagentoYo\Articles\Model\Category;
class Repository
{
protected $_byId = [];
protected $_categoryFactory;
public function __construct(
\MagentoYo\Articles\Model\CategoryFactory $categoryFactory
) {
$this->_categoryFactory = $categoryFactory;
}
public f... | true |
192f84af6e39fad7ae6ae7524a3ac36b0b90910f | PHP | digilist/phive | /tests/unit/shared/version/GitHubVersionTest.php | UTF-8 | 1,253 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php declare(strict_types = 1);
namespace PharIo\Phive;
use PharIo\Version\VersionNumber;
use PHPUnit\Framework\TestCase;
/**
* @covers \PharIo\Phive\GitHubVersion
*/
class GitHubVersionTest extends TestCase {
/**
* @dataProvider versionPrefixProvider
*
* @param string $prefix
*/
public... | true |
79c69b927d61054de841e0c2a4acccf49655e62e | PHP | poetries/code-practice | /php/phpBase/Basic/If...Else.php | UTF-8 | 865 | 3.515625 | 4 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: poerty
* Date: 2016/5/19
* Time: 23:33
*/
//在 PHP 中,提供了下列条件语句:
//if 语句 - 在条件成立时执行代码
//if...else 语句 - 在条件成立时执行一块代码,条件不成立时执行另一块代码
//if...else if....else 语句 - 在若干条件之一成立时执行一个代码块
//switch 语句 - 在若干条件之一成立时执行一个代码块
//if 语句用于仅当指定条件成立时执行代码
$t = date("H");
if($t<"20")
{
echo "h... | true |
0335e9c69248556280e74e976fd3789cf389af59 | PHP | romulocriston/php7 | /cursoemvideo/PHP/_aula01/exerc3.php | UTF-8 | 1,921 | 3.125 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Curso PHP</title>
<link rel="stylesheet" href="../_css/estilo.css">
</head>
<body>
<div id="cabecalho">
<p> Curso de PHP - Rômulo Criston </p>
<... | true |
2eea9655a1bb56fae8926ad2059faff64910ad87 | PHP | vinothkumar777kumar/bottesford_backend | /app/Models/BlogModel.php | UTF-8 | 5,264 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models;
use CodeIgniter\Model;
/**
*
*/
class BlogModel extends Model
{
protected $table = 'blog_tbl';
protected $primaryKey = 'id';
protected $allowedFields = ['title','blog_image','description','publish_date','status'];
public function getblog($id){
$db = \Config\Database::connect();
... | true |
d488046dc0aaccb877895cadd416ba36c5b4d89a | PHP | dimadin/nth-order-discount-for-woocommerce | /inc/settings/Get.php | UTF-8 | 1,043 | 2.765625 | 3 | [] | no_license | <?php
/**
* \dimadin\WP\Plugin\commonWP\WC\NthOrderDiscount\Settings\Get class.
*
* @package NthOrderDiscount
* @since 1.0.0
*/
namespace dimadin\WP\Plugin\WC\NthOrderDiscount\Settings;
/**
* Class for retrieving settings values.
*
* @since 1.0.0
*/
class Get {
/**
* Get requested setting value.
*
* @... | true |
a69ebcb7d5332e6ee0a36bf5a8536b2d69a9f9ab | PHP | abumufti/shariainvestor | /models/PostForm.php | UTF-8 | 1,909 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use yii\base\Model;
use Yii;
class PostForm extends Model
{
public $id;
public $title;
public $image;
public $youtube;
public $file;
public $body;
public function rules()
{
return [
[['image'], 'file', 'skipOnEmpty' => true, 'extensions... | true |
cf242c93585d6eb64ece6c3416fa320f52260709 | PHP | ilahazs/ppdb-pasundan | /database/seeders/TahunAjaranSeeder.php | UTF-8 | 482 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use App\Models\TahunAjaran;
use Illuminate\Database\Seeder;
class TahunAjaranSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
TahunAjaran::create([
'nama' => '2021/2022',
]);... | true |
876ccb66bab451ef37ae953baa9956105238b593 | PHP | MotherHouse/Benzene | /blog/action.php | UTF-8 | 14,752 | 2.703125 | 3 | [] | no_license | <?php
require_once './loginclass/class.geetestlib.php';
header("content-type:text/html;charset=utf-8");
session_start();
//处理所有的业务逻辑
//在php中获取用户提交的参数方式有两种;
//$_GET 这全局数组获取的是用户通过地址栏传递过来的值
//$_POST 这个全局数组获取的是用户通过form表单传递过来的值,并且form中的method属性的值
//必须为post,如果是get的话那么就只能通过$_GET方式获取
// var_dump($_GET);
/... | true |
491bd6b816bbca2f163b3e1a6049eaa428717625 | PHP | Ariwf3/blog-oop | /application/controllers/PostController.php | UTF-8 | 4,789 | 3.078125 | 3 | [] | no_license | <?php
namespace Ariwf3\Blog_oop\Application\Controllers;
use Ariwf3\Blog_oop\Application\Models\PostModel;
use Ariwf3\Blog_oop\Application\Controllers\UserController;
class PostController {
private $errors = array();
/**
* setErrors
*
* Checks the integrity of user data and builds arrays wit... | true |
608a0f085b7612225d6a89b79af16ec30c4132d2 | PHP | AleksanderClay/qrcode-pix | /src/PixClient.php | UTF-8 | 2,411 | 2.734375 | 3 | [] | no_license | <?php
namespace Pix\Sdk;
use Curl\Curl;
class PixClient {
private $curl;
private $method;
private $body;
private $params;
private $clientId;
private $clientSecret;
private $tokenBasic;
private $appKey;
private $oauthUrl;
private $apiUrl;
public function __construct()
... | true |
c5fb33880274c6d886d1a565db6aa00f3b6584de | PHP | Acepmon/Shilennam | /prototype/v0.6/management/uploads/upload-new/upload-new.php | UTF-8 | 621 | 2.703125 | 3 | [] | no_license | <?php
include "../../../models/DB_CN.php";
if (!empty($_POST['name']) && !empty($_FILES['file'])) {
$name = $_POST['name'];
$file = $_FILES['file'];
if (!empty($file['name'])) {
$file_name = $file['name'];
$file_tmp = $file['tmp_name'];
// upload the file
move_uploaded_file($file_tmp, "../../.... | true |
1c032c9e30a5b23ba49277534b330a811c9494b3 | PHP | ricardclau/tuenti-contest | /2011/test7.php | UTF-8 | 1,138 | 3.203125 | 3 | [] | no_license | #!/usr/bin/php
<?php
$lines = file('php://stdin');
function phplev($s1, $s2, $costadd, $costchange, $costremove) {
$l1 = strlen($s1); // Länge des $s1 Strings
$l2 = strlen($s2); // Länge des $s2 Strings
$dis = range(0,$l2); // Erste Zeile mit (0,... | true |
759fe6221716560cf2613c7c19b834cbf2d04284 | PHP | olive007/swad | /src/Swad/Modeler/Generator/Html/Attribute/AbstractSize.php | UTF-8 | 738 | 2.609375 | 3 | [] | no_license | <?php
namespace Modeler\Generator\Html\Attribute;
use Modeler\Parser\Ui\Attribute as ParserNode;
use Modeler\Parser;
abstract class AbstractSize extends ParserNode\AbstractResponsiveAttribute {
// Method
protected function computeValue(string $screenSuffix) {
$value = 0.;
if ($this->getResponsiveValue($scr... | true |
21ca2a64bf469b65e0c302bd93db04812eec6392 | PHP | SoulGael/sium | /instar_registros.php | UTF-8 | 8,636 | 2.71875 | 3 | [] | no_license | <?php
ob_start();
require_once('ws/conecta.php');
//LECTURA DEL ARCHIVO
//http://galliguera.net/DatosClima/EXPLICACION_VARIABLES.html
$fp = fopen("C:\WeatherLink\davison\download.txt", "r");
$cont =0;
$arrayLineaAll=array();
while(!feof($fp)){
$cont ++;
$linea = fgets($fp);
if($cont>3){
$splitLinea = e... | true |
7b47bfc32b75459d1109d500a15dd14171fe7d55 | PHP | npmcdn-to-unpkg-bot/VoZ | /scripts/sendAlphaKeys.php | UTF-8 | 1,123 | 2.59375 | 3 | [] | no_license | <?php
$email = $_GET['email']; //when the page is request the server to post gathers the email data
$name = $_GET['name']; //when the page is request the server to post gathers the full name data
$subject = "requesting a VoZ Alpha Key"; //set the subject for email to be sent when approve by the code
$mes... | true |
c0b9aaedb0c4843a95c90775c2d4198e8c3e2801 | PHP | rexmac/digrastudents.org | /zf/library/Rexmac/Zend/Monitor/Controller/Plugin/SlowQueries.php | UTF-8 | 2,637 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Rexmac\Zend\Monitor\Controller\Plugin;
use \DateTime,
\Zend_Exception,
\Zend_Log,
\Zend_Registry;
/**
* Zend controller plugin that logs slow DB queries.
*
* This class was inspired by and contains code from the monitorix project by
* Markus Hausammann (?) (https://github.com/markushau... | true |
2cfc45f0d5d5791e705c6ca5fff4f8d8e13a9ccb | PHP | ChristophJP5/Slim-REST-API-Framework | /Core/JsonResponse.php | UTF-8 | 324 | 2.8125 | 3 | [] | no_license | <?php
namespace API\Core;
class JsonResponse {
protected static $data;
function __construct($data = [])
{
self::$data = $data;
}
public static function get()
{
return json_encode(self::$data);
}
public static function set($data)
{
self::$data = $data;
... | true |
c18a1e6c70b92e8321db56ed9cdabb6668c36a3f | PHP | Alabuja/zero-poverty | /app/Http/Controllers/ActivityController.php | UTF-8 | 657 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Models\Activity;
class ActivityController extends Controller
{
public function __construct(Activity $activity)
{
$this->activity = $activity;
}
public function userActivities()
{
$activ... | true |
17e2d986837587a38823f26920ce85a0b3b9247f | PHP | paulomendesdigital/lm-cursos-de-transito | /app/Controller/CitiesController.php | UTF-8 | 1,621 | 2.5625 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
/**
* @copyright Copyright 2018
* @author Dayvison Silva - www.lmcursosdetransito.com.br
* States Controller
*
* @property City $City
*/
class CitiesController extends AppController {
public function ajax_getCityIdByName($name,$state_id=null){
$this->au... | true |
af341c296883b602f899758ff0506ae8e5fbb4a4 | PHP | anht37/winelover_server | /app/controllers/ProfileController.php | UTF-8 | 1,810 | 2.5625 | 3 | [] | no_license | <?php
class ProfileController extends ApiController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
//
}
/**
* Store a newly created re... | true |
7efe88cddaf0c80b9b0252f1d072cb12979ef12a | PHP | jdonaires/CompraVentaV | /DESIGNER/frmLogin.php | UTF-8 | 3,212 | 2.59375 | 3 | [] | no_license | <?php
require_once ('../DAO/ValidacionLogin.php');
require_once ('../BOL/login.php');
require_once('../BOL/persona.php');
$per = new Persona();
$log = new Login();
$perLogin = new loginingresar();
if(isset($_POST['ingresar']))
{
$resultado = array();//VARIABLE TIPO RESULTADO
$log->__SET('usuario', $_POST... | true |
09ddf05b70d41fe181e30fbc7bf507d710e4caa9 | PHP | maxbogo/UniDatabaseProject | /Database/WineApp/php/WantTry/delWantTry.php | UTF-8 | 651 | 2.59375 | 3 | [] | no_license | <?php
require_once('DatabaseHelper.php');
$database = new DatabaseHelper();
$mem_id = '';
if (isset($_POST['mem_id'])) {
$mem_id = $_POST['mem_id'];
}
$wine_id = '';
if (isset($_POST['wine_id'])) {
$wine_id = $_POST['wine_id'];
}
// Delete method
$error_code = $database->deleteWantTry($mem_id, $wine_id);
/... | true |
7cac0c1d7ba47950c3659131f1c0271d50e78571 | PHP | gene222-arch/gpa-proj-mvc-refresh | /src/core/forms/BaseField.php | UTF-8 | 600 | 2.84375 | 3 | [] | no_license | <?php
namespace app\core\forms;
use app\core\models\Model;
abstract class BaseField
{
/**
* @param $name = input tag name attribute
* @param $model = app/core/Model -> baseClass of app/models
*/
protected ?Model $model = null;
protected string $attrName = '';
public function __construct( string $attrName... | true |
bf7a7294c2a180c0f3ce7b000d25a7c9f296b255 | PHP | wenxianguo/wb | /sys/enums/CompanyIdEnum.php | UTF-8 | 515 | 2.53125 | 3 | [] | no_license | <?php
namespace app\modules\sys\enums;
use app\modules\common\enums\BaseEnum;
class CompanyIdEnum extends BaseEnum
{
// 默认值,没有所属公司
const DEFAULT = 1;
// 汇量
const MOBVISTA = 2;
// 店匠
const SHOPLAZZA = 3;
//shopify
const SHOPIFY = 4;
const SHOPSCANNER = 5;
const MESSAGE = [... | true |
7da82d676b1685143b23bed12e0f7b1098fc2c28 | PHP | gabrielpcruz/slim | /src/Twig/FlashMessageTwigExtension.php | UTF-8 | 1,254 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Twig;
use App\App;
use DI\DependencyException;
use DI\NotFoundException;
use Slim\Flash\Messages;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
class FlashMessageTwigExtension extends AbstractExtension
{
/**
* @var Messages
*/
protected Messages $flash;
/**
... | true |
8837be28b32625936e7c736d664f6d1706aa6b9f | PHP | jehu100/proyt | /proy/modelos/conductor.modelo.php | UTF-8 | 2,959 | 2.578125 | 3 | [] | no_license | <?php
require_once 'conexion.modelo.php';
class ConductorModelo{
public function LisConductorModelo()
{
$stmt = Conexion::Conectar()->prepare("SELECT conductor.ci,lugar.Departamento,conductor.nom,conductor.ape_pater,conductor.ape_mater,conductor.dir,conductor.tel,tiposangre.Tipo,niveldepropiedad.ni... | true |
124e28675b2bbbe9131cf4b61aca337208ecd94a | PHP | kakamband/autowpdb | /Tests/Integration/src/DBWorker/Worker/cloneTable.php | UTF-8 | 1,225 | 2.75 | 3 | [] | no_license | <?php
namespace Screenfeed\AutoWPDB\Tests\Integration\src\DBWorker\Worker;
use Screenfeed\AutoWPDB\DBWorker\Worker;
/**
* Tests for Worker->clone_table().
*
* @covers Worker::clone_table
* @group Worker
*/
class Test_CloneTable extends TestCase {
protected $drop_table = true;
protected $drop_target_tab... | true |
af57f4d0916d2fdf516bb9022e4efb6095f0a20f | PHP | thiagoluna/desafio-desenvolvedor | /main-service/app/Http/Controllers/PaymentMethodController.php | UTF-8 | 1,425 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests\PaymentMethodRequest;
use App\Models\PaymentMethod;
use App\Services\PaymentMethodService;
class PaymentMethodController extends Controller
{
private $paymentMethodService;
public function __construct(PaymentMethodService $paymentMethodService)
... | true |
9a03a5b0a50a17116679a1fb495b33d477829ede | PHP | d-hamasato/dokusyu-PHP | /www/html/selfphp/chap05/array.php | UTF-8 | 375 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
$data = ['高江', '青木', '片渕'];
print array_push($data, '山田', '土井');
print '<br />';
print_r($data);
print '<br />';
print array_pop($data);
print '<br />';
print_r($data);
print '<br />';
print array_shift($data);
print '<br />';
print_r($data);
print '<br />';
print array_unshift($data, '掛谷', '横塚', '上垣');
print '<b... | true |
586d5985db484e4f193998f8e5a61eaf5d9e9fa8 | PHP | aterrien/beaba | /core/Application.php | UTF-8 | 22,328 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace beaba\core;
/**
* This file is distributed under the MIT Open Source
* License. See README.MD for details.
* @author Ioan CHIRIAC
*/
abstract class Application extends Event
{
/**
* the application start
*/
const E_LOAD = 'onLoad';
/**
* before the request dispatch
... | true |