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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
37f823781ee0f3ca2d22ac1c5fcb4fbe75bda840 | PHP | stevenaeola/cep | /2021/programme.php | UTF-8 | 4,400 | 2.703125 | 3 | [] | no_license | <?php
include "common.php";
include "papers.php";
$sessions=array(
array (
"1a" => "9:35",
"1b" => "9:55",
"1c" => "10:15",
),
array(
"2a" => "11:00",
"2b" => "11:20",
"2c" => "11:40",
),
array(
"3a" => "15:30",
"3b" => "15:50",
"3c" => "16:10"),
array (
"4a" => "13:... | true |
9d74ac13dcbd8104799a1a1c091469881c076add | PHP | amitedu/eCommerceSite | /classes/Category.php | UTF-8 | 2,273 | 3.15625 | 3 | [] | no_license | <?php
$filepath = realpath(dirname(__FILE__));
require_once $filepath . '/../lib/Database.php';
require_once $filepath . '/../helpers/Helper.php';
?>
<?php
class Category {
private $db;
private $fm;
public function __construct() {
$this->db = new Database();
$this->fm = new Helper()... | true |
f39bc1ca8489daf18606127af6ca3b4cfc0397f9 | PHP | faidzinrizal/purchasing | /migrations/m171130_180213_create_supplier_table.php | UTF-8 | 598 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `supplier`.
*/
class m171130_180213_create_supplier_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('supplier', [
'id' => $this->primaryKey(),
'nama' => $thi... | true |
576264ddb2bccf7a88a4ad0819465f6ff639f226 | PHP | briancvn/cms-3.0 | /app/Infrastructure/Controller/UserController.php | UTF-8 | 767 | 2.6875 | 3 | [] | no_license | <?php
namespace CMS\Infrastructure\Controller;
use CMS\Infrastructure\Contract\SearchCriteriaDto;
use CMS\Infrastructure\Contract\SearchResultDto;
use CMS\Infrastructure\Contract\UserDto;
use CMS\Infrastructure\Service\UserService;
class UserController extends ApiController
{
/** @var UserService */
private ... | true |
a2391d78416435a467b6e51723a5601a946b6335 | PHP | sshaikh210/blog.dev | /app/database/seeds/PostTableSeeder.php | UTF-8 | 774 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class PostTableSeeder extends Seeder {
public function run()
{
$user = User::firstOrFail();
$post1 = new Post;
$post1->title = "Title 1";
$post1->content = "Content 1";
$post1->user_id = $user->id;
$post1->save();
$post2 = new Post;
$post2->title = "Title 2";
$post2->content = "Content 2";... | true |
82cc2b90d3218cd4c561e4bdb1c44bcdc6fd575f | PHP | irfanfuadsyakir/projectuasfuad | /register.php | UTF-8 | 2,263 | 2.625 | 3 | [] | no_license | <?php
require_once "config/database.php";
if (isset($_POST["register"])) {
$email= $_POST["email"];
$username= $_POST["username"];
$password= $_POST["password"];
$q = $pdo->prepare("INSERT INTO `user` (`id`, `email`,
`username`, `password`) VALUES (NULL, ?, ?, SHA1(?));");
$q->execute([ $email, $... | true |
e7019d1fabe64da12550b7ddb2dc039bbddaa2c6 | PHP | nik-john/react-redux-enrichment | /lib/Prezly/Api/Contacts/ContactEnrichmentApiService.php | UTF-8 | 2,708 | 2.71875 | 3 | [] | no_license | <?php
namespace Prezly\Api\Contacts;
use ContactEnrichment;
use Db;
use PressContact;
use Prezly\Exception\PropelEntityNotFoundException;
use UserLicense;
class ContactEnrichmentApiService
{
/** @var \PressContact */
private $contact;
/** @var \UserLicense */
private $account;
/**
* NOTE: $c... | true |
de2467ef5279671279077d65a1a8518003d6a94f | PHP | beholder17/rich.files | /application/modules/auth/models/auth_m.php | UTF-8 | 4,214 | 2.5625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Auth_m extends CI_Model {
function user_info_update($data)
{
$this->db->where('id',$data['id']);
$this->db->update('users',$data);
}
function get_user_avatar($id)
{
$sql ="SELECT `avatar` FROM `users` WHERE `id` = ?";
$qu... | true |
99504996b31de4a45ac25b295089c3072c4ccc49 | PHP | maghead/maghead | /src/Sharding/ShardCollection.php | UTF-8 | 4,666 | 2.796875 | 3 | [
"BSD-2-Clause",
"MIT"
] | permissive | <?php
namespace Maghead\Sharding;
use LogicException;
use Maghead\Sharding\Hasher\FastHasher;
use Maghead\Sharding\Hasher\Hasher;
use Ramsey\Uuid\Uuid;
use Magsql\Universal\Query\UUIDQuery;
use ArrayObject;
class ShardCollection extends ArrayObject
{
protected $mapping;
protected $repoClass;
private $d... | true |
d385b598ebe5759b739f634146d89ab8adf1623c | PHP | sw3taprajapati/phpProject | /classes/EditRequirement.php | UTF-8 | 2,120 | 2.765625 | 3 | [] | no_license | <?php
include('classes/database.php');
class EditRequirement extends DatabaseConnection{
public $db;
public $sql;
public function __construct(){
$this->db=new DatabaseConnection();
}
public function getCategoriesList(){
$this->sql="SELECT * FROM Categories";
$list=$this->db->queryFunction($this->sql... | true |
190cf6ef2daafadb996005222570624d6aedccd5 | PHP | rahmannzaid/blog_laravel | /app/lib/convert_date.php | UTF-8 | 1,071 | 2.984375 | 3 | [] | no_license | <?php
Class Convert_date{
static function indonesia($tanggal){
$tanggal = date('D, d M Y', strtotime($tanggal));
$format = array('Sun' => 'Minggu','Mon' => 'Senin','Tue' => 'Selasa','Wed' => 'Rabu','Thu' => 'Kamis','Fri' => 'Jumat','Sat'=> 'Sabtu',
'Jan' => 'Januari','Feb' => 'Februari','Mar' => 'Ma... | true |
ea4fbb6463c2e57b4ec58f1c94be6f988cf7342f | PHP | djsublime/cms | /bundles/cms/libraries/custommarker.php | UTF-8 | 3,272 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class CustomMarker {
/* Create your own Marker methods here */
/*public static function MY_MARKER($vars = array())
{
//Get variables from array $vars
if( ! empty($vars)) extract($vars);
// ....
$_id = 'my_marker';
if(isset($id) and !empty($id)) $_id = $id;
$_class = 'my_marker';
if(isset($c... | true |
ad5386ec862c6a63459264d3694f03b70a083474 | PHP | visonwang/LuckyPHP | /system/core/Log.php | UTF-8 | 1,985 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* @author Candison November (www.kandisheng.com)
* @location Nanjing China
*/
namespace LuckyPHP;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
class Log
{
private $logfile = null;
private $logname = null;
public function __construct($logname, $logfile)
{
$this->logfi... | true |
f2b054fc75607023233d6675b32699076487e2ef | PHP | LukeCarrier/origin | /lib/Origin/View/Engines/Origin/ICommand.php | UTF-8 | 1,088 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Origin templating engine command interface.
*
* Origin.
*
* @author Luke Carrier <luke@carrier.im>
* @copyright 2014 Luke Carrier
* @license Proprietary; all rights reserved
*/
namespace Origin\View\Engines\Origin;
/**
* View command interface.
*
* Origin view commands are used by block nodes ... | true |
5c1bf338c02b661408e33d0926915975e2100cb6 | PHP | mhendrahaqq/PEMWEB | /SmartBimbel/admin/edit.php | UTF-8 | 2,437 | 2.546875 | 3 | [] | no_license | <?php
session_start();
if(empty($_SESSION['namauser'])){
echo "<script type='text/javascript'>alert('Anda Harus Login!');window.location = 'index.php';</script>";
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
</hea... | true |
6cc922a8b94217248882ce5a566adc1e6a157b1a | PHP | pmjones/savant | /Savant/plugins/Savant_Plugin_options.php | UTF-8 | 2,188 | 3.234375 | 3 | [] | no_license | <?php
/**
*
* Output a series of HTML <option>s based on an associative array
* where the key is the option value and the value is the option
* label. You can pass a "selected" value as well to tell the
* function which option value(s) should be marked as seleted.
*
* This program is free software; you can redistrib... | true |
4943aa9cdddc721cee4e205a3b373a2e05ba9aa1 | PHP | guinaldi/pesquisase | /workspace/www/login.php | UTF-8 | 1,718 | 2.703125 | 3 | [] | no_license | <?php
session_start();
//Escape error ¬¬
error_reporting(E_ALL ^ E_DEPRECATED);
if (isset($_SESSION['ra'])){
header("Location:index.php");
die();
}
//Verify post data;
if ($_POST['RA'] == "" || $_POST['RA'] == null) {
echo "<script language='javascript' type='tex... | true |
05a03521069398e923119602dee948ce9906bf91 | PHP | nopolabs/mock-with-expectations | /src/Expectation.php | UTF-8 | 2,898 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Nopolabs\Test;
use Closure;
use Exception;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_Builder_InvocationMocker;
use PHPUnit_Framework_MockObject_Matcher_Invocation;
use PHPUnit_Framework_MockObject_MockObject;
class Expectation
{
private $method;
... | true |
514ef5f4e48baef65e85a0b188974330d3e5e1fc | PHP | dengchunhui/classlib | /PHP类库/函数库/html.php | UTF-8 | 518 | 2.609375 | 3 | [] | no_license | <?php
function back($word) {
echo "<script>";
echo "alert('$word');";
echo "history.back();";
echo "</script>";
}
function to_url($word, $url) {//这个是页面跳转函数,如:to_url("添加成功!","index.php")
echo "<script>";
echo "alert('$word');";
echo "self.location='$url';";
echo "</script>"... | true |
185faac6a0375c220fb34127a494b78045b45e82 | PHP | specialnote/wechat | /Wechat/Traits/WechatServiceTrait.php | UTF-8 | 4,587 | 2.578125 | 3 | [] | no_license | <?php
namespace Wechat\Traits;
use Psr\SimpleCache\CacheInterface;
use Wechat\Services\WechatAccessToken;
use Wechat\Services\WechatAuth;
use Wechat\Services\WechatBlackList;
use Wechat\Services\WechatCustomizeMenu;
use Wechat\Services\WechatCustomizeMessage;
use Wechat\Services\WechatMedia;
use Wechat\Services\Wech... | true |
3b3c201c99f4ef1bdea59325120d51a3ef98d732 | PHP | ursuleacv/canyoudo | /app/controllers/CanController.php | UTF-8 | 3,062 | 2.8125 | 3 | [] | no_license | <?php
class CanController extends BaseController {
/**
* Returns all the can cans.
*
* @return View
*/
public function getIndex()
{
// Get all the can cans
$cans = Can::with(array(
'author' => function($query)
{
$query->withTrashed();
},
))->orderBy('created_at', 'DESC')->paginate();
... | true |
41c9ad14c5f3cc97658f4dc359a3ad17767b8caa | PHP | own2pwn/IGW | /html/inc/ICRUD.php | UTF-8 | 356 | 2.9375 | 3 | [] | no_license | <?php
interface ICRUD {
/**
* @param string $stm
* @return PDOStatement|false
*/
function prepare(string $stm);
/**
* @param string $stm
* @param array $params
* @return PDOStatement | false
*/
function prepareStatemen... | true |
4ef04d6a1c7dc035c572b6c75fd7340fc1142b96 | PHP | mdahlke/rummage-city | /app/Http/Middleware/ListingGeocode.php | UTF-8 | 2,042 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use App\Geocode;
use App\Http\Services\MapboxService;
use App\MapboxFeature;
use Closure;
use Illuminate\Http\Request;
class ListingGeocode {
/**
* Handle an incoming request.
*
* @param Request $request
* @param \Closure $next
* @return mixed
*/... | true |
34ab51bed94d5b8cda03ea37621208dc92304de6 | PHP | vincent90/keskonfait | /database/seeds/ProjectsTableSeeder.php | UTF-8 | 1,658 | 2.65625 | 3 | [] | no_license | <?php
use App\Project;
use App\User;
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Auth;
class ProjectsTableSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run() {
$faker = Faker\Factory::create();
... | true |
2c1a3cfd33e9871c512171fb4f1443ae2cb17176 | PHP | MasenoHub/masenohub-blog | /app/Post.php | UTF-8 | 3,011 | 2.609375 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Auth;
use Spatie\Tags\HasTags;
use Spatie\Sluggable\HasSlug;
use Spatie\Sluggable\SlugOptions;
use Spatie\Feed\Feedable;
use Spatie\Feed\FeedItem;
use Spatie\Searchable\Searchable;... | true |
b26bdedf6b135fd8f7ea944a2c1d1feb930a44b4 | PHP | SlouGhteR/CodeA | /php/php-kintamuju tipai.php | UTF-8 | 1,175 | 3.265625 | 3 | [] | no_license | <?php
$a = true; //logine reiksme -teisingai
$b = false; //logine reiksme -neteisingai
$c = 6 >5 ; //gauname true
$d = 5 > 6 ; //gauname false
$z = 6;
echo $a . '<br>';
echo $b . '<br>';
echo $c . '<br>';
echo $d . '<br>';
var_dump($d);
print_r($c);
$f = (bool)1; //tipo cast
var_dump($f);
$int_a = 0x10; //hex dec inte... | true |
040a17f34c74089b4dd73e29eb221327e61ef042 | PHP | dsireusa/programs | /src/module/Application/src/Application/Entity/Base/UserInterface.php | UTF-8 | 1,677 | 2.546875 | 3 | [] | no_license | <?php
namespace Application\Entity\Base;
use Application\Entity\Base\Program\MemoInterface as ProgramMemoInterface;
use Application\Entity\Base\Subscription\MemoInterface as SubscriptionMemoInterface;
use FzyAuth\Entity\Base\UserInterface as AuthUserInterface;
interface UserInterface extends AuthUserInterface
{
... | true |
44ad1244152dcbeb8c16ccacc425d07b0fd4839d | PHP | luthviar/elearning2 | /app/Test.php | UTF-8 | 1,764 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Question;
use App\User;
use App\QuestionOption;
class Test extends Model
{
public function get_test ( $id_chapter ) {
$error = '';
$test = Test::where('id_chapter', $id_chapter)->first();
if ($test == null) {
$error... | true |
f2007add67d4f73b6744d4048bd12cede5bc48bb | PHP | ankit121226/Inventory-Management-System | /sell_detail.php | UTF-8 | 2,781 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>
sell Detail
</title>
</head>
<body>
<?php
$connection= mysql_connect("localhost","root","");
if($connection!=false)
{
if(mysql_select_db("inventory",$connection))
{
$var=$_GET['id'];
$sql1 = "select * from tbl_sell_master... | true |
a5d9828ff3b9e6d4e31d1548b321199f7ead520d | PHP | wmzibji/yiishop | /backend/models/ArticleDetail.php | UTF-8 | 952 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use yii\db\ActiveRecord;
use yii\helpers\ArrayHelper;
class ArticleDetail extends ActiveRecord
{
//建立和文章表的关系
public function getArticle()
{
return $this->hasMany(Article::className(),['id'=>'article_id']);//hasMany 返回多个对象 用数组封装
}
//获取文章详情
// public static f... | true |
ad6476007e52b4cf8697317f918c7612270a1dd1 | PHP | Roiner994/cau | /librerias/suministroNuevo.php | UTF-8 | 26,188 | 2.609375 | 3 | [] | no_license | <?php
require_once("seguridad.php");
?>
<script language="javascript">
function cambiarSeleccion() {
document.frmEquipo.funcion.value=0;
document.frmEquipo.submit();
}
function cambiarPedido() {
document.frmEquipo.funcion.value=3;
document.frmEquipo.submit();
}
</script>
<?php
//Nuevo Repuesto
switch($fun... | true |
20b9bd5fd4f1d30dbda2560116e69512cca4fcf1 | PHP | melsior/project-lvl1-s136 | /src/games/BrainProgression.php | UTF-8 | 1,115 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
namespace BrainProgression;
const MESSAGE = 'What number is missing in this progression?';
function getProgression()
{
$tempNumber = \GameLib\getNumber(1, 10);
$stepNumber = \GameLib\getNumber(1, 10);
for ($i = 0; $i < 10; $i++) {
$numbers[$i] = $tempNumber + $stepNumber;
$tempNumber ... | true |
d200d67af2d04f138ff0b3e4d871d540fa90e1b2 | PHP | order2017/study | /app/Http/Controllers/Admin/CacheController.php | UTF-8 | 842 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class CacheController extends Controller
{
/**
* 删除文件的方法
* @param $path
*/
protected function delDir($path){
// 读取路径
$arr=scandir($path);
// 遍历并且删除
f... | true |
16e47a6285ce5fe1c63baae2ffd118dc8b9bf396 | PHP | donaldjohn/lease | /app/models/service/SecureInfo.php | UTF-8 | 720 | 2.5625 | 3 | [] | no_license | <?php
namespace app\models\service;
// 保单附件表
class SecureInfo extends BaseModel
{
public function initialize()
{
parent::initialize();
$this->setSource('dw_secure_info');
}
// 维护SecureInfo
public static function upSecureInfo($secureInsId, $secureNum, $data)
{
$secureInf... | true |
4c979671795dbf0f2b99e01a80a6f181b78fe4a3 | PHP | jeandev84/JFramework | /src/advanced/Component/Console/Command/Support/HelpCommand.php | UTF-8 | 689 | 2.59375 | 3 | [] | no_license | <?php
namespace Jan\Component\Console\Command\Support;
use Jan\Component\Console\Command\Command;
use Jan\Component\Console\Input\InputInterface;
use Jan\Component\Console\Output\OutputInterface;
/**
* Class HelpCommand
* @package Jan\Component\Console\Command\Support
*/
class HelpCommand extends Command
{
... | true |
f185b19fa357a8fa5e75cfa582308a0b2404b4af | PHP | Katrin12323/workplace | /test.php | UTF-8 | 696 | 2.78125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: katrinees
* Date: 24.02.17
* Time: 22:10
*/
$movie1 = array("movieName" => "Coco avant Chanel", "movieYear" => "1996", "movieDirector" => "John Doe");
$movie2 = array("movieName" => "The Notebook", "movieYear" => "2006", "movieDirector" => "John Not Doe");
$movie3 = array(... | true |
af6b7ac78468483683bb935e2e7458a7fd5fdab7 | PHP | blmowner/tailoringv2 | /add_fabric.php | UTF-8 | 2,733 | 2.515625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tambah Jenis Kain</title>
<!-- css & script -->
<?php include "layout/css_&_script.php"; ?>
</head>
<?php
include "inc/conn.php";
error_reporting(0);
session_start();
if (empty($_SESSION[user_id]) AND empty($_SESSION[user_password]))
{
... | true |
1f84e8c47d46ecba2d1f06863db6ab8a9c451a60 | PHP | sdk-laa/FOAP-2019 | /php/SADIK-EXAM-UF1/php/SpiritSocial_SeeNewPub.php | UTF-8 | 5,217 | 2.71875 | 3 | [] | no_license | <?php
session_start(); //Iniciar una nueva sesión o reanudar la existente
?>
<?php
// Declaracion de variables:
$Title=$Description=$Image=$comment4="";
require("SpiritSocial_Functions.php"); //Incluir funciones
if(isset($_REQUEST["Logout"])){ //Una vez el usuario clica "Logout" se... | true |
4e8eb126a8a61218371559cc1ef35a1c666cf6c1 | PHP | AnggaNovlianta/candralab-cms | /links/links_action.php | UTF-8 | 726 | 2.578125 | 3 | [] | no_license | <?php
/* Candra adi putra <candraadiputra@gmail.com
* CandraLab Studio (c)(2013)
* http://www.candra.web.id
* last edit: 14 okt 2013
*/
include ('../inc/config.php');
//data dari links
$nama= $_POST['nama'];
$url = $_POST['url'];
$aksi = $_POST['aksi'];
$id = $_POST['id'];
//echo $url;
//exit;
$sql = null;
if($... | true |
19188e213057cefbd9c7d0c1af1e953c7a2b549b | PHP | jorellanalaser/VERDES | /app/Console/Commands/BookingStatus.php | UTF-8 | 2,188 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Http\Schemas\Booking;
use Illuminate\Console\Command;
use Modules\Kiu\Support\APIKiu;
class BookingStatus extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'booking:status';
/... | true |
29da66ab30c0742be6e239bed7af1d101e3590b5 | PHP | lotcz/TS1_semestralka | /tst/int/cartTest.php | UTF-8 | 4,502 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
require_once __DIR__ . '/../../src/zEngine/app/models/cart.m.php';
require_once __DIR__ . '/../../src/zEngine/app/models/product.m.php';
require_once __DIR__ . '/../../src/zEngine/app/models/customer.m.php';
/**
* implements CRUD tests for cart entity
*/... | true |
5fd4926819d35ba9a09205db7c8cf3c84cc8c423 | PHP | growlxy/web | /update/sct.php | UTF-8 | 887 | 2.84375 | 3 | [] | no_license | <?php
header("Content-Type: text/html; charset=utf8");
include '../mysql.php';//链接数据库
$sql = "select * from sct";
$result = $conn->query($sql);//执行sql
$n = 0;
if ($result->num_rows > 0) {
// 输出数据
echo "<form name=\"cheak\" method=\"post\" action=\"updateSct.php\">";
while ($row = $result->fetch_assoc()) ... | true |
3e3a3c63029bfe3bd4b9c5d73c2d54b8e7d49c2e | PHP | lightster/pickem-app | /src/Pages/FwPage.php | UTF-8 | 3,910 | 2.828125 | 3 | [] | permissive | <?php
namespace App\Pages;
use The\Form;
use function The\{asset_url, json, html, redirect, url_for};
abstract class FwPage
{
protected $vars;
private $response;
private $request;
private $layout = '';
private $render_vars = [
'CSS_FILES' => [],
'JS_FILES' => [
'HEAD... | true |
06dfac645ce72844e4188251478eada7aae75a0b | PHP | arnaldo95jc/CRUD-PHP | /conf_dados_cad.php | UTF-8 | 6,337 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<title>Confirmação dos dados cadastrados</t... | true |
c99a33259c3ea9b2d5641faee69ddc8770abde94 | PHP | Shadane/yii2parser | /yii/components/parser/BaseParser.php | UTF-8 | 12,834 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\components\parser;
use app\models\Account;
use app\models\OutputHelper;
use Yii;
use app\components\MyCurl;
use phpQuery;
abstract class BaseParser
{
/* Следующие константы реализовывать в парсере определенного сайта */
/* -------------------------------------------------------
* ... | true |
877574d391e4f0b6d977caee09562888785e619a | PHP | renangtm/rtc | /php/entidades/GerenciadorAtividade.php | UTF-8 | 10,393 | 2.671875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Gerenciador
*
* @author Renan
*/
class GerenciadorAtividade {
public static $TIME_SINAL = 70000; ... | true |
1446dbef1542e275da2ca78b4f56edc1c7539906 | PHP | charlesdccti/wordpress-docker-compose | /wp-app/wp-content/plugins/elementskit-lite/modules/header-footer/cpt-hooks.php | UTF-8 | 3,837 | 2.609375 | 3 | [
"GPL-3.0-only",
"GPL-3.0-or-later",
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"GPL-2.0-or-later"
] | permissive | <?php
namespace ElementsKit\Modules\Header_Footer;
defined( 'ABSPATH' ) || exit;
class Cpt_Hooks {
public static $instance = null;
public function __construct() {
add_action( 'admin_init', [ $this, 'add_author_support_to_column' ], 10 );
add_filter( 'manage_elementskit_template_posts_columns', [ $this,... | true |
3ebaf25407b05605d8c53cbf40757d52ef1c3e48 | PHP | Techfever/Core | /vendor/Techfever/Autoresponder/Management.php | UTF-8 | 2,009 | 2.671875 | 3 | [] | no_license | <?php
namespace Techfever\Autoresponder;
use Techfever\Exception;
use Techfever\Autoresponder\General\General as GeneralBase;
class Management extends GeneralBase {
/**
* Option
*
* @var option
*
*/
protected $options = array (
'request' => null,
'response' => null,
'controller' => null,
'r... | true |
8b8a8df490860395eac84d6b6d3632f16a19c9cd | PHP | Aramis1999/barquito_papel | /App/models/tipo_producto.class.php | UTF-8 | 2,487 | 3.25 | 3 | [] | no_license | <?php
class Tipo extends Validator{
private $id = null;
private $tipo = null;
public function setId($value){
if($this->validateId($value)){
$this->id = $value;
return true;
}else{
return false;
}
}
//Funcion para recolectar el id
pub... | true |
41a192037f846bcbb356f703ce3ae803876043f7 | PHP | artmeet/json-api-server | /src/Extension/Extension.php | UTF-8 | 701 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of tobyz/json-api-server.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tobyz\JsonApiServer\Extension;
use Psr\Http\Message\ResponseInterface a... | true |
18c561baca1950c83e3b6415d5fb5db747106d33 | PHP | SteppingHat/php-emoji-detector | /src/Model/EmojiInfo.php | UTF-8 | 2,677 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace SteppingHat\EmojiDetector\Model;
class EmojiInfo {
/**
* The emoji characters
* @var string
*/
protected $emoji;
/**
* A friendly emoji name
* @var string
*/
protected $name;
/**
* An even friendlier emoji name
* @var string
*/
protected $shortName;
/**
* The category of... | true |
9878d01b9452e7f9ea751b6a051d0b8be66c5a56 | PHP | shoppingflux/module-magento2 | /Api/AccountRepositoryInterface.php | UTF-8 | 1,175 | 2.578125 | 3 | [] | no_license | <?php
namespace ShoppingFeed\Manager\Api;
use Magento\Framework\Exception\CouldNotDeleteException;
use Magento\Framework\Exception\CouldNotSaveException;
use Magento\Framework\Exception\NoSuchEntityException;
use ShoppingFeed\Manager\Api\Data\AccountInterface;
/**
* @api
*/
interface AccountRepositoryInterface
{
... | true |
c5dd8b931328c1effa46d6aa18ce3cdff68d68f5 | PHP | phpists/sk | /api/modules/Main/Services/Pattern/SimpleVariable.php | UTF-8 | 897 | 3.015625 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Modules\Main\Services\Pattern;
final class SimpleVariable implements Variable
{
/**
* @var string
*/
private $name;
/**
* @var string|null
*/
private $value;
/**
* @var string|null
*/
private $defaultValue;
public func... | true |
fd75a3a361003518014a3af2ab4956353fad2c69 | PHP | lwbinary/volunteerSys | /opp_sign_up/sign_up_student.php | UTF-8 | 754 | 2.59375 | 3 | [] | no_license | <?php include '../view/header.php'; ?>
<div id="main">
<h1>Select A Student</h1>
<form action="" method="post" id="aligned">
<input type="hidden" name="action" value="select_class" />
<label>Student:</label>
<select name="student_name"><option value="">-- Select A Student --</option>... | true |
5192da1c030d3833e950c53842c7b86f07641a5f | PHP | pjablonska/PZ_3PD | /rejestracja.php | UTF-8 | 2,507 | 2.515625 | 3 | [] | no_license | <?
ob_start();
session_start();
define('DB_HOST','localhost');
define('DB_USER','root'); //wpisz nazwęużytkownika bazy danych
define('DB_PASS','root'); //wpisz hasło dla tego użytkownika
define('DB_DB','system_ticket');
//inkludujemy plik z hasłami
//include("conf.php");
//Laczenie z baza
//mysql_connect ($DB_H... | true |
d11d0737439ed3149170b93a161aa758fa693dcf | PHP | scmoeller/trend-analysis | /src/Scmoeller/Finance/Price.php | UTF-8 | 912 | 3.140625 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace Scmoeller\Finance;
use DateTime;
/**
* Description of Price
*
* @author stefan
*/
class Price
{
/**
* ... | true |
f2b87217bad2e1f6e82513cc283e1698edb674a0 | PHP | janusman/acquia-support-zendesk-tools | /auto-ahtpanic-on-tickets/auto-ahtpanic-on-tickets.php | UTF-8 | 4,433 | 2.671875 | 3 | [] | no_license | <?php
// This script queries the ticket queue once, determines tickets to put comments in
// and adds them.
define('HOURS_BACK', 72);
require '../zendesk_api.php.inc';
require 'ZendeskTicketProcessor.php';
require 'SupportSuggesterMatchingService.php';
function output_color($color, $msg) {
$colors = [
'green'... | true |
f27004ebdca2d25a7e020b6bd3a108feb640ae10 | PHP | RenaatST/cp3_whiteboard_groep9 | /view/images/index.php | UTF-8 | 546 | 2.546875 | 3 | [] | no_license | <section id="content">
<header><h1>All images</h1></header>
<?php
foreach ($images as $image) {
echo "<a href=\"index.php?page=detail&id={$image['id']}\">
<img src=\"uploads/{$image['name']}_th_{$image['user_id']}.{$image['extension']}\" /></a>";
}
?>
<!-- Lijst van images
<a href="index.p... | true |
78ad11f41defb8040aa19a7017d8305e8ee85586 | PHP | mlewan01/hospitalCateringSys | /classes/myLogin.php | UTF-8 | 10,680 | 2.8125 | 3 | [] | no_license | <?php
class myLogin {
/** registers user
* @param class myDB database object
* @param class myTime custom Time object
* @return array where 0 is message, 1 is username, 2 devout
*/
function register($db, $mt) {
$dev = "--------------<b>start of function register</b>------------------<br>";
$b = '<br/>';
//Ch... | true |
e613722d9ef1a7328142c93bc503881d1f26bddc | PHP | seyuf/magento-actions-sample | /magento/dev/tests/static/testsuite/Magento/Test/Integrity/Phrase/ArgumentsTest.php | UTF-8 | 4,693 | 2.578125 | 3 | [
"OSL-3.0",
"LicenseRef-scancode-unknown-license-reference",
"AFL-2.1",
"AFL-3.0",
"MIT"
] | permissive | <?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Test\Integrity\Phrase;
use Magento\Framework\Component\ComponentRegistrar;
/**
* Scan source code for detects invocations of __() function or Phrase object, analyzes placeholders with arguments
... | true |
43bdcb25e15a53633ee25aca078c907c0d1788f4 | PHP | ata/dynebolic | /lib/Auth.php | UTF-8 | 2,613 | 2.78125 | 3 | [] | no_license | <?php
@define('POST_LOGIN_VAR','username');
@define('POST_LOGIN_PASS','password');
@define('TABLE_USERS','tbl_users');
@define('USER_LOGIN','usr_login');
@define('USER_PASS','usr_password');
@define('USER_PRIV','usr_privilege');
@define('USER_LAST_LOGIN','usr_last_login');
class Auth{
var $db;
var $session;
var $log... | true |
453259fffb16fd0e39c58114c762d3418177940b | PHP | ecourtial/Fighting-Steel-Dynamic-Campaign-Manager | /src/ScenarioGenerator/Engine/SideGenerator.php | UTF-8 | 805 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\ScenarioGenerator\Engine;
use App\Core\Tas\Scenario\Scenario;
class SideGenerator
{
/** @return string[] */
public function getSides(string $code, int $period, string $side, bool $mixedNavies): array
{
if (Scenario::ALLIED_SIDE === $side) {
... | true |
83f784eaf6478998ea8eaa38da356db943491220 | PHP | cendolicious/car-parking-lot | /app/Http/Helpers/FileHelper.php | UTF-8 | 1,187 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Helpers;
class FileHelper {
const SPACE_FILE_PATH = 'app/space.json';
const PARKING_FILE_PATH = 'app/parking.json';
const PRICE_FILE_PATH = 'app/price.json';
public static function getFile($path, $parse = false){
if (!file_exists($path))
fwrite(fopen($pat... | true |
ab025aa736743823da1399cca85c27b4b4dd22cd | PHP | barkerja/EightPHP | /modules/export/classes/libraries/export/driver/excel.php | UTF-8 | 1,002 | 2.84375 | 3 | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Export Driver Excel
*
* @package Modules
* @subpackage Export
* @author EightPHP Development Team
* @copyright (c) 2010 EightPHP
* @license http://license.eightphp.com
*/
class Export_Driver_Excel_Core extends Export_Driver {
private $data = "";
/**
* File extension for this export data t... | true |
a66b8bde030467310919862bbde5b5adb49c6fe4 | PHP | sylapi/eurocommerce-linker | /src/Api/ProductSets.php | UTF-8 | 1,171 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Sylapi\EurocommerceLinker\Api;
use Exception;
use GuzzleHttp\Exception\ClientException;
use Sylapi\EurocommerceLinker\Entities\ProductSet;
use Sylapi\EurocommerceLinker\Helpers\ResponseError;
use Sylapi\EurocommerceLinker\Exceptions\TransportException;
class ProductSets
{
... | true |
138942fd291375f43819438d9b1deaa852672458 | PHP | CodeAcademyDreamTeam/atraskvr | /app/Http/Traits/FillableTrait.php | UTF-8 | 433 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: karolis
* Date: 5/24/2017
* Time: 10:40 AM
*/
namespace App\Http\Traits;
trait FillableTrait
{
/**
* Generates list of fillable model columns without first item (id) for use in controller and blade
*/
public function getFillable() {
if(sizeof(... | true |
b2feb01a8bbad3f5f3d12b71de8c68f1670f413b | PHP | dynamicpdf-api/php-client | /src/Elements/ImageElement.php | UTF-8 | 4,082 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace DynamicPDF\Api\Elements;
include_once __DIR__ . '/Element.php';
include_once __DIR__ . '/ElementType.php';
/**
*
* Represents an image element.
*
* This class can be used to place images on a page.
*
*/
class ImageElement extends Element
{
/**
*
* Initializes a ... | true |
fd3fe570c53a05158a7469e49306ebcf89606f3f | PHP | mengqiqi884/Htest | /api/modules/v1/models/CScoreList.php | UTF-8 | 1,188 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace v1\models;
use Yii;
/**
* This is the model class for table "c_score_list".
*
* @property string $sl_id
* @property integer $sl_user_id
* @property integer $sl_log_id
* @property string $sl_rule
* @property integer $sl_score
* @property string $sl_act
* @property string $created_time
*/
cla... | true |
fa477e8984300d8f890247ccf2bec08262fb5a91 | PHP | lennyaspen/xeng_cms | /src/AppBundle/Services/Auth/PermissionManager.php | UTF-8 | 909 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Services\Auth;
use Doctrine\Common\Collections\ArrayCollection;
use AppBundle\Entity\Auth\XAppModule;
/**
* @author Ermal Mino <ermal.mino@gmail.com>
*
*/
class PermissionManager {
/** @var array $modules */
private static $modules=[];
/**
* @param XAppModule $module
... | true |
ebdbe32a4120f0d1dfc0859b00fcd069f3f98e8a | PHP | beaulier/immo-collaboratif | /projet-immo/php/connexion.php | ISO-8859-1 | 1,708 | 2.5625 | 3 | [] | no_license | <?php
/*-------------------------*/
/*Connexion base de donnees*/
/*-------------------------*/
$dsn = 'mysql:dbname=profils;host=127.0.0.1';
$user = 'root';
$password = '';
try {
$bdd = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
echo 'Connexion choue : ' . $e->getMessage();
}
$reponse = $... | true |
5fd5e7b4fba73308e59431f644f99f75fd06396e | PHP | trantu230399/18php04 | /session7/mvc bootraps/list.php | UTF-8 | 1,059 | 2.640625 | 3 | [] | no_license | <?php
$conn = @mysqli_connect("localhost", "root", "", "18php04_shop");
?>
<?php
$sql = "select * from products";
$conn->query($sql);
$result = $conn->query($sql);
?>
<div class="innertube">
<table width="100%" border="1">
<tr>
<?php
$i = 0;
... | true |
539d9ec399f6440b00b88f25c203821bcbbc3134 | PHP | Melsius/alfafloor-icehrm | /core/src/Alfa/Admin/Api/ElectricityUtil.php | UTF-8 | 1,705 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Alfa\Admin\Api;
use Alfa\Common\Model\EmployeeElectricity;
use Classes\SettingsManager;
use Utils\LogManager;
class ElectricityUtil
{
public $eElectricity;
public function __construct($employeeElectricity = NULL) {
if ($employeeElectricity == NULL) {
$employeeElectricity ... | true |
cdf84ded8be1cdb764e57513c1a3beb533cfcecf | PHP | SkylarKelty/hipbot | /lib/router.php | UTF-8 | 265 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Main message router
*/
class router
{
/**
* Route a message
*/
public static function recieve_message($user, $message) {
// Is this to set a reminder?
if (strpos($message, "remind me")) {
models\Reminder::match($user, $message);
}
}
} | true |
137f1dbae33a93077683cee364234e6c1fb6972d | PHP | brunocunha00/code-orders-apigility | /module/CodeOrders/src/CodeOrders/V1/Rest/Products/ProductsRepository.php | UTF-8 | 1,202 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Bruno
* Date: 20/02/2016
* Time: 19:01
*/
namespace CodeOrders\V1\Rest\Products;
use Zend\Db\TableGateway\AbstractTableGateway;
use Zend\Paginator\Adapter\DbTableGateway;
class ProductsRepository
{
/**
* @var AbstractTableGateway
*/
private $tableGatew... | true |
8627056140ef1d14d2a2267dc567cbb1e876df30 | PHP | jackjack2017/nova | /app/Models/Option.php | UTF-8 | 848 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Option extends Model
{
protected $fillable = [
'article', 'color_id', 'size_id', 'product_id'
];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function products()
{
re... | true |
52d8c2b253bfb5c3da3c30319941f3bdd6b4b0c3 | PHP | ldevaulx/exercism | /php/rna-transcription/rna-transcription.php | UTF-8 | 73 | 2.65625 | 3 | [] | no_license | <?php
function toRna($str)
{
return strtr($str, 'GCTA', 'CGAU');
}
| true |
9138b5660493bd212beeb0365e46b9b57d28a585 | PHP | ritey/electric-autos | /coderstudios/Requests/VehicleRequest.php | UTF-8 | 956 | 2.703125 | 3 | [] | no_license | <?php
namespace CoderStudios\Requests;
use App\Http\Requests\Request;
class VehicleRequest extends Request {
/**
* Determine if the user is authorised to make this request.
*
* @return boolean
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.... | true |
390909a2c93a7c5cdbac8d402d400652613346da | PHP | JimJam117/astragal | /includes/upload.general_settings.inc.php | UTF-8 | 2,266 | 2.796875 | 3 | [] | no_license | <?php
include_once ("includes/config.php");
include_once ("includes/db.php");
function upload_backend_index($id, $pdo_obj) {
if (empty($id)) {
return "Error with the id '$id', please make sure you entered this into the function correctly.";
}
if ($id == "pp_file") { $uploadName = "profile picture"; }
els... | true |
68d8926343224b699d9057542c9b8c31f98ed5ae | PHP | edno/baloo | /src/lib/json.php | UTF-8 | 2,305 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Baloo\Lib\Json;
// @codingStandardsIgnoreStart
/**
* @source: https://stackoverflow.com/questions/6041741/fastest-way-to-check-if-a-string-is-json-in-php/15198925#15198925
**/
// @codingStandardsIgnoreEnd
function json_valid(string $strJson)
{
// decode the JSON data
json_decode($strJson);
... | true |
4d8b2cf96bff7cc31d17de84b0c93ea804b0a397 | PHP | Montserrat80/rezepte | /index.php | UTF-8 | 1,242 | 2.625 | 3 | [] | no_license | <?php
session_start();
require_once("php/functions/pfad_korrektur.php");
pfad_korrektur();
#echo "mostra el PFAD_KORREKTUR ".PFAD_KORREKTUR;
#echo "<br />";
#echo "mostra el BASIS_PFAD ".BASIS_PFAD;
#echo "<br />";
#echo "mostra el SEITENAUSWAHL ".SEITENAUSWAHL;
#no fem els require pq ara treballem amb namespace i a... | true |
12690d9290a29fa60ad681f0d287c91902d106a1 | PHP | wildex/php-forum | /app/core/RedisSessionHandler.php | UTF-8 | 1,649 | 2.90625 | 3 | [] | no_license | <?php
/**
* @class \core\RedisSessionHandler
*/
namespace core;
class RedisSessionHandler implements \SessionHandlerInterface {
/**
* Default session name
*/
const DEFAULT_SESSION_NAME = 'PHPFORUMSID';
/**
* Session TTL, current value: 1 hour
*/
const SESSION_TTL = 3600;
/... | true |
0eeefbe182de29293602e84c9c3dfbf637a7698c | PHP | plivinskiy/sw6test | /vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Shrink.php | UTF-8 | 1,687 | 2.5625 | 3 | [
"Apache-2.0",
"LGPL-2.1-only",
"LGPL-2.1-or-later",
"LGPL-2.0-or-later",
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Elasticsearch\Endpoints\Indices;
use Elasticsearch\Endpoints\AbstractEndpoint;
use Elasticsearch\Common\Exceptions;
/**
* Class Shrink.
*
* @category Elasticsearch
*
* @author Zachary Tong <zach@elastic.co>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apach... | true |
15745af8abef0b13b8bb8f454b8af0162a3c67f3 | PHP | rachdi/laravel-caesars-cipher | /webapp/app/Http/Controllers/ControllerMessage.php | UTF-8 | 1,576 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Message;
class ControllerMessage extends Controller
{
public function getIndex(){
$texts= Message::all();
return view ('text.message',['messages'=>$texts]);
}
public function AjoutText(){
return View('text.comment');
}
public fun... | true |
6ad7d26570af704a2a5b8c632147ed802e260f6f | PHP | slavensaka/allian | /app/Models/ConferenceSchedule.php | UTF-8 | 1,028 | 2.890625 | 3 | [] | no_license | <?php
namespace Allian\Models;
use Database\Connect;
use Database\DataObject;
class ConferenceSchedule extends DataObject {
protected $data = array(
"conf_id" => "",
"orderID" => "",
"conf_tag" => "",
"user_code" => "",
"interpreter_code" => "",
"start_datetime" => "",
"end_datet... | true |
9246e6bf82315761eaffb9ed35dd0d0390b4f268 | PHP | Sunny-Ojo/online-reporting-for-an-event | /register.php | UTF-8 | 2,974 | 2.75 | 3 | [] | no_license | <?php
session_start();
if (isset($_POST["submit"])) {
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "dtce";
$errors = [];
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
... | true |
2a7f51f7371addb75c98624e4b9cb11735945e15 | PHP | hudaahmedgithub/ecommerce-shop | /services/Products/CartService.php | UTF-8 | 431 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Services\Products;
use Repositories\Eloquent\CartRepository;
class CartService
{
/**
* The Cart Repository
*
* @var \Repositories\Eloquent\CartRepository
*/
private $cartRepository;
/**
* The Service Constructor
*
* @return void
*/
public funct... | true |
de34cfb9aafc774ffc8da026afa1ee587526b1f3 | PHP | aragorn-yang/yy-onix-php | /src/ProductFeatures/HasAudiences.php | UTF-8 | 635 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace AragornYang\Onix\ProductFeatures;
use AragornYang\Onix\Composites\Audience;
use SimpleXMLElement;
trait HasAudiences
{
/** @var array|Audience[] */
protected $audiences = [];
/**
* @return Audience[]
*/
public function getAudiences(): array
{
return $this->audie... | true |
34ea42e5a0f125d28c43efc472864f51fa0448a2 | PHP | Bustets/2DAW | /EXAMENpardopontdanielfinal/modelo/dpp.php | UTF-8 | 921 | 3.21875 | 3 | [] | no_license | <?php
class Empleado {
private $nombre;
private $foto;
function __construct($nombre, $foto) {
$this->nombre = $nombre;
$this->foto = $foto;
}
function __get($var) {
return $this->$var;
}
function __set($var, $value) {
... | true |
be434d19d5a35eb2b70b68b48c0e1e9c612b0c32 | PHP | pdandreyv/gprs_smart_frig | /src/gprs/AdminBundle/Entity/User.php | UTF-8 | 3,582 | 2.546875 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace gprs\AdminBundle\Entity;
use Sonata\UserBundle\Entity\BaseUser;
use FOS\UserBundle\Model\User as AbstractUser;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Yaml\Parser;
/**
* User
*/
class User extends BaseUser
{
/**
* @var integerFOS\UserBundle\Model\User
*/
protected $... | true |
da29f429036bcaf328d3bfa78ae7e304377e8c08 | PHP | Jonap98/RehabilitacionFisica | /app/Http/Controllers/WorkoutController.php | UTF-8 | 1,999 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use App\Exercise;
use App\Therapy;
use App\Assignment;
use App\Workout;
class WorkoutController extends Controller
{
public function index($id)
{
//dd($id);
$usr = User::where("id", "=", $id)->get();
$exe... | true |
422b956dfaa5a8b45a3b60e84f93efb36f8a14f2 | PHP | gdesguerra/yuarel | /app/Http/Controllers/PreviewController.php | UTF-8 | 777 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\ShortUrl;
class PreviewController extends Controller
{
/**
* Display the specified resource.
*
* @param int $codeOrAlias
* @return \Illuminate\Http\Response
*/
public function show($codeOrAlias)
{
... | true |
4cd46ac069a00f3d985e2a3906d5a0c94980ac85 | PHP | aid74/gilmon_ex1 | /src/App.php | UTF-8 | 574 | 2.953125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App;
final class App
{
/**
* @var array
*/
private static $items = [];
/**
* @var \App\ProductFactory
*/
public static $product_factory;
public function __construct(array $items, ProductFactory $productFactory)
{
static::$... | true |
00fa39c6417bc82eb3b79187fc7255fd77f8312d | PHP | sonoftheweb/gilded_rose | /app/Http/UseCases/Products.php | UTF-8 | 884 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\UseCases;
use App\Models\Product;
class Products extends BaseUseCase
{
protected $relations = [
'images'
];
/**
* @param $id
* @param $request
* @return array
*/
public function purchase($id, $request): array
{
if (auth()->guard('api... | true |
59df9795ffd5a24019fbf91ddcda7dba1417119e | PHP | willek/LSP | /Barang.php | UTF-8 | 3,577 | 3.328125 | 3 | [] | no_license | <?php
/**
* Struct adalah sebuah object dengan membernya bersifat public.
**/
Class Barang {
// property yang dimiliki class barang
// database (file .json)
private $file = 'Barang.json';
public $daftar_barang;
// method yang dipanggil ketika object barang dijalankan
public function __construct() {
... | true |
75ea1c3367d2696d1f051c20691b80b3a0ef2e34 | PHP | cuisine-wp/chef-sections | /Classes/Admin/Panels/PanelListeners.php | UTF-8 | 1,434 | 2.8125 | 3 | [] | no_license | <?php
namespace ChefSections\Admin\Panels;
use Cuisine\Wrappers\Field;
use ChefSections\Wrappers\StaticInstance;
use ChefSections\Wrappers\SettingsPanel as Panel;
class PanelListener extends StaticInstance{
/**
* Init admin events & vars
*/
public function __construct(){
$this->listen();
}
... | true |
ff5821102043afe734e3e5d0de8f34b82aea5ffa | PHP | athitsa/backentAPI | /helper/evening_meal.php | UTF-8 | 417 | 2.703125 | 3 | [] | no_license | <?php
function evening_meal($menu_food){
$food = array();
$result_sort = array_slice($menu_food, 6, 3);
// return $food;
$a = [];
$b = [];
foreach($result_sort as $data){
array_push($food,[
"menu" => $data['menu'],
"ingredients" => $data['ingre']
]);
... | true |
89c90aa944bdf30f3ef83055f4740ef7ca953218 | PHP | UltimaPHP/UltimaPHP | /core/packets/0xD6.packet.php | UTF-8 | 1,033 | 2.921875 | 3 | [] | no_license | <?php
/**
* Ultima PHP - OpenSource Ultima Online Server written in PHP
* Version: 0.1 - Pre Alpha
*/
class packet_0xD6 extends Packets {
private $objects = [];
/**
* Defines the packet, the length and if there is a client send
*/
public function __construct($client = false) {
$this-... | true |
dd4195c18da96c4558ddf0c23806b522fc9ecd0f | PHP | sekka1/ChronosWorker | /Wrappers/PHP/AlgorithmsIO/InternalJobUpdates/Jobs.php | UTF-8 | 3,113 | 2.890625 | 3 | [] | no_license | <?php
namespace AlgorithmsIO\InternalJobUpdates{
/**
* This is an internal Algorithms.io class that is able to update
* job statuses.
*
* @author garland
*/
include_once(dirname(__FILE__).'/../SDK/Utilities.php');
class Jobs{
private $internalSystemAuth = '5b07d7a58d06a9990dccfaa4de8b4c0a8b0d52... | true |
802b7997a535b631a1e40b66296791ba792868d3 | PHP | sosaavedra/securecoding | /tools for whitebox/phpteam18/models/Transaction.php | UTF-8 | 7,649 | 2.6875 | 3 | [] | no_license | <?php
class TransactionModel{
public $requestId;
public $userId;
public $createDate;
public $fromAccount;
public $toAccount;
public $transferAmount;
public $description;
/*
* status 1 is for pending
* status 2 is for approved
* status 3 is for denied
* these are not defined in DB
*/
public $status;... | true |
be22ee28a604fcb3769476b0a2ef74cff4ee3c53 | PHP | anoop-pathak/git-demo | /app/Console/Commands/deleteTerminatedCompanyData.php | UTF-8 | 1,015 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Models\Subscription;
use Carbon\Carbon;
use Illuminate\Console\Command;
class deleteTerminatedCompanyData extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'command:delete_terminated_company_data';
/*... | true |