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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
af9515ddbfca28c9715d7c1fcf1bf22192fee871 | PHP | gemafajar09/base_project | /database/migrations/2021_01_08_085842_create_login_models_table.php | UTF-8 | 747 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLoginModelsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tb_admin', ... | true |
1ebde74b52860833c029a42568d5c5e15e434535 | PHP | AlrclyGit/SACornerPHP | /app/Service/UserTokenService.php | UTF-8 | 2,724 | 2.8125 | 3 | [] | no_license | <?php
/**
* Name: 用户Token生成服务
* User: 萧俊介
* Date: 2020/9/1
* Time: 11:18 上午
* Created by SANewOrangePHP制作委员会.
*/
namespace App\Service;
use App\Enums\ScopeEnum;
use App\Exceptions\TokenException;
use App\Models\User;
class UserTokenService extends TokenService
{
protected $code;
protected $wxAppID;
... | true |
b8f0b016866ea403327e0bd4219f2f7be3132fcb | PHP | fsavina/hermes | /src/Commands/Deploy.php | UTF-8 | 3,378 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Hermes\Commands;
use Hermes\Contracts\RoutineDriver;
class Deploy extends AbstractCommand
{
/**
* The name and signature of the console command.
* @var string
*/
protected $signature = 'hermes:deploy
{remote? : The remote to be deployed}
{branch=master : The... | true |
bc2b039e2f9f6eab98b682d726c6d26eed8ba55b | PHP | AbramOmovich/Diogen | /app/Helpers/Functions/alert.php | UTF-8 | 213 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
use App\Helpers\Classes\SweetAlert;
function alert($title = '', $message = ''){
$alert = new SweetAlert();
if($title !== ''){
$alert->success($title,$message);
}
return $alert;
} | true |
704e2e4e453b2e1318448ed1172c68ea1efba69e | PHP | giaplv57/E-THAPS | /PHP-Parser/lib/PHPParser/Node/Stmt/Else.php | UTF-8 | 581 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @property PHPParser_Node[] $stmts Statements
*/
class PHPParser_Node_Stmt_Else extends PHPParser_Node_Stmt
{
/**
* Constructs an else node.
*
* @param PHPParser_Node[] $stmts Statements
* @param int $line Line
* @param null|string $docComment Near... | true |
4630b655a421da20f3ce5afd0371abbec5af4ebf | PHP | cuongpham270695/module2_lesson1 | /futurevalue.php | UTF-8 | 1,429 | 2.625 | 3 | [] | no_license | <html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Future Value</title>
<style type="text/css">
.calculate {... | true |
dc5c6fdfe5cfb8e7fa787b447964f1fdae042c68 | PHP | steverobbins/lab | /soap.php | UTF-8 | 4,653 | 3.359375 | 3 | [] | no_license | <?php
/**
* Supports switching soap versions without much effort.
* Make all calls like you would with version 1, leaving out the session.
*
* $soap = MultiVersionSoapClient("http://example.com/", "user", "password");
* $result = $soap->call("catalog_product.update", $arg1, $arg2, ...);
*/
class MultiVersionSoap... | true |
84f3eb82ed5e03807c8aec7cf8d2433cf97a3ee0 | PHP | FranRoy/magento2-custom-smtp | /Model/Transport.php | UTF-8 | 1,637 | 2.609375 | 3 | [] | no_license | <?php
namespace Emizentech\CustomSmtp\Model;
class Transport extends \Zend_Mail_Transport_Smtp implements \Magento\Framework\Mail\TransportInterface
{
/**
* @var \Magento\Framework\Mail\MessageInterface
*/
protected $_message;
/**
* @param MessageInterface $message
* @param null $pa... | true |
d0c513213c82ab7aea4a278535403704872d30ba | PHP | CosmicDNS/PHP-DNS-SERVER | /tests/Resolver/BindResolverTest.php | UTF-8 | 1,962 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of PHP DNS Server.
*
* (c) Yif Swery <yiftachswr@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace yswery\DNS\Tests\Resolver;
use Badcow\DNS\Parser\ParseException;
use yswery\DNS\R... | true |
dce8fc05e9fbdde436c99a2a5e29b7f7d0f9d50f | PHP | bornhaeusser/UltimateWarfare | /src/Entity/GameUnit.php | UTF-8 | 9,175 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace FrankProjects\UltimateWarfare\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
/**
* GameUnit
*/
class GameUnit
{
/**
* @var int
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var string
... | true |
8d44baa4ca1501a386122b0a682be4c5c0172114 | PHP | Adex9ja-Org/airtime_data_hub_web | /admin/app/Model/ActiveStatus.php | UTF-8 | 668 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
class ActiveStatus
{
const InActive = 0;
const Active = 1;
public static function getTitle($status)
{
switch ($status){
case self::InActive:
return "DeActivated";
case self::Active:
return "Active";
... | true |
bdce5daa3b8f867bbdf74eb41460447936482885 | PHP | caseyweederman/Valebat | /core/toolkit/lib/validator/notIn.php | UTF-8 | 749 | 2.78125 | 3 | [] | no_license | <?php
namespace Kirby\Toolkit\Validator;
use Kirby\Toolkit\V;
use Kirby\Toolkit\Validator;
// direct access protection
if(!defined('KIRBY')) die('Direct access is not allowed');
/**
* Not In Validator
*
* Checks for a value not contained in a list of values
*
* @package Kirby Toolkit
* @author Bastian... | true |
c09a36f8b44d1ec01ed6d9d5188984949596991c | PHP | MartzolfTom/BetisierPhp | /include/pages/connexion.inc.php | UTF-8 | 1,725 | 2.734375 | 3 | [] | no_license | <?php
$db = new Mypdo();
$connexionManager = new ConnexionManager($db);
$salarieManager = new SalarieManager($db);
$nb_alea1 = rand(1, 9);
$nb_alea2 = rand(1, 9);
?>
<h1>Pour vous connecter</h1>
<?php
if (empty($_POST['per_login'])) {
$_SESSION['bonResultat'] = $nb_alea1 + $nb_alea2;
?>
<form action="#" method... | true |
1ed455ebd9ebc0c390ab7e998bcd05ba7925ddb1 | PHP | ahmedfeki/mtdavedis | /app/Test/Fixture/CollectionFixture.php | UTF-8 | 2,012 | 2.625 | 3 | [] | no_license | <?php
/**
* CollectionFixture
*
*/
class CollectionFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'name' => array('type' => 'string', 'null' => true, 'default' => null, 'len... | true |
25c8b7cf0165abcc4a0b85858fe2dd97483eb6fd | PHP | lottabliss/itc240-2014 | /assignment09/speed.php | UTF-8 | 2,322 | 3.015625 | 3 | [] | no_license | <?php
//include ('busclass.php');
//define variables, speed and bomb
$speedometer = 20;
$bomb = "";
$gap = 0;
$image = 'speed';
$funnyMessage = "";
$danger = 'no';
if(isset($_POST["submit"]))
{
$speedometer = $_POST["speedometer"];
if ($speedometer>=80){
$bomb = 1;
... | true |
8d918064ca77f2d3d1cb7cc7e47a6122b7d9a985 | PHP | lyrama/plane | /api/cart-update-num.php | UTF-8 | 921 | 2.515625 | 3 | [] | no_license | <?php
/*
根据pid 修改 购车中的 商品的数量pnum
get请求,
参数 pid
参数pnum
* */
$dbhost = '192.168.1.200:3306'; // mysql服务器主机地址
$dbuser = 'root'; // mysql用户名
$dbpass = ''; // mysql用户名密码
$conn = mysqli_connect($dbhost, $dbuser, $dbpass);
if(! $conn )
{
die('连接失败: ' . mysqli_error($co... | true |
dbaa11f3ba9e1fa0b834cb8fc02df66b48c074c8 | PHP | amirnajdi/sms-api | /app/Interfaces/SmsAdapterInterface.php | UTF-8 | 276 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Interfaces;
/**
* Interface SmsAdapter
* @package App\Interface
* @author amirnajdi amirnajdi@outlook.com
*/
interface SmsAdapterInterface
{
/**
* @param $number
* @param $body
* @return mixed
*/
public function send($number, $body);
}
| true |
8a78530b791315f011b2633865ddab095744d7c3 | PHP | dsjellz/hootreddit | /app/models/RedditResponse.php | UTF-8 | 458 | 3.0625 | 3 | [] | no_license | <?php
/**
* This class is meant to be used as a shell for a response from reddit. Mainly used to provide standardized format
* to hold data, before, and after links
*
* @author djellesma
*/
class RedditResponse{
public $data;
public $before;
public $after;
public function __construct($data = null,... | true |
42633a47ab579ec64b155a9eac06a3cad2f70792 | PHP | PeeHaa/Uploader | /Application/Controllers/User.php | UTF-8 | 2,120 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* User controller
*
* PHP version 5.4
*
* @category Application
* @package Controllers
* @author Pieter Hordijk <info@pieterhordijk.com>
* @copyright Copyright (c) 2012 Pieter Hordijk
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 1.0.0
*/
nam... | true |
709f1bdafb1c78b777a951a2ead4407cf9138dec | PHP | pascalBrauns/jobber-backend | /src/Jobber/Reactor/Storage/Table/Status.php | UTF-8 | 751 | 2.703125 | 3 | [] | no_license | <?php
namespace Jobber\Reactor\Storage\Table;
use Jobber\Reactor\Type;
use Swoole;
class Status {
public Swoole\Table $table;
public function __construct() {
$this->table = new Swoole\Table(8192);
$this->table->column('id', Swoole\Table::TYPE_STRING, 32);
$this->table->column('status', Swoole\Table::... | true |
28103e10bd77962362f87f61b974c36b32917ea6 | PHP | medjalil/My-Library | /src/DataFixtures/AppFixtures.php | UTF-8 | 1,174 | 2.828125 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use App\Entity\Category;
use App\Entity\Book;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
use Faker;
class AppFixtures extends Fixture
{
public function load(ObjectManager $manager)
{
// On configure dans quelles langues ... | true |
2b0ba60142e3749fe7846b390831448221630fb8 | PHP | TheBestMan/templates | /strategy/Question.php | UTF-8 | 391 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
abstract class Question {
protected $promt;
protected $marker;
/**
* Question constructor.
* @param $promt
* @param $marker
*/
public function __construct($promt, Marker $marker) {
$this->promt = $promt;
$this->marker = $marker;
}
public function mark... | true |
92825fae5519b7f33d9486e67aecac8406ce641e | PHP | dacoto/laravel-env-set | /src/Workers/Writer.php | UTF-8 | 2,599 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace dacoto\EnvSet\Workers;
use dacoto\EnvSet\Contracts\Formatter as EnvSetFormatterContract;
use dacoto\EnvSet\Exceptions\UnableWriteToFileException;
class Writer implements \dacoto\EnvSet\Contracts\Writer
{
protected string $buffer;
protected EnvSetFormatterContract $fo... | true |
222e195919979eac02ea523d1e86d7fac8620296 | PHP | neokimu/phprecipe | /04/make_directory.php | UTF-8 | 814 | 3.4375 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>ディレクトリを作成したい</title>
</head>
<body>
<?php
// 作成するディレクとリ名を設定します。
$dir = '../data/output/madeDir';
// ディレクとリの存在を確認します。
if (is_dir($dir)) {
echo "<p>ディレクとリ $dir は既に... | true |
22cc1b14fc1a4438298d646350bff294cbc69608 | PHP | thekanbo/fusioncms-v6 | /app/Jobs/Installer/CreateDatabase.php | UTF-8 | 1,051 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the FusionCMS application.
*
* (c) efelle creative <appdev@efelle.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Jobs\Installer;
use PDO;
class CreateDatabase
{
/**
*... | true |
4b8d5f0cf968eef485015da76e1eef20da1fe827 | PHP | sandboxdigital/zephyr-core-old | /application/library/Tg/View/Helper/FormSelectMulti.php | UTF-8 | 3,616 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Helper to generate a "file" element
*
* @category Zend
* @package Zend_View
* @subpackage Helper
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Tg_View_Helper_FormSelect... | true |
cdf6099d13718a06064b2fae78694b02604f7c38 | PHP | Zimroid/LaClemenceDAuguste | /B-ClientWeb/Client-Web/view/newsView.php | UTF-8 | 368 | 2.734375 | 3 | [] | no_license | <h2>News</h2>
<?php
if(isset($newsList) && $newsList != null)
{
echo '<ul>';
foreach($newsList as $news)
{
echo '<li>';
echo '<h3>' . $news->getNom() . '</h3>';
echo 'Date : ' . $news->getDate();
//echo '<br/>' . $news->getImage();
echo '<br/>' . $news->getContenu();
echo '</li>';
}
... | true |
a1f5fc01452afd38d16ab4d7a98c34e81013ff3c | PHP | CrisOspina/react-native | /reactapiphp/API/Registration_api.php | UTF-8 | 2,062 | 2.84375 | 3 | [] | no_license | <?php
// $HostName = "localhost";
// $DatabaseName = "dbibliotecarn";
// $HostUser = "root";
// $HostPass = "";
// CORS
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method");
header("Access-Control-... | true |
9620df3656758ee7c221fe89d1037e184463db03 | PHP | rindaayuni/utss | /system/app/Http/Controllers/LoginController.php | UTF-8 | 1,004 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
use App\User;
/**
*
*/
class LoginController extends Controller
{
public function login(){
return view ('login');
}
public function loginproses(Request $req){
$this->validate(request(), [
'username' => 'required',
'p... | true |
82efba7202c6eee52fcf66b04c0131b2f4b9546d | PHP | bortefi/adyen-shopware5 | /Components/PaymentStatusUpdate.php | UTF-8 | 3,131 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace AdyenPayment\Components;
use AdyenPayment\Models\Event;
use Psr\Log\LoggerInterface;
use Shopware\Components\ContainerAwareEventManager;
use Shopware\Components\Model\ModelManager;
use Shopware\Models\Order\Order;
use Shopware\Models\Order\Status;
class PaymentStatusUpdate
{... | true |
947ffdc7b0890b421090dae7dc634c588e129f06 | PHP | roelmonnens/phpbenelux-2016-modelling-by-example | /spec/Domain/SearchResultsSpec.php | UTF-8 | 1,390 | 2.65625 | 3 | [] | no_license | <?php
namespace spec\App\Domain;
use App\Domain\BookInterface;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class SearchResultsSpec extends ObjectBehavior
{
function let(BookInterface $book1, BookInterface $book2, BookInterface $book3)
{
$this->beConstructedThrough('fromArrayOfBooks', array(arr... | true |
4d8da70fd6165819882088c162a936d4c2473326 | PHP | mariyamihova/PHP-Web-Development-Basics | /Basic Syntax-Lab/3. PaginateStudents/index.php | UTF-8 | 1,219 | 2.8125 | 3 | [] | no_license | <?php
session_start();
$page = 0;
if (isset($_GET['page'])) {
$page = intval($_GET['page']);
$page = $page >= 0 ? $page : 0;
if (isset($_SESSION['students']) && !empty($_SESSION['students'])) {
$students = json_decode($_SESSION['students']);
if ($page * 5 >= sizeof($students)) {
unset($students);
}
} else {
session_uns... | true |
3ca994b776a00070eaa1276f1221c56bb73e1590 | PHP | OceanFang/xhtw_website | /app/Services/PaginationService.php | UTF-8 | 948 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Support\Collection;
class PaginationService
{
public static function makePaginator($datas, $perPage = 10, $request)
{
//Get current page form url e.g. &page=6
$currentPage = Paginator::re... | true |
2a22c9b801de1f03b7b914a72e99e9e20333a6c3 | PHP | herbid/Latihan_pertemuan_8_DTS_JWD | /fungsinilai.php | UTF-8 | 214 | 3.03125 | 3 | [] | no_license | <?php
//membuat fungsi
function hitungumur($thn_lahir, $tahun_sekrg){
$umur = $tahun_sekrg - $thn_lahir;
return $umur;
}
echo "umur saya Adalah ". hitungumur(1999,2021). " tahun";
?> | true |
84e23ea96640415c6a02c4e44d2738b5a9a911d9 | PHP | gingercoder/kongreg8_os2 | /application/members/memberControl.php | UTF-8 | 28,950 | 3.03125 | 3 | [] | no_license | <?php
/*
*
* MemberControl class extends main kongreg8app class
* provides all of the member control mechanisms necessary
* for the operation of the members module
*
*/
class memberControl extends kongreg8app{
private static $commitmentdatefixed;
private static $dateofbirthfixed;
... | true |
767b520a15b0e004ffb91438f3a4f0997d7b8246 | PHP | dpitsko/ci_test_proj | /test.php | UTF-8 | 131 | 3.015625 | 3 | [] | no_license | <?php
class Test {
public function __construct() {
$thing = 'Hello World!';
if($thing){
echo $thing;
}
}
}
| true |
1d6340978fcd0c620211d4141ee2e56585f6f49d | PHP | fumiyasac/caketest | /app/app_model.php | UTF-8 | 3,718 | 2.59375 | 3 | [] | no_license | <?php
/**
* Application model for Cake.
*
* This file is application-wide model file. You can put all
* application-wide model-related methods here.
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoun... | true |
23234f74a30197a830a30da6e7af13ebdd5ec1cd | PHP | iRAP-software/package-form-generation | /Textarea.php | UTF-8 | 1,739 | 3.3125 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Irap\FormGeneration;
class Textarea extends InputField
{
protected $m_numRows = null; # Would be better if the dev would use css to size instead.
protected $m_numCols = null; # Would be better ... | true |
35ce1fa988b487b6ab358f2debc9fd41f224ffd2 | PHP | qcho/poc-php-benchmarks | /src/php/Direction.php | UTF-8 | 678 | 3.203125 | 3 | [] | no_license | <?php
namespace php;
use MyCLabs\Enum\Enum;
/**
* EnumInPHP
* PROS:
* + easy to implement. just empty class with constants.
* + Can TypeHint.
* + no initialization needed.
* + can't iterate over values:
* + Same instance always. === works.
* CONS:
* - not builtin in php.
* ... | true |
d6eb4cb247b539d55c05348119f5c993be08e6e8 | PHP | peckadesign/PeckaDesk | /app/Model/Issues/Revision.php | UTF-8 | 1,388 | 2.59375 | 3 | [] | no_license | <?php declare(strict_types = 1);
namespace PeckaDesk\Model\Issues;
/**
* @\Doctrine\ORM\Mapping\Entity
* @\Doctrine\ORM\Mapping\Table(name="revision")
*/
class Revision
{
use \PeckaDesk\Model\CreatedTrait;
/**
* @\Doctrine\ORM\Mapping\Id
* @\Doctrine\ORM\Mapping\Column(type="integer")
* @\Doctrine\ORM\Ma... | true |
5b2f426e2c0fe9efbdefd5a778c9c10debb7bd6a | PHP | MarieSre/DWWM20Marie | /Php/Algo/Correction/Ex7.1.php | UTF-8 | 1,034 | 3.515625 | 4 | [] | no_license | <?php
// M.S
require "../FonctionsTableaux.php";
// Création du tableau
$longueur = demandeEntier("Quelle est la taille du tableau ? ");
$tab = creerTableauAvecTaille($longueur);
$consec = true; // On initialise la variable à vrai
$i = 0;
// On regarde si la première valeur est plus petite que la seconde
if ($tab[... | true |
f00094a52ce08b159e1f5c513437b669520506a4 | PHP | ilhamoperanda/js_math | /47.php | UTF-8 | 939 | 3.359375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript function to calculate the extended Euclid Algorithm or extended GCD</title>
</head>
<body>
</body>
</html>
JavaScript Code :
function Euclid_gcd(a, b) {
a = +a;
b = +b;
if (a !== a || b !== b) {
return [NaN, NaN, NaN];
}
if (a... | true |
302d08af88e3e8d15fdec6dd56ae61e525b4ee7b | PHP | ulofsix/Bookstore | /test/sql_test/INSERT INTO.php | UTF-8 | 2,414 | 2.984375 | 3 | [] | no_license |
<!-- 面向對象 -->
<?php
$mysqli = new mysqli("localhost", "bookstore", "123456", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$mysqli->query("CREATE TABLE myCity LIKE City");
/* Prepare an insert statement */
$query = "INSERT... | true |
535cbdb386630ed5f2be8f92566368439bdd4ead | PHP | afdaniele/compose-pkg-docker | /Docker.php | UTF-8 | 3,006 | 2.78125 | 3 | [] | no_license | <?php
# @Author: Andrea F. Daniele <afdaniele>
# @Email: afdaniele@ttic.edu
# @Last modified by: afdaniele
namespace system\packages\docker;
use \system\classes\Core;
use \system\classes\Utils;
use \system\classes\Database;
use \system\classes\Configuration;
/**
* API to Docker
*/
class Docker{
private stati... | true |
d4ed7aa188ca7e656819e38803730cefb1ab6b7f | PHP | CBBSD/WEB | /post.php | UTF-8 | 1,807 | 2.625 | 3 | [] | no_license | <?php
$msg = "";
if (isset($_POST['upload'])) {
$target = "image/".basename($_FILES['image']['name']);
$db = mysqli_connect("localhost","root","","tovar");
$image = $_FILES['image']['name'];
$text = $_POST['text'];
$price = $_POST['price'];
$sql = "INSERT INTO product (image,price,text) VALUES ('$image','$pric... | true |
d889250b30145956442672bb8806de545ade4eea | PHP | Laynt01/DAW2 | /Desarrollo Web Servidor/Ejercicios/Ejercicios en xamp/PHPPracticaUD6Sesion3/database/migrations/2021_03_01_172858_create_evaluabletasks_table.php | UTF-8 | 712 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEvaluabletasksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('evaluabl... | true |
60d12f3b4d0b6d86997f94a1e106223c3b70d793 | PHP | Ethan081/exo_livretete | /src/Entity/Article.php | UTF-8 | 663 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
*/
class Article
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", name="author")
*/
private $author;
/**
* @... | true |
c250bd137a25e773984c3edb5e56bd67c5ed15fa | PHP | kjdev/php-ext-hoedown | /tests/option-special-attribute-task-list.phpt | UTF-8 | 1,024 | 2.59375 | 3 | [
"MIT"
] | permissive | --TEST--
render task list of option Hoedown::SPECIAL_ATTRIBUTE
--SKIPIF--
--FILE--
<?php
$text = <<<EOT
* [ ] task1
* [x] task2
{@list .task}
EOT;
$hoedown = new Hoedown;
$hoedown->setOption(Hoedown::TASK_LIST, true);
$opt = Hoedown::SPECIAL_ATTRIBUTE;
echo "== default ==\n";
var_dump($hoedown->getOption($opt));
ech... | true |
6fcc117f5ecd202649e35faf39c5597274087847 | PHP | elmola5/beta | /ingreso_clientes_datos.php | UTF-8 | 1,453 | 2.671875 | 3 | [] | no_license | <?
session_start();
if (!isset($_SESSION["log"]))
{
header("location: login.php");
}
else
{
include("conexion.php");
$cedula = $_POST["cedula"];
$nombres = $_POST["nombres"];
$apellidos = $_POST["apellidos"];
$email = $_POST["email"];
$telfijo = $_POST["telfijo"];
$telcel = $_POST["telcel"];
$descripcion... | true |
cdf1e739faaaed0fffd5f6cdfc3268080cec3588 | PHP | vchagin/superclosure | /src/SuperClosure/ClosureParser/Ast/AstParser.php | UTF-8 | 5,088 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php namespace SuperClosure\ClosureParser\Ast;
use SuperClosure\ClosureParser\ClosureParser;
use SuperClosure\ClosureParser\ClosureParsingException;
use SuperClosure\ClosureParser\Ast\Visitor\ClosureLocatorVisitor;
use SuperClosure\ClosureParser\Ast\Visitor\MagicConstantVisitor;
use PhpParser\Node\Expr\Closure as Clo... | true |
a786d63a2af8bd3f53bc2c7433fb2e3f14429ec8 | PHP | oakwilliams/xinmoy | /Xinmoy/Client/Discovery.php | UTF-8 | 3,519 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Discovery
*
* @author Oak Williams <oakwilliams@gmail.com>
* @date 08/04/2018
*
* @copyright 2018 Xinmoy, Inc. All Rights Reserved.
*/
namespace Xinmoy\Client;
use Exception;
use Swoole\Process as SwooleProcess;
use Swoole\Event;
use Xinmoy\Swoole\Process;
/**
* Discovery
*/
trait Discover... | true |
250be183814757f6a2df56f21af8ec9115f2273e | PHP | flexzt/issues | /app/System/Http/Renderers/WebPageRenderer.php | UTF-8 | 2,028 | 2.65625 | 3 | [] | no_license | <?php
namespace App\System\Http\Renderers;
use App\System\base\Controller;
use App\System\base\Exception\BadMethodCallException;
use App\System\base\RendererFactory;
use App\System\base\Response;
use App\System\Services\AuthService;
use App\System\View\Blade\Blade;
use Symfony\Component\HttpFoundation\RedirectRespons... | true |
e5fda6f8afa05683abf9823ad57bab5fb0d12310 | PHP | lucashccosta/pkg-dev-support | /src/Contracts/IRequest.php | UTF-8 | 1,229 | 3.140625 | 3 | [] | no_license | <?php
namespace Dev\Support\Contracts;
interface IRequest
{
/**
* Return all the data.
*
* @return array
*/
public function all(): array;
/**
* Remove all the data.
*
* @return self
*/
public function clear(): self;
/**
* Return the value of required ... | true |
33a4422495634ec19fe5182df438135afcb610be | PHP | smekosh/metrics-website | /stats.php | UTF-8 | 2,062 | 2.5625 | 3 | [] | no_license | <?php
$stats = new metricsStats();
$smarty->assign( 'latest_entry', $stats->query_max() );
$smarty->assign( 'table_count', $stats->countTables() );
// for computing max, min
$range = array(
"reports" => array("min" => 0, "max" => 0, "values" => array() ),
"searches" => array("min" => 0, "max" => 0,... | true |
33db20ba7b269be5202dcd4abc6289dab2c6f776 | PHP | choiryaya/website-present | /app/Equipment.php | UTF-8 | 475 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Equipment extends Model
{
protected $guarded = [];
public $timestamps= false;
protected $table = 'data_record';
public function getCover(){
if(substr($this->cover,0,5) == "https"){
}
if($this->cover){
... | true |
4208d26f723873380a5ce6994323878aacf08c82 | PHP | johnny3/cmk | /src/Shakyamouni/SiteBundle/Tests/Functional/MinkTestCaseBase.php | UTF-8 | 5,178 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Shakyamouni\SiteBundle\Tests\Functional;
use Behat\MinkBundle\Test\MinkTestCase;
use Shakyamouni\UserBundle\Entity\User;
/**
* Base class for tests
*
*/
class MinkTestCaseBase extends MinkTestCase
{
/**
* base url.
*
* @var string
*/
protected $base;
/**
* Br... | true |
60def13fc14a57ea33db0f9da19f386cbf362f1f | PHP | Nadim-Mahmud-Dipu/CSE-311-Airline-Reservation-System | /flight_costs.php | UTF-8 | 3,291 | 2.59375 | 3 | [] | no_license | <?php
// $serverName = "localhost";
// $userName = "root";
// $password = "";
// $dbName = "airline-database";
// $conn = mysqli_connect($serverName,$userName,$password,$dbName);
// if (!$conn) {
// die('Connect Error: ' . mysqli_connect_errno());
// }
// echo "Database connected xyz.";
?>
<?php
// session_s... | true |
3da82e98e23086cfeba0f27866f8e57fb4a3f1f1 | PHP | eusouodaniel/api-hackathon | /app/Services/DataTableService.php | UTF-8 | 482 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Services;
use Illuminate\Database\Eloquent\Collection;
class DataTableService {
public function __construct() {
$this->dataTables = app("Yajra\Datatables\Datatables");
}
public function getDataTableByCollection(Collection $collection) {
return $this->dataTables->coll... | true |
bbb27c2b0a38279ab29a38707a2e91b5fd96ad79 | PHP | mahmoudelshall10/clinic | /app/Http/Requests/ProRequests.php | UTF-8 | 1,315 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ProRequests extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return True;
}
/**
* Get the v... | true |
09cb2abff58b7951ff2fc59b5f16bb4acb0d7678 | PHP | mixrnd/DemoTemplate | /tests/DemoTemplateTest.php | UTF-8 | 2,200 | 2.9375 | 3 | [] | no_license | <?php
namespace tests;
use PHPUnit\Framework\TestCase;
use \mixrnd\DemoTemplate\DemoTemplate;
class DemoTemplateTest extends TestCase
{
public function testEmptyTemplate()
{
$this->assertEquals('', $this->parserResult('', []));
}
public function testNoVariablesAndIfs()
{
$this-... | true |
1ccc87fe239462c6cb26da1ba0793c70ced1861d | PHP | adu42/cloudinary_magento | /core/features/bootstrap/ImageProviders/ConfigImageProvider.php | UTF-8 | 1,072 | 2.671875 | 3 | [] | no_license | <?php
namespace ImageProviders;
use CloudinaryExtension\Configuration;
use CloudinaryExtension\ConfigurationInterface;
use CloudinaryExtension\Image;
use CloudinaryExtension\Image\Transformation;
use CloudinaryExtension\ImageProvider;
class ConfigImageProvider implements ImageProvider
{
private $configuration;
... | true |
e2b7bd62395ec99ac4bc9f9b42819fde1bb67f45 | PHP | Denis02/sg-news.dev | /public/views/news.php | UTF-8 | 1,178 | 2.9375 | 3 | [] | no_license | <?php
/* Вывод данных на экран */
foreach($items as $item): ?>
<div class="panel panel-default">
<div class="panel-heading">
<a target="_blank" href="<?= $item['link'] ?>">
<?= $item['id'] ?> || <?= $item['title'] ?>
</a>
</div>
<div class="panel-b... | true |
9e44df4f5ef5dea75fbbed6b92c17eeee76a12aa | PHP | LittleBeeX/Logical-interaction | /library/helper/ValidateCode.php | UTF-8 | 3,078 | 3.046875 | 3 | [] | no_license | <?php
/**
* 验证码类
* @author duan yunpeng
*/
class ValidateCode{
//验证码位数
private $mCheckCodeNum=4;
//验证码
private $mCheckCode='';
//验证码图片
private $mCheckImage='';
//验证码干扰素
private $mDisturbColor='';
//验证码图片宽度
private $mCheckImageWidth='90';
//验证码图片高度
private $mCheckImage... | true |
998e13366790daf88615064844a16193e4a8cc6f | PHP | ramity/world-sim | /backend/src/ObjectBundle/Entity/CraftingRecipe.php | UTF-8 | 4,737 | 2.515625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace ObjectBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* CraftingRecipe
*
* @ORM\Table(name="crafting_recipe")
* @ORM\Entity(repositoryClass="ObjectBundle\Repository\CraftingRecipeRepository")
*/
class CraftingRecipe
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer... | true |
73d4af19293dc74c1ee6e50ed7c10672b1b72cc4 | PHP | Ozhiganov/dolly | /system/include/lib/msexceptionizer.php | UTF-8 | 2,760 | 2.90625 | 3 | [] | no_license | <?php
class MSExceptionizer
{
final public function __construct($mask = E_ALL, $ignore_other = false)
{
if(self::$instance) die('Instance of '. __CLASS__ .' already exists!');
$this->mask = $mask;
$this->ignore_other = $ignore_other;
$this->prevHdl = set_error_handler([$this, 'Handle']);
self::$instance = ... | true |
01039e7ff58aafe2ab80b5b5862a30996b6763b1 | PHP | Jounikononen/Koulu-ja-muita-koodeja | /PHP/Tehtavat_2/T_2.php | UTF-8 | 349 | 2.59375 | 3 | [] | no_license | <?php
$taulu = array("Ville Veikko" => "Koodaajapolku 2",
"Matti Meikäläinen" => "Opiskelijantie 5",
"Taneli Teräs" => "Teräskuja 5");
$taulu ["Ville Veikko"] = "Koodaajapolku 10";
$taulu ["Matti Meikäläinen"] = "Opiskelijantie 5";
$taulu ["Taneli Teräs"] = "Tanelinpolku 5";
$taulu ... | true |
e59ac285482e33857df4b06402e14ee2a0fc3429 | PHP | winder335264/SIGTEUC | /app/Repositories/horarioMUcRepository.php | UTF-8 | 674 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\horarioMUc;
use InfyOm\Generator\Common\BaseRepository;
/**
* Class horarioMUcRepository
* @package App\Repositories
* @version November 3, 2017, 1:41 pm UTC
*
* @method horarioMUc findWithoutFail($id, $columns = ['*'])
* @method horarioMUc find($id, $columns = ... | true |
a259610ec1ed96141a4671af38c645ec38c82775 | PHP | kerbeh/valence-wrapper | /src/Model/OrganizationStructure/ColourScheme.php | UTF-8 | 837 | 2.578125 | 3 | [] | no_license | <?php
namespace ValenceWrapper\Model\ColourScheme;
use ValenceWrapper\Model\BaseValenceModel;
use ValenceWrapper\Model\Basic\UtcDateTime;
use ValenceWrapper\Model\Basic\RichText;
/**
* Fundamental information for an org unit as reported by org unit service actions.
* @see https://docs.valence.desire2learn.com#org-u... | true |
1d774cee6f6f1ae6248c70e31b95aa10dcd60e9c | PHP | jseremba/travelsheets-api | /src/AppBundle/Normalizer/AbstractStepNormalizer.php | UTF-8 | 2,161 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: quentinmachard
* Date: 02/11/2017
* Time: 16:50
*/
namespace AppBundle\Normalizer;
use AppBundle\Entity\AbstractStep;
use Symfony\Component\Serializer\Exception\CircularReferenceException;
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
use Symfony\C... | true |
f9da3e7450b52e726d77438cdde22c3466ec7a05 | PHP | Lightsider/rizza_pizza | /app/Http/Controllers/CartController.php | UTF-8 | 1,578 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\CartItem;
use App\Product;
use App\Services\Cart;
use Illuminate\Http\Request;
class CartController extends Controller
{
/**
* @param Request $request
*/
public function view(Request $request) {
return view('cart');
}
/***************... | true |
e60fb62cb401c2490ceddc79d79c7f82649773d0 | PHP | DamienVauchel/new_mvc_poo_php_blog | /vendor/framework/Pagination/Pagination.php | UTF-8 | 2,356 | 3.015625 | 3 | [] | no_license | <?php
namespace Framework\Pagination;
class Pagination
{
private $actualPage = 0;
private $totalPage;
private $nbPerPage;
public function __construct(array $datas, $nbPerPage = 10)
{
if (isset($_GET['page']) && ($_GET['page'] > 0)) {
$this->actualPage = (int) $_GET['page'];
... | true |
dd3c183b5bc7d624bb9274be9ee5aee7e80a221d | PHP | GenTanaka/fullstack-webdev-master | /060_PHPとWEB/0900_理解度チェック(CookieとSession)/start/index.php | UTF-8 | 826 | 3.28125 | 3 | [] | no_license | <?php
/**
* SessionとCookieの理解度チェック
*
* index.phpに訪問するたびに訪問回数が
* 1ずつ増える処理を実装してみてください。
* Session、Cookieの二つのパターンで実装してみましょう。
*
* 1回目
* 訪問回数は 1 回目です。
*
* 2回目
* 訪問回数は 2 回目です。
*
*/
// Sessionを使った場合
session_start();
if (!isset($_SESSION["VISIT_COUNT1"])) {
$_SESSION['VISIT_COUNT1'] = 0;
}
$_SESSION['VISIT_C... | true |
7098a6aeb6f0be1a79655320c829944c022a1950 | PHP | zenazn/hax | /login.php | UTF-8 | 858 | 2.671875 | 3 | [] | no_license | <?php
require_once('common.php');
$title = "Log in";
if ($_POST['username']) {
// We got something!
$username = preg_replace('/[^a-zA-Z0-9]/', '', $_POST['username']);
$password = $_POST['password'];
$q = mysql_query("SELECT id FROM users WHERE username='$username' AND PASSWORD='$password'");
if ($q and $row... | true |
f33ffedf1e79dc0fa5b8749452ac32bc2b8f7aa2 | PHP | sayaadit/wisata_rekom | /application/models/Posts_model.php | UTF-8 | 8,142 | 2.609375 | 3 | [] | no_license | <?php
class Posts_Model extends CI_Model
{
private $table = 'posts';
private $id = 'post_id';
/**
* Constructor
*/
function __construct()
{
parent::__construct();
}
// Query for new datatables purpose ;
//-------------------------------------------------------------------------------------------... | true |
1cb54e7b883e4346ee1232994cd459e78510dd44 | PHP | EmiliaPavlova/SoftUni | /PHPBasics/Homeworks/5.FlowControl/6.StringModifier.php | UTF-8 | 2,023 | 3.3125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Modify String</title>
</head>
<body>
<form action="6.StringModifier.php" method="post">
<input type="input" id="input" name="input" required="required">
<input type="radio" name="option" value="palindrome" id="palindrome" required="required"... | true |
926a872f0529111754cf4302647299c3b1837650 | PHP | atk4/validate | /tests/BasicTest.php | UTF-8 | 6,963 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Atk4\Validate\Tests;
use Atk4\Data\Model;
use Atk4\Data\Schema\TestCase;
use Atk4\Validate\Validator;
class BasicTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->setDb([
'validator_test' => [
... | true |
cdd1111c83bf25ee70d1d48b30dce19e25c5f4d4 | PHP | Thomasfrancese/machineACafe | /app/Http/Controllers/IngredientController.php | UTF-8 | 1,666 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Ingredient;
class IngredientController extends Controller
{
function listIngredients()
{
$showIngredients = Ingredient::all();
return view('ingredients', ['ingredients' => $showIngredients]);
}
function listIng... | true |
fbfb86b5939a86df2a40b303db41e55cb511bdfd | PHP | Andrzej100/cms | /src/NowyBundle/Entity/Nrtelefonu.php | UTF-8 | 1,583 | 2.765625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace NowyBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* nrtelefonu
*
* @ORM\Table()
* @ORM\Entity
*/
class Nrtelefonu
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
... | true |
6e62117db107dab04cbef51722453892d2b39939 | PHP | binomedev/showcase-services | /database/factories/ServiceFactory.php | UTF-8 | 628 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Binomedev\ShowcaseServices\Database\Factories;
use Binomedev\ShowcaseServices\Models\Service;
use Illuminate\Database\Eloquent\Factories\Factory;
class ServiceFactory extends Factory
{
protected $model = Service::class;
public function definition()
{
return [
'name' ... | true |
ad30bd27ce52c56c6003f7b56f44a946fa6a5829 | PHP | Perian19032584/mini_framework | /vendor/core/Router.php | UTF-8 | 4,154 | 3.15625 | 3 | [] | no_license | <?php
namespace vendor\core;
use mysql_xdevapi\Exception;
class Router{
protected static $routes = [];
protected static $route = [];
public static function add($regexp, $route = []){
self::$routes[$regexp] = $route;
}
public static function getRoutes(){
return self::$routes;
... | true |
017a71188a1c4ea17dd5f50f1cd5387667e46999 | PHP | TeleConcept-nl/sms-client | /src/Response/Message/Normal/Create/Response.php | UTF-8 | 1,397 | 2.78125 | 3 | [] | no_license | <?php
namespace Teleconcept\Sms\Client\Response\Message\Normal\Create;
use Teleconcept\Sms\Client\Response\Message\Normal\MessageInterface as Message;
use function json_decode;
/**
* Class SendMessageResponse
* @package Teleconcept\Sms\Client\Response\Message\Normal\Send
*/
class Response implements ResponseInterf... | true |
0c6c558434bdd2e436664318ccd7d5a85501fb95 | PHP | artwojcik/Dungeon-Crafter | /ServerSide/getuserinfo.php | UTF-8 | 1,505 | 2.71875 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
header("Content-Type: application/json; charset=UTF-8");
try {
$db = new PDO('mysql:host=localhost;dbname=DungeonCrafter;charset=utf8',
'avizny2',
'CS440@18');
} catch (Exception $e) {
die('Error : '.$e->getMessage());
}
$singupRawData = json_decode(file_get_... | true |
4cd589fec124fbed8a6d813569046f51d6c5ffcb | PHP | harinath12/oxygen | /admin/api/blogs.php | UTF-8 | 1,457 | 2.53125 | 3 | [] | no_license | <?php
function hm_blogs(){
$res = get_results("select * from blogs");
return array('status' => 'Success', 'data' => $res);
}
function hm_get_blog(){
$res = get_row("select * from blogs where id = ".$_GET['id']);
$res['content'] = stripslashes($res['content']);
$res['short_content'] = stripslashes($res['short_cont... | true |
02be94949916bfb6f62d1736a8236324d76a703d | PHP | gundermanc/eecs341-cms | /inc/database.php | UTF-8 | 32,004 | 3.21875 | 3 | [] | no_license | <?php
require_once 'config.php';
require_once 'exception.php';
/**
* Database exception type.
*/
class DatabaseException extends AppException {
public function __construct($message, $sqlCode = 0,
Exception $previous = null) {
$this->sqlCode = $sqlCode;
parent::__construct($m... | true |
486c15b4bd69434c3b1830fdef63d7c34fcbc400 | PHP | c18gour/petitphotobox | /server/app/src/core/arr/Arr.php | UTF-8 | 2,278 | 3.375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace petitphotobox\core\arr;
class Arr
{
/**
* Gets the union of two list of items.
*
* @param mixed[] $items1 List of items
* @param mixed[] $items2 List of items
* @param callback $compare Compare function (not required)
*
* @return mixed[]
*/
public static function union($... | true |
61f63b8a840a0f7c632ff32cd78fe90162a60eec | PHP | MKelm/papaya-cms | /papaya-lib/system/Papaya/Ui/Toolbars.php | UTF-8 | 3,339 | 2.78125 | 3 | [] | no_license | <?php
/**
* A listview can have up to four toolbars, at the different corners. This class provides
* access to them.
*
* @copyright 2011 by papaya Software GmbH - All rights reserved.
* @link http://www.papaya-cms.com/
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License, version ... | true |
203d37f20a3943919ec50d765c1bd3f4088eea74 | PHP | fastbolt/entity-importer | /src/ArchivingStrategy/ProcessedFolderArchivingStrategy.php | UTF-8 | 2,118 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Copyright © Fastbolt Schraubengroßhandels GmbH.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fastbolt\EntityImporter\ArchivingStrategy;
use Fastbolt\EntityImporter\Types\ImportSourceDefinition\ImportSourceDef... | true |
4ec444108f6d6ef5d79378ea05f9cc6c587efd26 | PHP | tanchengjin/HeadFirst | /Factory/simple/PizzaStore.php | UTF-8 | 254 | 2.859375 | 3 | [] | no_license | <?php
//披萨商店
abstract class PizzaStore{
function orderPizza($type){
$pizza= $this->createPizza($type);
$pizza->prepare();
$pizza->back();
$pizza->cut();
$pizza->box();
return $pizza;
}
abstract function createPizza($type);
}
?> | true |
23ce7fc66e1790ce7bb7ab67d02689faf86a370f | PHP | scrxped/morfix | /app/Console/Commands/UpdateLastPaidFromCsv2.php | UTF-8 | 2,931 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\User;
use Carbon\Carbon;
use App\PaypalCharges;
use App\GetReferralChargesOfUser;
use App\StripeCharge;
class UpdateLastPaidFromCsv2 extends Command {
/**
* The name and signature of the console command.
*
* @var string... | true |
372faaa0b2c9a35a30d1598e78c0f2944bc1ab23 | PHP | paulobarcelos/ovonovo | /aspen/themes/aspen/functions.php | UTF-8 | 3,440 | 2.59375 | 3 | [] | no_license | <?php
// Add "Featured image" feature to posts ------------------------------------------
add_theme_support( 'post-thumbnails', array( 'post' ) );
add_theme_support( 'post-thumbnails', array( 'page' ) );
// Remove junk from head -----------------------------------------------------------
remove_action('wp_head', 'r... | true |
3cbe33fc777d614db499d26b1a9250d3e946d332 | PHP | ilyachase/Facebook-Leads-Sender | /components/TrivialHelper.php | UTF-8 | 1,032 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\components;
use Yii;
use yii\helpers\Html;
class TrivialHelper
{
/**
* @return \Closure
*/
public static function DuplicateButton()
{
return function ( $url ) {
return Html::a( '<span" class="glyphicon glyphicon-duplicate"></span>', $url, [ 'title' => 'Du... | true |
6a75774e76ba39ad2d0361672e9e8e49285016f8 | PHP | mnemex/buttonmen | /src/engine/BMAttackSkill.php | UTF-8 | 5,140 | 2.953125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class BMAttackSkill extends BMAttack {
public $type = "Skill";
// Especially once you take stinger and constant into account,
// searching the full attack space is slow and complex
//
// Building a hit table once trades some increased setup cost for
// a much reduced search cost
//
... | true |
68111b7d3ec6844928c5f7cfd4ed013b08228db6 | PHP | lucasangi/simple-payment | /app/src/Core/Application/Async/SendPaymentNotification.php | UTF-8 | 495 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace SimplePayment\Core\Application\Async;
use Symfony\Component\Validator\Constraints as Assert;
/** @psalm-immutable */
class SendPaymentNotification
{
/**
* @Assert\Type("string")
* @Assert\NotBlank
*/
public string $userId;
/** @Assert\Type("float"... | true |
3ff5fcff975326f1bc192356c7cf0d7d3870dd69 | PHP | Anuragsingh9/NewProject | /app/Services/TodoService.php | UTF-8 | 4,094 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Exceptions\CustomValidationException;
use App\Task;
use App\TaskTiming;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
class TodoService
{
/**
* @return static|null
*/
public static function getInstance() {
static $instance = NULL;
i... | true |
cde40d07b2f3699483b3829b54dd5a62088b8c52 | PHP | kylegthatsme/tanapa-safari-web | /web/safari.php | UTF-8 | 2,875 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
require('config/config.php');
if ($_SERVER["REQUEST_METHOD"] == "GET") {
// If no parameters were given, return list of safaris.
if (empty($_GET)) {
$results = array("results" => array());
$stmt = $db_conn->prepare("SELECT SAFARI.id, SAFARI.name, SAFARI.description, tile_media_id, TILE... | true |
0704201c3e9ecc0500422920a932f023d285f5f5 | PHP | jdblanco10/Drogueria_Super | /Controlador/ventasController.php | UTF-8 | 4,450 | 2.671875 | 3 | [] | no_license | <?php
require_once (__DIR__.'/../Modelo/ventas.php');
if(!empty($_GET['action'])){
ventasController::main($_GET['action']);
}else{
//echo "No se encontro ninguna accion...";
}
class ventasController{
static function main($action){
if ($action == "crear"){
ventasController::crear();
... | true |
fe8beeb70581e27cace3b964d0d2fe11456eb2be | PHP | gitter-badger/dephpend | /tests/unit/DependencyHelper.php | UTF-8 | 2,833 | 3.015625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Mihaeu\PhpDependencies;
use Mihaeu\PhpDependencies\Dependencies\Clazz;
use Mihaeu\PhpDependencies\Dependencies\Dependency;
use Mihaeu\PhpDependencies\Dependencies\DependencyFactory;
use Mihaeu\PhpDependencies\Dependencies\DependencyPair;
use Mihaeu\PhpDependencies\Dependencie... | true |
f6592ccd5a9bbd1eaf9655c07b474b6315bb7ac4 | PHP | Sjoekoe/vogelzang-2016 | /app/Announcements/AnnouncementRouteBinding.php | UTF-8 | 614 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Announcements;
use App\Http\AbstractRouteBinding;
use App\Http\Routebinding;
class AnnouncementRouteBinding extends AbstractRouteBinding implements Routebinding
{
/**
* @var \App\Announcements\AnnouncementRepository
*/
private $announcements;
public function __construct(Ann... | true |
ee6a851f3cc234600cb407cf70c5fe5775ba9c6f | PHP | pauloantonelli/curso_php_cursoemvideo | /php7.php | UTF-8 | 335 | 3.75 | 4 | [] | no_license | <?php
$a = 5;
$b = 2;
$c = intdiv($a,$b);
var_dump($c);
var_dump($a <=> $b);
var_dump($b <=> $a);
var_dump($a <=> $a);
function divi(int $n):int{
return $n/2;
}
echo "A divisao foi ". divi(5);
$n = $_GET['numero'] ?? "nenhum";
echo "o valor digita... | true |
04c391c6641df914a1a162e2b4626d938beb09c0 | PHP | raghadMSF/SWE322 | /Assignments/Project/www/login_action.php | UTF-8 | 1,277 | 2.515625 | 3 | [] | no_license | <?php
include('./elements/header.php');
include($_SERVER['DOCUMENT_ROOT'].'/gym-project/src/php/sanitizeinput.php');
echo '
<div class="w-100 py-5">
<h1 class="text-center">login</h1>
';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$username = test_input($_POST['username']);
$password = test_input($_POST['passw... | true |