Completed
Push — master ( e1173d...cdf0e4 )
by Oskar
05:16 queued 03:02
created
src/Hal/Violation/Package/StableDependenciesPrinciple.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function apply(Metric $metric)
23 23
     {
24
-        if (! $metric instanceof PackageMetric) {
24
+        if (!$metric instanceof PackageMetric) {
25 25
             return;
26 26
         }
27 27
         $instability = $metric->getInstability();
28 28
         $violatingInstabilities = array_filter(
29 29
             $metric->getDependentInstabilities(),
30
-            function ($otherInstability) use ($instability) {
30
+            function($otherInstability) use ($instability) {
31 31
                 return $otherInstability >= $instability;
32 32
             }
33 33
         );
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $count = count($this->violatingInstabilities);
49 49
         $thisInstability = round($this->metric->getInstability(), 3);
50
-        $packages = implode("\n* ", array_map(function ($name, $instability) {
50
+        $packages = implode("\n* ", array_map(function($name, $instability) {
51 51
             $name = $name === '\\' ? 'global' : substr($name, 0, -1);
52 52
             $instability = round($instability, 3);
53 53
             return "$name ($instability)";
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/_footer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 </div>
2 2
 
3 3
 <!-- Sidebar -->
4
-<?php if(!isset($fullwidth) || $fullwidth === false) {?>
4
+<?php if (!isset($fullwidth) || $fullwidth === false) {?>
5 5
 <div id="sidebar">
6 6
     <div class="content">
7 7
         <div class="logo">
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
                             <path d="M0 0h24v24H0z" fill="none"/>
29 29
                             <path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"/>
30 30
                         </svg>
31
-                        Violations (<?php echo $sum->violations->total;?>)
31
+                        Violations (<?php echo $sum->violations->total; ?>)
32 32
                     </a>
33 33
                 </li>
34
-                <?php if($config->has('junit')) { ?>
34
+                <?php if ($config->has('junit')) { ?>
35 35
                     <li>
36 36
                         <a href="junit.html">
37 37
                             <svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                         Package relations
126 126
                     </a>
127 127
                 </li>
128
-                <?php if($config->has('git')) { ?>
128
+                <?php if ($config->has('git')) { ?>
129 129
                 <li>
130 130
                     <a href="git.html">
131 131
                         <img src="images/logo-git.png" alt="">
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/packages.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require __DIR__ . '/_header.php'; ?>
2
+require __DIR__.'/_header.php'; ?>
3 3
 
4 4
     <div class="row">
5 5
         <div class="column">
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             </div>
41 41
         </div>
42 42
     </div>
43
-<?php require __DIR__ . '/_footer.php'; ?>
43
+<?php require __DIR__.'/_footer.php'; ?>
44 44
 <?php
45 45
 $spots = [];
46 46
 foreach ($packages as $each) {
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/package_relations.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1
-<?php require __DIR__ . '/_header.php'; ?>
1
+<?php require __DIR__.'/_header.php'; ?>
2 2
 
3 3
 <?php
4 4
 $relations = [];
5
-$getPackageName = function ($name) {
5
+$getPackageName = function($name) {
6 6
     return $name === '\\' ? 'global' : substr($name, 0, -1);
7 7
 };
8 8
 foreach ($packages as $package) {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     </div>
42 42
 </div>
43 43
 
44
-<?php require __DIR__ . '/_footer.php'; ?>
44
+<?php require __DIR__.'/_footer.php'; ?>
45 45
 
46 46
 
47 47
 <script type="text/javascript">
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/violations.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php require __DIR__ . '/_header.php'; ?>
1
+<?php require __DIR__.'/_header.php'; ?>
2 2
 
3 3
 <?php
4 4
 $map = [
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                     <tbody>
58 58
                     <?php foreach ($classes as $class) {
59 59
                         if (sizeof($class['violations']) > 0) {
60
-                            $currentId = 'bloc-' . uniqid();
60
+                            $currentId = 'bloc-'.uniqid();
61 61
                             ?>
62 62
 
63 63
                             <tr>
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                     <tbody>
109 109
                     <?php foreach ($packages as $package) {
110 110
                         if (sizeof($package['violations']) > 0) {
111
-                            $currentId = 'bloc-' . uniqid();
111
+                            $currentId = 'bloc-'.uniqid();
112 112
                             ?>
113 113
 
114 114
                             <tr>
@@ -158,4 +158,4 @@  discard block
 block discarded – undo
158 158
             }
159 159
         }
160 160
     </script>
161
-<?php require __DIR__ . '/_footer.php'; ?>
162 161
\ No newline at end of file
162
+<?php require __DIR__.'/_footer.php'; ?>
163 163
\ No newline at end of file
Please login to merge, or discard this patch.
src/Hal/Metric/PackageMetric.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
         }
48 48
         $classDependencies = $this->getOutgoingClassDependencies();
49 49
         $packageDependencies = $this->getOutgoingPackageDependencies();
50
-        if (! in_array($className, $classDependencies)) {
50
+        if (!in_array($className, $classDependencies)) {
51 51
             $classDependencies[] = $className;
52 52
             $this->set('outgoing_class_dependencies', $classDependencies);
53 53
         }
54
-        if (! in_array($packageName, $packageDependencies)) {
54
+        if (!in_array($packageName, $packageDependencies)) {
55 55
             $packageDependencies[] = $packageName;
56 56
             $this->set('outgoing_package_dependencies', $packageDependencies);
57 57
         }
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
         }
76 76
         $classDependencies = $this->getIncomingClassDependencies();
77 77
         $packageDependencies = $this->getIncomingPackageDependencies();
78
-        if (! in_array($className, $classDependencies)) {
78
+        if (!in_array($className, $classDependencies)) {
79 79
             $classDependencies[] = $className;
80 80
             $this->set('incoming_class_dependencies', $classDependencies);
81 81
         }
82
-        if (! in_array($packageName, $packageDependencies)) {
82
+        if (!in_array($packageName, $packageDependencies)) {
83 83
             $packageDependencies[] = $packageName;
84 84
             $this->set('incoming_package_dependencies', $packageDependencies);
85 85
         }
Please login to merge, or discard this patch.
src/Hal/Metric/Package/PackageAbstraction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     {
12 12
         /* @var $packages PackageMetric[] */
13 13
         foreach ($metrics->all() as $eachPackage) {
14
-            if (! $eachPackage instanceof PackageMetric) {
14
+            if (!$eachPackage instanceof PackageMetric) {
15 15
                 continue;
16 16
             }
17 17
             $abstractClassCount = 0;
Please login to merge, or discard this patch.
src/Hal/Metric/Package/PackageCollectingVisitor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@
 block discarded – undo
42 42
                 $package = $matches[1];
43 43
             }
44 44
             if (preg_match('/^\s*\* @subpackage (.*)/m', $docBlockText, $matches)) {
45
-                $package = $package . '\\' . $matches[1];
45
+                $package = $package.'\\'.$matches[1];
46 46
             }
47 47
 
48
-            $packageName = $package . '\\';
49
-            if (! $packageMetric = $this->metrics->get($packageName)) {
48
+            $packageName = $package.'\\';
49
+            if (!$packageMetric = $this->metrics->get($packageName)) {
50 50
                 $packageMetric = new PackageMetric($packageName);
51 51
                 $this->metrics->attach($packageMetric);
52 52
             }
Please login to merge, or discard this patch.
src/Hal/Metric/Package/PackageDependencies.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 {
13 13
     public function calculate(Metrics $metrics)
14 14
     {
15
-        $classes = array_filter($metrics->all(), function (Metric $metric) {
15
+        $classes = array_filter($metrics->all(), function(Metric $metric) {
16 16
             return $metric instanceof ClassMetric || $metric instanceof InterfaceMetric;
17 17
         });
18 18
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     private function increaseDependencies(Metric $class, Metrics $metrics)
29 29
     {
30
-        if (! $class->has('package') || ! $class->has('externals')) {
30
+        if (!$class->has('package') || !$class->has('externals')) {
31 31
             return;
32 32
         }
33 33
         $incomingPackage = $metrics->get($class->get('package')); /* @var $incomingPackage PackageMetric */
@@ -56,6 +56,6 @@  discard block
 block discarded – undo
56 56
         }
57 57
         $parts = explode('\\', $className);
58 58
         array_pop($parts);
59
-        return implode('\\', $parts) . '\\';
59
+        return implode('\\', $parts).'\\';
60 60
     }
61 61
 }
Please login to merge, or discard this patch.