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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d4f007ab3d546e689bfaf63fa2942a98b7fd2e88 | PHP | salubcosta/site_institucional | /models/sobre.php | UTF-8 | 244 | 2.59375 | 3 | [] | no_license | <?php
class Sobre extends model{
public function getInformacoes(){
$dados = array();
$sql = 'select * from instituicao';
$sql = $this->db->query($sql);
if($sql->rowCount() > 0){
$dados = $sql->fetch();
}
return $dados;
}
} | true |
906face0428867458d2219b3c7e84c37d3fb7f60 | PHP | PhysikOnline-FFM/elearning-local | /Customizing/global/plugins/Services/Repository/RepositoryObject/MobileQuiz/frontend/includes/views/_question.php | UTF-8 | 1,620 | 2.921875 | 3 | [] | no_license | <li class="question">
<?php
// If you want to add new question types, you must modify this file here.
echo polishText($question->text);
$type_of_question = array( "type_of_question" => $question->type);
// This variable is neccesary for the generation of choices.
switch($question->type) {
... | true |
1f39d6e65597107f490e730f4ef195940f08bb2a | PHP | ferinabay/gamifikasiakhir | /application/models/Cetak_m.php | UTF-8 | 627 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Cetak_m extends CI_Model {
public function view()
{
$this->db->select("*");
$query=$this->db->get('kompen');
return $query->result();
}
public function view_row($id)
{
$this->db->select('a.*, b.*');
$this->db->from('m... | true |
cbd99ba97f768507253a8fea3e9084fcff3a3ef4 | PHP | Qronicle/advent-of-code-2019 | /day16/part1.php | UTF-8 | 198 | 2.515625 | 3 | [] | no_license | <?php
require('../common/common.php');
require('FFT.php');
$input = file_get_contents('input.txt');
$fft = new FFT();
$result = $fft->phase($input, 100);
echo substr($result, 0, 8);
timer_end();
| true |
b0be0d8764d4db65d6dcd42bdab59eac9b96df6f | PHP | ekyna/Commerce | /Bridge/Mailchimp/Api.php | UTF-8 | 2,483 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ekyna\Component\Commerce\Bridge\Mailchimp;
use DrewM\MailChimp\MailChimp;
use Ekyna\Component\Commerce\Exception\NewsletterException;
use Ekyna\Component\Commerce\Newsletter\Model\AudienceInterface;
use Psr\Log\LoggerInterface;
/**
* Class Api
* @package Ekyna\Component\Commerce\Bridge\Mailchimp
*... | true |
12bb01a8955fea9834a9700949634f9ea2e32eb5 | PHP | SergeyMykytchyn/testproject | /views/flats/index.php | UTF-8 | 1,307 | 2.515625 | 3 | [] | no_license | <?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\models\Flats */
/* @var $form yii\widgets\ActiveForm */
/* @var $cityList */
/* @var $flatTypesList */
/* @var $filterForm*/
/* @var $data */
function typeColumn($s)
{
return "<td>".$s."</td>";
}
$this->titl... | true |
6d75001ce919bda748a314cf48274ade00319ea0 | PHP | manafkh/university | /app/Models/Enrollment.php | UTF-8 | 1,224 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Enrollment
* @package App\Models
* @version March 16, 2019, 3:53 pm UTC
*
* @property integer academicYear
* @property integer ExamNumber
* @property integer student_id
*/
class Enrollment extends Mod... | true |
882332453aba5f8ecce2819015475ec284837061 | PHP | greevex/mzz-framework-blank-application | /mzz/system/forms/validators/formValidator.php | UTF-8 | 4,019 | 2.734375 | 3 | [] | no_license | <?php
fileLoader::load('forms/validators/validator');
class formValidator extends validator
{
/**
* Имя поля по которому проверяется отправлена форма или нет
*
* @var string
*/
protected $submit = 'submit';
/**
* Проверять csrf или нет
*
* @var boolean
*/
prote... | true |
271a30eba99fd09b454313ef075c745e22da1a38 | PHP | 26daniraditya/Web-Programming-Exercises | /mathgame/index.php | UTF-8 | 1,896 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>UTS Pemrograman Web</title>
<style>
input[type=text], input[type=email] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
}
input[type=submit], .lanjut {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
... | true |
16030b3af2299311f032f4ca44e766fb3541032c | PHP | boyfromhell/website | /Modules/Forum/Filters/AnsweredFilter.php | UTF-8 | 862 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Forum\Filters;
use App\Filters\AbstractFilter;
use Illuminate\Database\Eloquent\Builder;
class AnsweredFilter extends AbstractFilter
{
public function mappings()
{
return [
'yes' => 'yes',
'no' => 'no',
];
}
/**
* Filter the query ... | true |
f6c055023a6c4244630aa211e0bce661353dd2e9 | PHP | anonymouscliq/foody | /controllers/CustomerController.php | UTF-8 | 3,080 | 2.71875 | 3 | [] | no_license | <?php
/*
Project : Foodshala
Author : Shantanu Singh Parmar
*/
/*
This is customer controller to handle all the customer related queries.
*/
require_once(__DIR__.'/../database/dbs_controls.php');
class CustomerController {
// table name in mysql database
private $... | true |
777ac478fab4c7afe44565d1a376a27523bb5645 | PHP | imolater/php-objects-patterns | /Database/Domain/Space.php | UTF-8 | 1,248 | 2.984375 | 3 | [] | no_license | <?php
/**
* Шаблоны баз данных - Domain Model
*/
namespace Database\Domain;
use Database\Mapper;
class Space extends DomainObject {
private $venue = null;
private $events;
public function __construct( $name, $venueId = null, $id = null, $isNew = false ) {
parent::__construct( $name, $id, $isNe... | true |
f81d2db81ff6a1c031fc4a8c5435fbd7992a188a | PHP | codeaudit/core-2 | /src/ContextEngine/tests/ContextEngineServiceTest.php | UTF-8 | 2,337 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace OpenDialogAi\ContextEngine\Tests;
use OpenDialogAi\ContextEngine\ContextManager\ContextService;
use OpenDialogAi\ContextEngine\Exceptions\ContextDoesNotExistException;
use OpenDialogAi\Core\Attribute\StringAttribute;
use OpenDialogAi\Core\Tests\TestCase;
class ContextEngineServiceTest extends TestCas... | true |
6a84dff5ac0db3e2543522d65242bad1f03c0a23 | PHP | swoopfx/cm | /module/Settings/src/Settings/Entity/Currency.php | UTF-8 | 2,439 | 2.671875 | 3 | [] | permissive | <?php
namespace Settings\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Currency
*
* @ORM\Table(name="currency")
* @ORM\Entity
*/
class Currency
{
/**
*
* @var integer @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strat... | true |
534af5475ba2ec5fde84487adc9218536d66a4eb | PHP | tienthai0511/olymbook | /book-store/framework/extensions/widget-cart.php | UTF-8 | 11,815 | 2.515625 | 3 | [] | no_license | <?php
/*
Plugin Name: WooCommerce Cart Widget
Plugin URI:
Description: A dropdown cart widget for WooCommerce
Version: 1.0
Author: Nasir
Author URI:
License: GPL
*/
// Register the Widget
add_action('widgets_init', 'WooCommerce_Widget_CartPlus_LoadWidget');
function WooCommerce_Widget_C... | true |
f83c32bec9804b128145ac91df2b946453f25045 | PHP | theosipovav/web_phpLiberico | /app/widget/ViewDocWidget.php | KOI8-R | 5,812 | 2.96875 | 3 | [] | no_license | <?php
/**
* Class ViewDocWidget
*
* @param array - "extends Widget" "vars"
* <vars>:
* -- (int|string) id - , , "<object></object>"
* -- (array) value - ,
*/
class ViewDocWidget extends Widget
{
public function run()
{
// extract($this->vars);
$isHide = '1';
... | true |
4d11928148e44149d39cce6a1c599eacd4e367f1 | PHP | darkfriend/graphql-server-demo | /schema/UserType.php | UTF-8 | 4,254 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\schema;
use GraphQL\Type\Definition\ObjectType;
use GraphQL\Type\Definition\Type;
use app\models\User;
class UserType extends ObjectType
{
public function __construct()
{
$config = [
'fields' => function() {
return [
'firstname' => [... | true |
3f485cfe3abd53b84e2e5d9d07bc4436c53d7a6a | PHP | Suru996/SRM-OST- | /cookie.php | UTF-8 | 624 | 2.921875 | 3 | [] | no_license | <html>
<head>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<h2> Last visited time on the web page</h2>
<br>
<?php
$inTwoMonths = 60 * 60 * 24 * 60 + time();
setcookie('lastVisit', date("G:i - m/d/y"), $inTwoMonths);
i... | true |
b820b021797b4d46a01df45e2888f0bc4bd0060a | PHP | raza4444/share-project-ei-next-backend | /app/Entities/Menus/MenuItem.php | UTF-8 | 767 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: kingster
* Date: 16.12.2018
* Time: 18:02
*/
namespace App\Entities\Menus;
use App\Entities\Core\AbstractModel;
use App\Entities\Core\Permissions;
/**
* Class MenuItem
* @package App\Entities\Menus
*
* @property int menuId
* @property string titel
* @property int ... | true |
106082e14ea75e34515ce9c30f75244ab730bc72 | PHP | koreanbbque/sql | /src/Where.php | UTF-8 | 3,476 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
namespace Solution10\SQL;
/**
* Where
*
* Adds in where(), orWhere() and groupings
* into the SQL builder.
*
* $query->where(function(ConditionBuilder $conditions) {
* $conditions
* ->andWith('user', '=', 'Alex')
* ->andWith('country', '=', 'GB');
* })
* ... | true |
06bc86e7ccc232b828ce9d115e6c7459580ef615 | PHP | lfrg99/cursophp7-dao | /class/Sql.php | UTF-8 | 3,443 | 3.21875 | 3 | [] | no_license | <?php
// =========== CONECTANDO O PHP7 COM MYSQL USANDO PDO ( PHP DATA OBJECT )===============================
// DAO : DATA ACESS OBJECT
// Começando com a classe SQL
// criar um repositorio em C:\wamp\www\CursoPHP\DAO que vai criar a pasta oculta do .git (comando git bash)
// criar um repositor... | true |
3176395b8cae77251077052cf6a7fad5f1bfdfac | PHP | groupbwt/laravel-request-logger | /src/Middleware/RequestLogger.php | UTF-8 | 1,160 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace BwtTeam\LaravelRequestLogger\Middleware;
use BwtTeam\LaravelRequestLogger\RepositoryInterface as RequestLoggingRepository;
class RequestLogger
{
/**
* @var RequestLoggingRepository
*/
protected $repository;
/**
* Log constructor.
*
* @param RequestLoggingReposito... | true |
3bd6bb8c72848114dbe24fcf25f2ffbf5fd1d116 | PHP | havramar/next-php-sitemap-generator | /tests/Helper.php | UTF-8 | 503 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace tests;
use org\bovigo\vfs\vfsStream;
use org\bovigo\vfs\vfsStreamDirectory;
class Helper
{
/**
* @var vfsStreamDirectory
*/
static private $root;
/**
* Return path to create a temporary directory.
* Every new call deletes content of previous one.
*
* @return... | true |
d725c4312dacaa7bc14fce1959cbce57156506ac | PHP | maggie-harrington/Library-php | /tests/AuthorTest.php | UTF-8 | 4,529 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
require_once "src/Book.php";
require_once "src/Author.php";
$server = 'mysql:host=localhost:8889;dbname=library_test';
$username = 'root';
$password = 'root';
$DB = new PDO($server, $username, $password);... | true |
e724a35370d17815f458b095690e3b50197228cf | PHP | 389905/EDMS | /app/Http/Controllers/DivSecController.php | UTF-8 | 2,894 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\DivSec;
use App\PollingDivision;
use Illuminate\Http\Request;
use Session;
class DivSecController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
retu... | true |
a8392474458ef36c543ce434c915bf547c2c980e | PHP | UncleWillis/BugBox | /framework/Targets/AjaXplorer_2_5_1/application/plugins/access.ssh/checkInstall.php | UTF-8 | 2,967 | 2.765625 | 3 | [] | no_license | <?php
// Testing the SSH installation
header("Content-Type: text/html; charset=UTF-8");
echo "<html><head>
<!-- Should include a stylesheet here -->
</head><body>";
// First test, check that the required files are all present
echo "<h1>Testing installation</h1>";
if (!file_exists("class.sshDriver.p... | true |
98c1d682bde04b2817539ffa6566e7fbf67cefdd | PHP | takagotch/phplib | /phpmook/fpdf/canvas.php | UTF-8 | 397 | 2.6875 | 3 | [] | no_license | <?php
require_once 'libs/japanese.php';
function sjis($str) {
return mb_convert_encoding($str, 'SJIS', 'auto');
}
$pdf = new PDF_Japanese('P', 'mm', 'A4');
$pdf->AddSJISFont();
$pdf->addPage();
$pdf->setFont('SJIS', 'B', 16);
$pdf->setXY(100, 80);
$pdf->setDrawColor(255, 0, 0);
$pdf->setFillColor(0, 255, 255);
$pd... | true |
4e2be7327039a398372b0a20d3e63c40f28cb824 | PHP | octobroid/oc-boilerplate | /modules/cms/traits/ThemeAssetMaker.php | UTF-8 | 3,035 | 2.78125 | 3 | [] | no_license | <?php namespace Cms\Traits;
use Url;
use File;
use Config;
use System\Classes\CombineAssets;
/**
* ThemeAssetMaker adds theme-based asset methods to a class
*
* @package october\cms
* @author Alexey Bobkov, Samuel Georges
*/
trait ThemeAssetMaker
{
use \System\Traits\AssetMaker;
/**
* combineAssets... | true |
ab1d17ee5a55602ff72aa51ddbaad6736833a2d7 | PHP | ayoubabozer/bloomon | /Flower.php | UTF-8 | 790 | 3.515625 | 4 | [] | no_license | <?php
/**
* Class Flower
*/
class Flower
{
const FLOWER_SPEC_REGEX = "/([a-z])(S|L)/";
private $species;
private $size;
public function __construct($spec)
{
preg_match(self::FLOWER_SPEC_REGEX, $spec, $matches);
$spec = trim($spec);
if(($matches[0]??'') != $spec)
... | true |
1640ad65e39421259d6dabddf32ee249824f78df | PHP | utiamaguilherme/AMS | /AMS - FORUM/leticket/modules/users/view_listgroup.php | UTF-8 | 1,365 | 2.65625 | 3 | [] | no_license | <?php
no_direct_access();
?>
<h1>
Listagem
</h1>
<a class="button-green" href="<?php egetUrl("users","addgroup"); ?>">Novo Grupo</a>
<a class="button-green" href="<?php egetUrl("users","addgroup"); ?>">Novo Grupo</a>
<?php if ($deleted != null) { ?>
<?php
$cl = ($deleted == true) ? "box_success" : "box_e... | true |
7c59fc3fe7e99e21ab0a591c4ae62244123a333a | PHP | getmim/site-user-register | /modules/site-user-register/library/Meta.php | UTF-8 | 5,280 | 2.578125 | 3 | [] | no_license | <?php
/**
* Meta
* @package site-user-register
* @version 0.0.1
*/
namespace SiteUserRegister\Library;
class Meta
{
static function registerSuccess($user){
$result = [
'head' => [],
'foot' => []
];
$home_url = \Mim::$app->router->to('siteHome');
$page... | true |
cc1f846ea68b400ba53cbed8621f3827b4099aa4 | PHP | LuisCande/IISSI | /accion_alta_usuario.php | UTF-8 | 4,731 | 2.8125 | 3 | [] | no_license | <?php
session_start();
// Importar librerías necesarias para gestionar direcciones y géneros literarios
require_once("gestionBD.php");
require_once("paginacion_consulta.php");
// Comprobar que hemos llegado a esta página porque se ha rellenado el formulario
if (isset($_SESSION["formulario"])) {
// Recogemos lo... | true |
28d9de8bc14db45ae43c107d0940093aab8ba90b | PHP | WaailSaleh/Store | /test.php | UTF-8 | 1,151 | 2.609375 | 3 | [] | no_license | <table class="table-bordered table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Life</th>
<th>Lived</th>
<th>Genre</th>
<th>Fame</th>
<th>ArtistSource</t... | true |
52f7dd9f02a593b7d38beb7770c145a922f170dd | PHP | mrhat24/site-for-pm | /common/components/DateHelper.php | UTF-8 | 1,053 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\components;
use Yii;
use DateTime;
use DateTimeZone;
class DateHelper
{
public static function getDateTimeByUserTimezone($d)
{
$date = new DateTime();
//$date->setTimezone(new DateTimeZone('Europe/Moscow'));
$date->setTimestamp($d);
if(!Yii::$... | true |
8304875b09bed42afe49ea3275879793624a55d3 | PHP | tivewsalaeharad/study | /src/Controllers/Auth/PasswordController.php | UTF-8 | 1,160 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controllers\Auth;
use App\Controllers\Controller;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Respect\Validation\Validator as Respect;
class PasswordController extends Controller
{
public function getChangePassword(Request $r... | true |
78eafc15d7bf64fc4f4a667eeaffbc6ea90b78b8 | PHP | CThaw90/VigilanceApi | /controllers/LogoutController.php | UTF-8 | 1,107 | 2.875 | 3 | [] | no_license | <?php
class LogoutController {
private $auth_error = '{"status": 403, "error": "Permission Denied. You do not have access to this resource"}';
private $authentication;
private $logout;
private $debug;
public function __construct() {
$this->debug = new Debugger("LogoutController.php");
$this->debug->log("[I... | true |
173e6d4895c3a4e16cc71a4e2a4dc42e5b143e44 | PHP | yunhai/pg | /app/Http/Service/Common/Reader/Office.php | UTF-8 | 2,339 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Service\Common\Reader;
class Office
{
public function read($target)
{
$content = '';
if (isset($target) && !file_exists($target)) {
return '';
}
$extension = substr($target, strrpos($target, '.') + 1);
switch ($extension) {
... | true |
b2e0d9d0a7705613319111ed1479a924b78f3382 | PHP | JudeNiroshan/IntelliKid | /app/Classes/uploaders/UploadFactory.php | UTF-8 | 756 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Classes\uploaders;
use App\Classes\common\AbstractFactory;
/**
* @author : Jude Niroshan
* @desc : This is the base Factory that produces the upload objects
* @created : 22/02/2016
*/
class UploadFactory extends AbstractFactory {
//@Override
function getUploader($upload_type){
if($upload_... | true |
7fde2340587cbee04c9c28b6d00d4b92baa92615 | PHP | kungfukoala/v1.jacksonscorner.com | /_add-ons/raven/pi.raven.php | UTF-8 | 3,462 | 2.546875 | 3 | [] | no_license | <?php
class Plugin_raven extends Plugin {
public $meta = array(
'name' => 'Raven',
'version' => '1.0',
'author' => 'Statamic',
'author_url' => 'http://statamic.com'
);
/**
* Raven form tag pair
*
* {{ raven:form }} {{ /raven:form }}
*
* @return html
**/
public f... | true |
86f46deba09d403d491116e046ce8e3e173c656d | PHP | hiroshikana/ClientTrack | /getInfo.php | UTF-8 | 1,121 | 2.625 | 3 | [] | no_license | <?php
ini_set("display_errors", "On");
error_reporting(E_ALL | E_STRICT);
// 获取IP1
$ip = $_POST['realIp'];
$lng = $_POST['lng'];
$lat = $_POST['lat'];
$locatstaus = $_POST['locatStatus'];
$locatdirt = $_POST['locatdirt'];
// 获取IP2
$ip_backup = getIp();
// 连接字符串
$time= date('Y-m-d H:i:s',time());
$text = $ip."\t|".$i... | true |
5916d79e38eb1310f3008f419e03ef2f0824e689 | PHP | pacificnm/pnm | /module/WorkorderTime/src/WorkorderTime/View/Helper/GetWorkorderTimes.php | UTF-8 | 1,238 | 2.59375 | 3 | [] | no_license | <?php
namespace WorkorderTime\View\Helper;
use Zend\View\Helper\AbstractHelper;
use Workorder\Entity\WorkorderEntity;
use WorkorderTime\Service\TimeServiceInterface;
class GetWorkorderTimes extends AbstractHelper
{
/**
*
* @var TimeServiceInterface
*/
protected $timeService;
/**
*
... | true |
5cea154488127a6b9cdd2d50c99e8a3ac7a03372 | PHP | vrimeikis/php_lessons2_2 | /06-27/rwfile.php | UTF-8 | 1,252 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types = 1);
/**
* file_put_contents($filename, $data);
* file_get_contents($filename);
*/
$menu = [
[
'title' => 'Home',
'link' => '',
],
[
'title' => 'Products',
'link' => 'products',
'submenu' => [
[
'title' =>... | true |
eb194836e1a73b763df17d7043989100856b769a | PHP | botilka/botilka-demo | /src/BankAccount/Domain/BankAccountApplier.php | UTF-8 | 1,137 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\BankAccount\Domain;
use Botilka\Domain\EventSourcedAggregateRootApplier;
trait BankAccountApplier
{
use EventSourcedAggregateRootApplier;
protected $eventMap = [
BankAccountCreated::class => 'bankAccountCreated',
DepositPerformed::class => 'depos... | true |
8f4ea2a678ad2204a8f1eabf9323ea6c9f383461 | PHP | bronek89/php2js | /lib/php2js/Node/Expr/ArrayItemNode.php | UTF-8 | 407 | 2.703125 | 3 | [] | no_license | <?php
namespace php2js\Node\Expr;
use php2js\CompilerResult;
use php2js\NodeAbstract;
class ArrayItemNode extends NodeAbstract {
public function compileNode(\PHPParser_Node_Expr_ArrayItem $phpnode) {
$result = new CompilerResult();
$result->put($this->getCompiler()->getScalarFormater()->format($phpnode->key),... | true |
e3261412db3f20d9a79b21c14c976bcf00b9f12e | PHP | gpirujo/gomez | /Gomez/Autoload/BaseResolver.php | UTF-8 | 845 | 2.828125 | 3 | [] | no_license | <?php
abstract class Gomez_Autoload_BaseResolver implements Gomez_Autoload_Resolver {
protected $insensitive;
protected $basepath;
public function __construct($insensitive = false, $basepath = false) {
$this->insensitive = (bool) $insensitive;
if (!$basepath) {
$basepath = $_S... | true |
ee264ff9355098b1fe61ed91b4a04b6b93d45247 | PHP | milvergithub/DataGeneratorER | /model/createDirModel.php | UTF-8 | 536 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: milver
* Date: 18/11/14
* Time: 11:10
*/
class createDirModel {
public function __construct(){
}
public function createDir($ruta,$permiso){
mkdir($ruta, $permiso);
chmod($ruta, $permiso);
}
public function crearFileJSON($ruta, $permiso)... | true |
d84f354cf7a4654600a67e303861198b3cc01251 | PHP | combyna/combyna | /php/src/Combyna/Component/Expression/StaticDayExpression.php | UTF-8 | 1,478 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Combyna
* Copyright (c) the Combyna project and contributors
* https://github.com/combyna/combyna
*
* Released under the MIT license
* https://github.com/combyna/combyna/raw/master/MIT-LICENSE.txt
*/
namespace Combyna\Component\Expression;
use DateTime;
/**
* Class StaticDayExpression
*
* Repr... | true |
b2202e0aab2e11abab20d6582de1ed298e47eac7 | PHP | steveola/FIX_letsmakeparty3.ga | /fix_site.php | UTF-8 | 2,230 | 2.578125 | 3 | [] | no_license | <?php
$directory = "./";
$v = scandir("$directory", 0);
$big_array = $v;
unset($big_array[0]);
unset($big_array[1]);
$listed_array = array();
$find_count = 0;
function list_elemet($arr, $listed_array, $dir){
global $listed_array;
foreach($arr as $key => $value){
if(is_dir($dir . "/" .$... | true |
9a785a4a0ade2a3f9d2a94595d1a75c95d3bd4c1 | PHP | daheige/mellivora-framework | /app/Commands/ExceptionHandler.php | UTF-8 | 270 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Commands;
/**
* 命令行脚本异常处理
*/
class ExceptionHandler
{
/**
* 可在此将异常信息写入到日志文件
*
* @param \Exception $e
* @return void
*/
public function __invoke(\Exception $e) {}
}
| true |
d0a34775ae1c44e4227d2d0bf24310c9edfbe5f5 | PHP | josecanhelp/alfred-ram-workflow | /search.php | UTF-8 | 774 | 2.515625 | 3 | [] | no_license | <?php
require_once __DIR__ . '/vendor/autoload.php';
use MeiliSearch\Client;
use Ramsearch\Item;
$searchQuery = $argv[1];
$token = getenv('token');
if (! $token) {
echo json_encode(['items' => [new Item('No Master Key set', 'Use the ramkey to set the master key', null)]]);
return;
}
$client = new Client('http:... | true |
9fedd764829d02a9ba4ccc67a5c67cc323a6be89 | PHP | mix6s/ice | /src/Domain/DTO/Request/SaveGameEventsRequest.php | UTF-8 | 1,173 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Simple
* Date: 22.09.2017
* Time: 13:21
*/
namespace Domain\DTO\Request;
use Domain\DTO\GoalEventData;
use Domain\DTO\GoalkeeperData;
use Domain\DTO\PenaltyEventData;
/**
* Class SaveGameEventsRequest
* @package Domain\DTO\Request
*/
class SaveGameEventsRequest
{
pr... | true |
8a92e2a5809f28f3e58d1c62e5712579a8ac52e4 | PHP | kanateko/pukiwiki-plugin | /plugin-mailform/plugin/mailform/class/component.class.php | UTF-8 | 10,069 | 3.0625 | 3 | [] | no_license | <?php
namespace mailform\class;
use DateTime;
/**
* 入力項目を個別に構築する
*
* 設定ページから拾ってきたパーツを元に項目名と各追加項目を作成する。
*
* @see plugin_mailform_convert() (mailform.inc.php)
* @uses mailform\class\Template
* @property array $itemcfg 設定ページから読み込んだフォームの各要素
* @property string $tpl_path 追加項目のテンプレートがある場所
*/
class ... | true |
3bdb41e5de307da4ee72505457975ac86bf05e65 | PHP | claudiocg/vacina-digital | /Framework/Routing/Route.php | UTF-8 | 1,627 | 2.828125 | 3 | [] | no_license | <?php
namespace Framework\Routing;
use Framework\Application;
class Route
{
protected $method;
protected $uri;
protected $controller;
protected $action;
protected $request;
protected $regex;
protected $compiled;
public function __construct(string $method, string $uri, string $controller)
{
$this->m... | true |
e049c2b44a0d0cc7729c2e4e4d1803e49b9cfdcf | PHP | dohernandez/investment-manager | /src/Domain/Wallet/Event/WalletInvestmentIncreasedDecreased.php | UTF-8 | 727 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Domain\Wallet\Event;
use App\Infrastructure\Money\Money;
abstract class WalletInvestmentIncreasedDecreased
{
/**
* @var Money
*/
protected $funds;
/**
* @var string
*/
protected $id;
/**
* @var Money
*/
protected $invested;
public funct... | true |
6d52c07d9d94d370f0f50697baaeb5a344ed4037 | PHP | 995933447/bobbysoop-simplify | /src/Contract/Route/Route.php | UTF-8 | 1,628 | 2.703125 | 3 | [] | no_license | <?php
namespace Bobby\Contract\Route;
/**
* 路由器
*/
interface Route
{
/**
* [controllernamespace 设置控制器默认命名空间]
* @param [type] $namespace [description]
*/
public function controllernamespace($namespace);
/**
* [setRoute 设置路由方法]
* @param [type] $method [description]
* @param [type] $uri [description... | true |
61395adf2005d280f2b9acdee5333227cf8ca3b7 | PHP | born-kes/Bampi_Project | /inc/template.php | UTF-8 | 9,506 | 2.78125 | 3 | [] | no_license | <?php
/**
* Class fileMenager zarzadzanie plikami
*/
class templateMenager
{
/**
* themple string
* @var string
*/
protected $szkielet;
/**
* list tags in $szkielet
* @var array
*/
protected $tags=array();
/**
* tags box in $szkielet
* @var array
*/
... | true |
768b05bf46ec0e0ca4325ed5e7f3a94d70f76c84 | PHP | Aquarmini/mysql-demo-phalcon | /app/tasks/Mysql/TransTask.php | UTF-8 | 1,704 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Tasks\Mysql;
use App\Tasks\Task;
use App\Thrift\Clients\MysqlClient;
use Xin\Cli\Color;
use swoole_process;
class TransTask extends Task
{
public function mainAction()
{
echo Color::head('Help:') . PHP_EOL;
echo Color::colorize(' 事务测试') . PHP_EOL . PHP_EOL;
echo ... | true |
66a8dab347508fd1fa9330f74498e620ccb5abc2 | PHP | sksz/sda_js | /php/fun_string.php | UTF-8 | 374 | 3.390625 | 3 | [] | no_license | <?php
const CAT = 'cat';
const DOG = 'dog';
$strings = ['Navicat', 'Category', 'Catharsis'];
foreach($strings as $string) {
echo strpos(
strtolower($string),
CAT
), PHP_EOL;
echo strlen($string), PHP_EOL;
echo ucfirst(
str_replace(
CAT,
DOG,
... | true |
9d0c621e212b85375f8911021fda2ebaefef0812 | PHP | tal512/draftquiz | /inc/class/GuessManager.php | UTF-8 | 1,372 | 3.140625 | 3 | [
"CC-BY-3.0"
] | permissive | <?php
require_once('config.php');
require_once('Error.php');
require_once('Match.php');
/**
* To add guesses to db, and fetch statistics about them
*/
class GuessManager {
/**
* Make a new guess
**/
function add($matchId, $guess) {
try {
$db = PdoFactory::getInstance(DB_CONNECTION, DB_USER, DB_PW);
$... | true |
c73acf10194a43fbca4bbd48dac8e3716a2eeb07 | PHP | forthxu/min-php-projects | /pdo-model-2015-01-10/DBAbstract.php | UTF-8 | 2,886 | 2.71875 | 3 | [] | no_license | <?php
class DB_DBAbstract extends PDO {
private static $instance;
public $trans_started = false;
public $trans_ok = true;
public function __construct($dsn, $username, $passwd, $options=array()) {
parent::__construct($dsn, $username, $passwd, $options);
}
... | true |
12e563c6896069155846140263552652697a466d | PHP | MauroArgentino/pos | /Core/Enrutador.php | UTF-8 | 2,047 | 2.671875 | 3 | [] | no_license | <?php
class Enrutador{
public function cargar($accion,$parametro){
switch ($accion) {
case 'articulos':
include "Controlador/ArticulosControlador.php";
$articulo = new ArticulosControlador;
$articulo->listar();
bre... | true |
e798b9f6349f2c911ed7ba4194b6a3bacdee9d06 | PHP | nurhanna01/Aplikasi-PHP-Native | /Produk.php | UTF-8 | 4,282 | 2.8125 | 3 | [] | no_license | <?php
class Produk{
private $koneksi;
private $host;
private $database;
private $user;
private $password;
public function __construct(){
$this->host='localhost';
$this->database='shopingkuy';
$this->user='root';
$this->password='';
$this->koneksi=mysqli_connect($this->host,$this->user,$th... | true |
27e7ed707b2d437f2d8b98cd1e7d1637a831979e | PHP | PaulBarbieux/donnerie | /src/Template/Element/grid-item.ctp | UTF-8 | 2,040 | 2.53125 | 3 | [] | no_license | <?php
$session = $this->request->getSession();
?>
<A href="<?= $this->Url->build(['controller'=>"Items", 'action'=>"view",$item->id]) ?>" class="card grid-item item-<?= $item->type ?> <?php if ($item->isBooked()) { ?>item-booked<?php } ?>">
<DIV class="card-header">
<h2 class="card-title"><?= h($item->title) ?></h2>... | true |
036b47dd8c124a297ecbfc873e2f4f41e12b5cf5 | PHP | tyzhukotinskiy/interface_db | /Router.php | UTF-8 | 1,112 | 2.84375 | 3 | [] | no_license | <?php
class Router{
public $routes;
public function __construct()
{
$this->routes = include_once 'routes.php';
}
public function run(){
$uri = $_SERVER['REQUEST_URI'];
foreach($this->routes as $uriPattern => $path){
if(pre... | true |
f95bff11c686862483132cb493eaecffc433ab7b | PHP | ert3e/tiedportal | /vendor/sebwite/support/src/Arr.php | UTF-8 | 8,404 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Part of the Sebwite PHP packages.
*
* MIT License and copyright information bundled with this package in the LICENSE file
*/
namespace Sebwite\Support;
/**
* Array helper methods
*
* @author Sebwite Dev Team
* @copyright Copyright (c) 2015, Sebwite
* @license https://tldrlegal.com/license/mit... | true |
50ac95b393058ea8e8349c2a66227a1078de9f6d | PHP | kelianaylek/api_symfony | /src/Entity/User.php | UTF-8 | 8,619 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
u... | true |
e6f38fbd7be191f71dcfe787571935637e671fa9 | PHP | pixelbrackets/editorconfig-checker.php | /src/EditorconfigChecker/Cli/Logger.php | UTF-8 | 3,964 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
namespace EditorconfigChecker\Cli;
class Logger
{
/**
* @var array
*/
protected $errors = array();
protected $fixed = false;
protected $lines = 0;
protected $files = 0;
/**
* @var Logger
*/
protected static $instance = null;
/**
* Returns an instance... | true |
4713a4b01f112e3c1fb7036d7636317b19933cf3 | PHP | nkammah/what-i-learned | /src/Model/KnowledgeBit.php | UTF-8 | 770 | 2.90625 | 3 | [] | no_license | <?php
namespace Model;
class KnowledgeBit
{
private $_record;
function __construct($record)
{
$this->_record = $record;
}
function getId()
{
return $this->_record->getField('id');
}
function getTitle()
{
return $this->_record->getField('title');
... | true |
1bc47f35d3399d73116fde19146409b263637817 | PHP | bkfrye/Locus | /src/plugins/all-in-one-seo-pack/app/Common/Main/GoogleAnalytics.php | UTF-8 | 6,090 | 2.515625 | 3 | [
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
namespace AIOSEO\Plugin\Common\Main;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
use AIOSEO\Plugin\Common\Utils;
/**
* Outputs the Google Analytics to the head.
*
* @since 4.0.0
*/
class GoogleAnalytics {
/**
* Retrieves the script to output.
*
* @since 4.0.0
*/
public ... | true |
61daa87dc6e4a4e75be9505384803149c1ee2cd8 | PHP | aruci16/rhino | /rhino-web/core/manager/UserManager.php | UTF-8 | 1,704 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Aleks Ruci
* Date: 25.05.2019
* Time: 16:32
*/
class UserManager
{
public function __construct()
{
//default constructor
}
// Start User
public function getUserByUsernamePassword($username, $password) {
$filter = array("id"=>null,"use... | true |
822916c65a3872217aad20faf9bbe48e42451fa9 | PHP | luckyfu/suning | /suning-sdk-php/request/custom/UploadfileCreateRequest.php | UTF-8 | 1,226 | 2.59375 | 3 | [] | no_license | <?php
/**
* 苏宁开放平台接口 -
*
* @author suning
* @date 2020-7-21
*/
class UploadfileCreateRequest extends SuningRequest{
/**
*
*/
private $file;
/**
*
*/
private $fileName;
/**
*
*/
private $filePath;
public function getFile() {
return $this->file;
}
public function setFile($file... | true |
57c093d55ee12c47369ecc75d2a6b1a7a3e28383 | PHP | toogit56/mbcodei | /application/helpers/mbutil_helper.php | UTF-8 | 975 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
function mbexception($log_msg, $show_msg = '', $dumpvar = array()) {
$d = debug_backtrace();
$msg = 'file:'.$d[0]['file'].' line:'.$d[0]['line']. ' msg:'.$log_msg;
log_message('error', $msg);
if(is_array($dumpvar)) {
foreach($dumpvar as $key => $dvar) {
log_message('debu... | true |
96f9dde79d26f4442ca88ea996780f9f6245041b | PHP | bogdankuts/new-zipo | /app/Http/Controllers/Admin/ParserController.php | UTF-8 | 9,350 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Item;
use App\Producer;
use App\Subcat;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class MyReadFilter implements \PHPExcel_Reader_IReadFilter {
public function readCell($column, $row, $worksheetName = '') {
global $... | true |
1b1e3aedb42736efb2109f83645d0be54a14a8bb | PHP | luisbalcazar/sc | /backend/controllers/archivosController.php | UTF-8 | 1,294 | 2.578125 | 3 | [] | no_license | <?php
class archivosController{
public function mostrarArchivosController(){
$directorio = opendir("../views/resources"); //ruta actual
while ($archivo = readdir($directorio)) //obtenemos un archivo y luego otro sucesivamente
{
if (is_dir($archivo))//verificamos si es o no un directorio
{
... | true |
888bd62d254b8016eb1f4d9b253f31f49974324d | PHP | manucpivatto/PHP | /Exerc5/exerc5.php | UTF-8 | 429 | 2.890625 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="utf-8">
<title> Fundamentos PHP </title>
<link rel="stylesheet" href="formata-formulario.css">
</head>
<body>
<h1> Programação web </h1>
<?php
$dolar = $_POST["valor"];
$cotacao = $_POST["valor-cotacao"];
$conversao = $dolar * $cotacao;
echo "<p> ... | true |
b0785ba13dc37ac1e8c45645a60b7657c586c1e2 | PHP | il-yes/Notfication | /src/NotificationBundleAlpha/Server/Cache.php | UTF-8 | 1,888 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: versus
* Date: 25/03/18
* Time: 01:27
*/
namespace NotificationBundle\Server;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\DependencyInjection\ContainerInterface;
class Cache extends CacheManager
{
private $cache;
/**
* Cach... | true |
232e6b5ba3885ac6da942182f700e6a22ffa1090 | PHP | malyda/school-materials | /csharp/article/arrays/primArr.php | UTF-8 | 3,028 | 2.5625 | 3 | [] | no_license | <h2>Primitivní pole</h2>
<p class="introduction">Jedná se o pole (array), které rozšiřuje primitivní datové typy např. int, char a bez možnosti změny své velikosti.</p>
Opakování:<br>
<ul>
<li>Pole si lze představit jako velkou skříň, která obsahuje jednotlivé šuplíky. Nebo řadu čísel, kde můžeme identifikovat každou ... | true |
955029941a40e1a0105f93de8f19aa03013280d1 | PHP | Peldan/discussion-forum | /script/get_topic_by_id.php | UTF-8 | 306 | 2.65625 | 3 | [] | no_license | <?php
include('dbconnection.php');
function get_topic($topicid){
global $dbconnection;
$topicquery = $dbconnection->query('SELECT title FROM topics WHERE id = ' . $topicid);
if($topicquery){
$topicname = $topicquery->fetch_assoc()['title'];
return $topicname;
}
}
| true |
4a85a6420825e5919f68517b67733845f9a46359 | PHP | VIRRILIS/ghtweb5_last_version | /protected/models/Admin.php | UTF-8 | 939 | 2.953125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "{{admin}}".
*
* The followings are the available columns in table '{{admin}}':
* @property int $id
* @property string $login
* @property string $password
* @property string $auth_hash
* @property string $created_at
* @property string $updated_at
*/
class Admin e... | true |
87808805ade10f53c1823314daf48e7e1bcf43c7 | PHP | bravo3/cloud-ctrl | /src/Bravo3/CloudCtrl/Interfaces/Credentials/AbstractRegionAwareCredential.php | UTF-8 | 482 | 2.671875 | 3 | [] | no_license | <?php
namespace Bravo3\CloudCtrl\Interfaces\Credentials;
use Bravo3\CloudCtrl\Interfaces\Common\RegionAwareTrait;
/**
* Credentials for connection to a cloud provider
*/
class AbstractRegionAwareCredential extends AbstractCredential implements RegionAwareCredentialInterface
{
use RegionAwareTrait;
function... | true |
c3341ff2a6e2f849513c7d6fbc2d54d7c3089468 | PHP | jigen7/m-server-laravel | /app/Http/Controllers/Cms/ReviewCmsController.php | UTF-8 | 1,603 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Cms;
use App\Http\Controllers\Controller;
use App\Http\Models\Cms\CommentsCms;
use App\Http\Models\Cms\ReviewsCms;
use Illuminate\Support\Facades\Request;
class ReviewCmsController extends Controller
{
/**
* Create a new controller instance.
*/
public function __... | true |
70dc120ed58c1a477f0a82278d52fb8c7ce2c491 | PHP | Nethys974/worldbuilder | /src/MainBundle/Controller/DefaultController.php | UTF-8 | 881 | 2.546875 | 3 | [] | no_license | <?php
namespace MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
public function indexAction()
{
$table = "CREATE TABLE `human` (".
" `nom` TEXT,".
" `prenom` TEXT,".
" `age` INTE... | true |
a470c08a0466d86fa9d7602cdb2f231d8d5a2e13 | PHP | alfamegaxq/cube-engage | /src/RPGBundle/Entity/Player.php | UTF-8 | 5,548 | 2.921875 | 3 | [] | no_license | <?php
namespace RPGBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="player")
* @ORM\Entity(repositoryClass="RPGBundle\Repository\PlayerRepository")
*/
class Player
{
const LEVEL_XP_MULTIPLIER = 1000;
const SCORE_MULTIPLIER = 1000;
const TYPE_RED = 'RED';
const TYPE_BLUE = 'BL... | true |
c1872dbe558b508976dd7dbccab9b1d37583915b | PHP | mobarakali/lp | /batch01/class12/retriveData.php | UTF-8 | 882 | 3 | 3 | [] | no_license | <?php
require_once 'connection.php';
?>
<hr>
<?php
/*
* mysqli_query();
*
* mysqli_fetch_row()
*
* mysqli_free_result()
*/
?>
<?php
// settting query
$query = "SELECT * FROM tbluser";
//executing MySQL query
//mysqli_query($conn, $query); // We definitaly want to use the value so we won't use it
$result = mysq... | true |
180c2fe6efb406b254ca06fd6c7794c32f3d004f | PHP | TheJack95/progettoTecnologieWeb2019-2020_v2 | /PHP/funzioniUtente.php | UTF-8 | 11,424 | 2.78125 | 3 | [] | no_license | <?php
require_once "../PHP/connessioneDB.php";
class funzioniUtente {
#connessione al database tramite costruttore
public function __construct(){
$this->dbConnection = new database_connection();
}
#estrazione dati utente
public function getDati(){
$emailUtente = $_SESSION["use... | true |
a1a16a31e72f032c074f7b88ab31fa9b03ac1075 | PHP | erikriva12/test-arkademy | /tes 3/index.php | UTF-8 | 446 | 3.40625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>
Tes 3
</title>
</head>
<body>
<?php
$ukuran = 7;
for($a=1; $a<=$ukuran; $a++){ //pf1
for($b=1; $b<=$ukuran; $b++){ //pf2
//echo " ".$a.$b." ";
if ($a==1||$a==4||$a==7||$b==1||$b==7||$b==4){
echo " * " ;
}
els... | true |
0f1d9d1900b8b8cdf5c63c42e3d57b13ede5d641 | PHP | DCurrent/Inspector-Blair | /source/common_includes/facility_from_external.php | UTF-8 | 3,348 | 2.640625 | 3 | [] | no_license | <?php
require(__DIR__.'/../../source/main.php');
// Output options markup for visit by select.
function options_markup(SplDoublyLinkedList $_list, $select_target = NULL)
{
$result = NULL;
$current = NULL;
if(is_object($_list) === TRUE)
{
// Generate table row for each item in list.
for($_l... | true |
ea6d50bba0232aa92cd3cb0605a105ff60c50ab7 | PHP | jochenmanz/plentymarkets-shopware-connector | /Adapter/PlentymarketsAdapter/ServiceBus/QueryHandler/Country/FetchAllCountriesQueryHandler.php | UTF-8 | 1,703 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace PlentymarketsAdapter\ServiceBus\QueryHandler\Country;
use PlentyConnector\Connector\ServiceBus\Query\Country\FetchAllCountriesQuery;
use PlentyConnector\Connector\ServiceBus\Query\QueryInterface;
use PlentyConnector\Connector\ServiceBus\QueryHandler\QueryHandlerInterface;
use PlentymarketsAdapter\Clie... | true |
a5e4366c6c8cd6fccb9649acf05a1b99e27deca7 | PHP | slevomat/coding-standard | /tests/Sniffs/Namespaces/data/useSpacingMultipleUseTypesErrors.fixed.php | UTF-8 | 209 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use DateTimeImmutable;
use DateTime;
use function phpversion;
use const PHP_VERSION_ID;
use const PHP_VERSION;
use DateTimeInterface;
use function strpos;
use function stripos;
class Whatever
{
}
| true |
2c4312718b8cbc961f6218cd1fdc3ab29e89e092 | PHP | poespas/deltionRooster | /inc/ConvertRooster.inc.php | UTF-8 | 1,007 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
require_once(__DIR__ . "/../vendor/autoload.php");
class ConvertRooster {
public $data = null;
function __construct($data) {
$this->data = $data;
}
function toIcal() {
$cal = new \Eluceo\iCal\Component\Calendar('roosters.deltion.nl');
foreach ($this->data as $day) {
... | true |
f49bece2cd2341622bdec6cdd8942b334143591a | PHP | taqtaq11/detemiro | /includes/basic-action-collector.php | UTF-8 | 3,260 | 2.703125 | 3 | [] | no_license | <?php
//Объект с инфой о странице
class actions_collector {
public $code;
public $function;
public $rule;
public $category;
public $zone;
public $priority;
public $auto;
function __construct($array) {
if(is_merged($array)) {
... | true |
a0d70ac8f5dcfd712f7f6ad332d624c7948272a0 | PHP | GeekSilver/ToDo | /app/Http/Controllers/GoalController.php | UTF-8 | 1,555 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\goal;
use DB;
class GoalController extends Controller
{
public function postAddGoal(Request $request){
$this->validate($request,['goal'=>'required','checklist'=>'required']);
$goal_name=$request['goal'];
$checklist=$reque... | true |
9fd81bc2793c2eaad98a71494b54b6b39c71738a | PHP | garyttierney/patterns-php | /src/ViewModel/TeaserFooter.php | UTF-8 | 1,041 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace eLife\Patterns\ViewModel;
use eLife\Patterns\ArrayAccessFromProperties;
use eLife\Patterns\ArrayFromProperties;
use eLife\Patterns\CastsToArray;
use eLife\Patterns\ComposedAssets;
use eLife\Patterns\HasAssets;
use Traversable;
final class TeaserFooter implements CastsToArray, HasAssets
{
use Arra... | true |
beafe2a14fcdcb45068571c87d9fc940c4e9bfe9 | PHP | Quozul/meeTech | /admin/hardware/includes/comments.php | UTF-8 | 1,492 | 2.609375 | 3 | [] | no_license | <?php
include_once($_SERVER['DOCUMENT_ROOT'] . '/config.php');
// Get components
$req = $pdo->prepare('SELECT id_c, author, component, content FROM component_comment');
$req->execute();
$comments = $req->fetchAll();
if ($comments) { ?>
<table class="table">
<thead>
<tr>
<th>#</... | true |
ebbc3781ed50cb9bd2fdd8c7a23afc6f263c6a8b | PHP | ptejada/uFlex | /src/Cookie.php | UTF-8 | 4,291 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace ptejada\uFlex;
/**
* Class handles a single cookie
* Reads and writes the value of a cookie
*
* @package ptejada\uFlex
* @author Pablo Tejada <pablo@ptejada.com>
*/
class Cookie
{
/** @var Log - Log errors and report */
public $log;
/** @var string The name of the cookie */
p... | true |
8ff4acf6bd240ce6bc223507fc9e3e41d292de35 | PHP | raymundogab7/AdminBlurbby | /app/Repositories/Eloquent/AppUserEloquent.php | UTF-8 | 7,538 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Admin\Repositories\Eloquent;
use Admin\AppUser;
use Admin\AppUserBlurb;
use Admin\Repositories\Interfaces\AppUserInterface;
use Carbon\Carbon;
class AppUserEloquent implements AppUserInterface
{
/**
* @var AppUser
*/
private $appUser;
/**
* Create a new AppUser Eloquent ins... | true |
9f999aa28eea613b6682c4663c24219bcfcbae08 | PHP | saudashfaq/dfseo | /repositories/KeywordRankings.php | UTF-8 | 4,486 | 2.59375 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
require_once __DIR__ . '/../query_helper.php';
require_once __DIR__ . '/../db/DB.php';
require_once __DIR__ . '/../vars_and_const/Serp.php';
//TODO: take common functions to a class and then extend this class from that one
class KeywordRankings
{
pr... | true |
5afd6e32f531e22c7dcf44667f503ace5ad8eea8 | PHP | myamriko/mvc-site | /traits/UploadTrait.php | UTF-8 | 649 | 2.65625 | 3 | [] | no_license | <?php
trait UploadTrait
{
public function uploadPic($uploads_dir)
{
if (!is_dir($uploads_dir)) {
mkdir($uploads_dir, 0777);
};
$tmp_file = $_FILES['file']['tmp_name'];
$name_pic = trim(filter_var($_FILES['file']['name'], FILTER_SANITIZE_STRING));
$translite ... | true |
636a6e10c256118477e8767809c736ce5ec74a14 | PHP | pixelfear/Statamic-AJAX | /pi.ajax.php | UTF-8 | 442 | 2.515625 | 3 | [] | no_license | <?php
class Plugin_ajax extends Plugin {
var $meta = array(
'name' => 'AJAX',
'version' => '1.0',
'author' => 'Jason Varga',
'author_url' => 'http://pixelfear.com'
);
public function index()
{
return (
!empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
strtolower($_SERVER['HTTP_X_REQUESTED... | true |
2b8f7a321b0076aed2a1e3a21746d215bceb11a0 | PHP | vovanmix/google-places-api | /helpers/functions.php | UTF-8 | 443 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
if (!function_exists('array_any_keys_exists')) {
/**
* Check if any 1 of the given keys exists.
*
* @param array $keys
* @param array $array
*
* @return bool
*/
function array_any_keys_exists(array $keys, array $array)
{
$result = false;
foreach ($k... | true |