Created
March 3, 2022 15:46
-
-
Save vishwac09/0c0bf4f1a877b995dce2cf6895848820 to your computer and use it in GitHub Desktop.
ExtendedPHPGuideline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Violates Import order nto gouped. | |
use Auth0\SDK\Auth0; | |
use Drupal\my_custom_module_1\Service\UserService; | |
use Drupal\my_custom_module_1\Entity\UserEntity; | |
use Drupal\my_custom_module_2\Service\MessageService; | |
use Drupal\Core\Config\ConfigFactoryInterface; | |
use Drupal\Core\Field\FieldItemList; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\HttpFoundation\Request; | |
use Auth0\SDK\Auth0; | |
use Dompdf\Adapter\CPDF; | |
use JsonSchema\Validator; | |
class K { | |
public static function abcd() {} | |
public static function pqrs() { | |
self::abcd(); | |
} | |
} | |
class ABC { | |
public function a(){ | |
// Violates Static class reference. | |
K::pqrs(); | |
} | |
// Violates order of methods not in order. | |
public function d(){} | |
// Violates order of methods not in order. | |
public function c() {} | |
} | |
interface ABL { | |
// Violates order of methods not in order. | |
public function z(); | |
// Violates order of methods not in order. | |
public function x(); | |
} | |
trait ezcReflectionReturnInfo { | |
function getReturnDescription() { /*2*/ } | |
function getReturnType() { /*1*/ } | |
} | |
// Repace switch with match for php 8.0 | |
switch (1) { | |
default: | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment