Skip to content

Instantly share code, notes, and snippets.

@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@ferdiunal
ferdiunal / tax_validation.php
Last active August 4, 2021 12:21 — forked from emir/tax_validation.php
PHP Vergi Numarası Doğrulama
<?php
/**
* This method logically validates Turkish VAT number
*
* @param string $taxNumber
* @return bool
*/
public function validateTaxNumber(string $taxNumber): bool
{
@eburhan
eburhan / tcno_dogrula.js
Last active April 4, 2024 17:16
javascript ile TC Kimlik Numarası doğrulama (1 döngü kullanılarak)
/* tc kimlik numarasının geçerli olup olmadığını kontrol eder
* 2015 Erhan BURHAN
*--------------------------------------------------------------------*/
function tcno_dogrula(tcno)
{
// geleni her zaman String'e çevirelim!
tcno = String(tcno);
// tcno '0' karakteri ile başlayamaz!
if (tcno.substring(0, 1) === '0') {