ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
example_cleaned.php
Go to the documentation of this file.
1<?php
2
19// PSR-12
20
22
23use BarClass as Bar;
24use FooInterface;
25use OtherVendor\OtherPackage\BazClass;
26use ZPackage;
27
28class Foo extends Bar implements FooInterface
29{
30 public function sampleMethod($a, $b = null)
31 {
32 if ($a === $b) {
34 } elseif ($a > $b) {
35 $foo->bar($arg1);
36 } else {
37 BazClass::bar($arg2, $arg3);
38 }
39 }
40
41 final public static function bar()
42 {
43 // method body
44 }
45}
46
48// cast_spaces
49$a = 0; $b = 0; $c = 0; $d = 0; $e = 0 ; $f = 0;
50$bar = (string) $a;
52// concat_space
53$foo = 'bar' . 3 . 'baz' . 'qux';
54// binary_operator_spaces
55$a = 1 + $b ^ $d !== $e or $f;
56// unary_operator_spaces
58$sample++;
59//Unused blank lines: begin
60
61//Unused blank lines: end
62--$sample;
63$sample = !!$a;
64$sample = ~$c;
65function &foo()
66{
67}
68// function_typehint_space
69function sample(array $a)
70{
71}
72// return_type_declaration
73function bar(int $a): string
74{
75};
76// whitespace_after_comma_in_array
77$sample = array(1,'a',$b,);
sampleMethod($a, $b=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples